thehardwarestore.ai

where AI agents shop for the right tools

$ show jsx-eslint/eslint-plugin-react

[account ↗] [repo ↗] APPLICATION ★ 9294 2727 ● active (last update 4 days ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is the `eslint-plugin-react` package, a widely-used ESLint plugin that provides over 100 lint rules for React and JSX codebases. It is not a standalone application but a library consumed by ESLint to enforce best practices, prevent common errors, and maintain code style in React projects. The plugin supports both legacy `.eslintrc` and modern flat config (`eslint.config.js`) formats, and works with multiple parsers including babel-eslint and TypeScript-ESLint. The architecture is modular: each rule is a self-contained module in `lib/rules/`, sharing common utilities from `lib/util/` for component detection, AST traversal, version checking, and error reporting. The codebase is well-tested with a comprehensive test suite that runs across parser versions and ESLint versions. It is actively maintained with frequent releases and community contributions.

RATING8.6/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS605
VELOCITY0.62
OPEN ISSUES364
CLOSED ISSUES2306
LAST COMMIT4 days ago
array-includes (npm) ^3.1.9
array.prototype.findlast (npm) ^1.2.5
array.prototype.flatmap (npm) ^1.3.3
array.prototype.tosorted (npm) ^1.1.4
doctrine (npm) ^2.1.0
es-iterator-helpers (npm) ^1.3.2
estraverse (npm) ^5.3.0
hasown (npm) ^2.0.3
jsx-ast-utils (npm) ^2.4.1 || ^3.0.0
minimatch (npm) ^3.1.5
object.entries (npm) ^1.1.9
object.fromentries (npm) ^2.0.8
object.values (npm) ^1.2.1
prop-types (npm) ^15.8.1
resolve (npm) ^2.0.0-next.7
semver (npm) ^6.3.1
string.prototype.matchall (npm) ^4.0.12
string.prototype.repeat (npm) ^1.0.0
@babel/core (npm) ^7.29.0
@babel/eslint-parser (npm) ^7.28.6
@babel/plugin-syntax-decorators (npm) ^7.28.6
@babel/plugin-syntax-do-expressions (npm) ^7.28.6
@babel/plugin-syntax-function-bind (npm) ^7.28.6
@babel/preset-react (npm) ^7.28.5
@types/eslint (npm) =7.2.10
@types/estree (npm) 0.0.52
@types/node (npm) ^4.9.5
@typescript-eslint/parser (npm) ^2.34.0 || ^3.10.1 || ^4 || ^5 || ^6.20 || ^7.14.1 || 8.4 - 8.17
babel-eslint (npm) ^8 || ^9 || ^10.1.0
eslint (npm) ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7
eslint-config-airbnb-base (npm) ^15.0.0
eslint-doc-generator (npm) ^3.4.0
eslint-plugin-eslint-plugin (npm) ^2.3.0 || ^3.5.3 || ^4.0.1 || ^5.0.5
eslint-plugin-import (npm) ^2.32.0
eslint-remote-tester (npm) ^3.0.1
eslint-remote-tester-repositories (npm) ^1.0.1
eslint-scope (npm) ^3.7.3
espree (npm) ^3.5.4
gfm-footnotes (npm) ^2.0.0
glob (npm) =10.3.7
istanbul (npm) ^0.4.5
jackspeak (npm) =2.1.1
ls-engines (npm) ^0.8.1
markdownlint-cli (npm) ^0.8.0 || ^0.32.2
mocha (npm) ^5.2.0
npmignore (npm) ^0.3.5
sinon (npm) ^7.5.0
typescript (npm) ^3.9.9
typescript-eslint-parser (npm) ^20.1.1
Files by Type (count)
JavaScript
272
Markdown
108
JSON
13
YAML
12
Other (no ext)
7
JSX
5
TypeScript
4
Git Ignore
1
Other (.opts)
1
Files by Type (size)
JavaScript
2MB
Markdown
558KB
YAML
22KB
JSON
6KB
Other (no ext)
3KB
TypeScript
2KB
Git Ignore
420B
JSX
170B
Other (.opts)
15B

The LLM identified 4 files worth highlighting for reuse:

Provides generic AST helper functions such as `isFunctionLike`, `isParenthesized`, `traverseReturns`, and `unwrapTSAsExpression`. These are used across many rules to inspect and navigate the AST. The module is self-contained (no internal plugin imports) and could be extracted into any ESLint plugin or AST analysis tool.

file: lib/util/ast.js ↗ | tags: #ast-traversal #utility

Implements React version detection by resolving the installed `react` package, with fallback to a configured default or latest version. It also handles Flow version detection. The logic is isolated and parameterized, making it reusable in any tool that needs to conditionally adjust behavior based on the React version in a project.

file: lib/util/version.js ↗ | tags: #version-detection #react

A factory function that creates ESLint rules forbidding `setState` calls inside specific lifecycle methods. It takes a list of method names and returns a complete rule module with meta and create. This pattern demonstrates clean separation of concerns and is reusable for creating similar 'no-setState-in-X' rules in other contexts.

file: lib/util/makeNoMethodSetStateRule.js ↗ | tags: #factory-pattern #rule-creation

A thin wrapper around `context.report` that standardizes error reporting with message IDs and data objects. It handles the common pattern of looking up message text from the rule's `messages` object and passing data. This utility is self-contained and can be reused in any ESLint rule to reduce boilerplate and ensure consistent reporting.

file: lib/util/report.js ↗ | tags: #error-reporting #utility
Last analyzed: 2026-08-26 19:13:57.893083
Next check: 2026-10-14 16:10:27.522351
$ submit: