eslint-plugin-react-features
v1.7.11
Published
ESLint plugin for React — hooks, prop-types, JSX correctness, render performance, and class-to-hooks migration rules for modern React codebases.
Maintainers
Readme
⭐ If this plugin caught a real bug for you, star the repo — it's the signal that keeps these rules maintained.
Description
This plugin provides Advanced React patterns, hook usage, and best practices enforcement.
- Why — a linter nobody reads protects nothing. We would rather miss a finding than spend your attention on one that was never real.
- How — evidence, not names. A rule fires on what the code does, resolved through the AST and ESLint's own scope analysis.
- What — every finding carries its fix, in prose for a human and as structured JSON for an agent. Security rules add a CWE mapping and, where assigned, a CVSS score.
That trade costs recall, and we measure it: methodology · results · a false positive is a bug.
Getting Started
- To check out the guide, visit eslint.interlace.tools. 📚
npm install eslint-plugin-react-features --save-dev⚙️ Configuration Presets
| Preset | Description |
| :------------ | :----------------------------------------------- |
| recommended | Recommended React patterns and performance rules |
📦 Compatibility
| Package | Version |
| :--- | :--- |
| ESLint | ^8.40.0 \|\| ^9.0.0 \|\| ^10.0.0 |
| Node.js | >=18.0.0 |
See the ESLint Version Support Policy — current ecosystem share data, the 20% gate, and the forward-looking exception that covers v10.
Rules
Legend
| Icon | Description |
| :---: | :--- |
| 💼 | Recommended: Included in the recommended preset. |
| ⚠️ | Warns: Set to warn in recommended preset. |
| 🔧 | Auto-fixable: Automatically fixable by the --fix CLI option. |
| 💡 | Suggestions: Providing code suggestions in IDE. |
| 🚫 | Deprecated: This rule is deprecated. |
| 🟢 | Type-unaware: AST-only, runs in oxlint JS-plugin tier. |
| 🟡 | Type-aware (refining): pure-AST primary path; types refine precision. |
| 🟠 | Type-aware (graceful): requires TS program; silent without it. |
| Rule | CWE | OWASP | CVSS | Description | 🧠 | 💼 | ⚠️ | 🔧 | 💡 | 🚫 | | :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: | | checked-requires-onchange-or-readonly | | | | checked-requires-onchange-or-readonly rule | 🟢 | | | | 💡 | | | default-props-match-prop-types | | | | default-props-match-prop-types rule | 🟢 | | | | 💡 | | | display-name | | | | display-name rule | 🟢 | | | | 💡 | | | hooks-exhaustive-deps | | | | hooks-exhaustive-deps rule | 🟢 | | ⚠️ | | 💡 | | | jsx-handler-names | | | | jsx-handler-names rule | 🟢 | | | | 💡 | | | jsx-key | | | | jsx-key rule | 🟢 | 💼 | | | 💡 | | | jsx-max-depth | | | | jsx-max-depth rule | 🟢 | | | | 💡 | | | jsx-no-bind | | | | jsx-no-bind rule | 🟢 | | | | 💡 | | | jsx-no-duplicate-props | | | | Prevent duplicate props in JSX elements. This rule is part of eslint-plugin-react-features and provides LLM… | 🟢 | 💼 | | | 💡 | | | jsx-no-literals | | | | jsx-no-literals rule | 🟢 | | | | 💡 | | | jsx-no-script-url | | | | Prevent javascript: URLs in JSX. This rule is part of eslint-plugin-react-features and provides LLM-optimiz… | 🟢 | 💼 | | | 💡 | | | jsx-no-target-blank | | | | Require rel='noopener noreferrer' with target='blank'. This rule is part of eslint-plugin-react-features a… | 🟢 | 💼 | | | 💡 | | | no-access-state-in-setstate | | | | no-access-state-in-setstate rule | 🟢 | | | | 💡 | | | no-adjacent-inline-elements | | | | no-adjacent-inline-elements rule | 🟢 | | | | 💡 | | | no-arbitrary-token-class | | | | | 🟢 | | | | | | | no-arrow-function-lifecycle | | | | no-arrow-function-lifecycle rule | 🟢 | | | | 💡 | | | no-children-prop | | | | no-children-prop rule | 🟢 | | ⚠️ | | 💡 | | | no-danger | CWE-79 | | | no-danger rule | 🟢 | | ⚠️ | | 💡 | | | no-danger-with-children | | | | Prevent using children and dangerouslySetInnerHTML together. This rule is part of eslint-plugin-react-featu… | 🟢 | 💼 | | | 💡 | | | no-default-test-id | | | | | 🟢 | | | | | | | no-deprecated | | | | Warn about using deprecated React APIs. This rule is part of eslint-plugin-react-features and provides LLM-… | 🟢 | | ⚠️ | | 💡 | | | no-did-mount-set-state | | | | no-did-mount-set-state rule | 🟢 | | | | 💡 | | | no-did-update-set-state | | | | no-did-update-set-state rule | 🟢 | | | | 💡 | | | no-direct-mutation-state | | | | no-direct-mutation-state rule | 🟢 | | | | 💡 | | | no-find-dom-node | | | | Prevent using findDOMNode. This rule is part of eslint-plugin-react-features and provides LLM-optimized err… | 🟢 | | | | 💡 | | | no-inline-style | | | | | 🟢 | | | | | | | no-invalid-html-attribute | | | | no-invalid-html-attribute rule | 🟢 | | | | 💡 | | | no-is-mounted | | | | no-is-mounted rule | 🟢 | | | | 💡 | | | no-is-prefix-prop | | | | | 🟢 | | | | | | | no-kind-prop-discriminator | | | | | 🟢 | | | | | | | no-multi-comp | | | | no-multi-comp rule | 🟢 | | | | 💡 | | | no-namespace | | | | no-namespace rule | 🟢 | | | | 💡 | | | no-object-type-as-default-prop | | | | no-object-type-as-default-prop rule | 🟢 | | | | 💡 | | | no-raw-color-literal | | | | | 🟢 | | | | | | | no-redundant-should-component-update | | | | no-redundant-should-component-update rule | 🟢 | | | | 💡 | | | no-render-return-value | | | | no-render-return-value rule | 🟢 | | | | 💡 | | | no-set-state | | | | no-set-state rule | 🟢 | | | | 💡 | | | no-string-refs | | | | no-string-refs rule | 🟢 | 💼 | | | 💡 | | | no-this-in-sfc | | | | no-this-in-sfc rule | 🟢 | | | | 💡 | | | no-typos | | | | no-typos rule | 🟢 | | | | 💡 | | | no-unescaped-entities | | | | no-unescaped-entities rule | 🟢 | | | | 💡 | | | no-unknown-property | | | | no-unknown-property rule | 🟢 | 💼 | | | 💡 | | | no-unnecessary-rerenders | | | | no-unnecessary-rerenders rule | 🟢 | | | | 💡 | | | no-unsafe | | | | Warn about UNSAFE lifecycle methods. This rule is part of eslint-plugin-react-features and provides LLM-op… | 🟢 | | | | 💡 | | | no-wrapper-sub-component | | | | | 🟢 | | | | | | | prefer-es6-class | | | | prefer-es6-class rule | 🟢 | | | | 💡 | | | prefer-stateless-function | | | | prefer-stateless-function rule | 🟢 | | | | 💡 | | | prop-types | | | | prop-types rule | 🟢 | | | | 💡 | | | react-class-to-hooks | | | | react-class-to-hooks rule | 🟢 | | | | 💡 | | | react-in-jsx-scope | | | | react-in-jsx-scope rule | 🟢 | | | | 💡 | | | react-no-inline-functions | | | | react-no-inline-functions rule | 🟢 | | | | 💡 | | | react-render-optimization | | | | react-render-optimization rule | 🟢 | | | | 💡 | | | require-data-slot | | | | | 🟢 | | | | | | | require-default-props | | | | require-default-props rule | 🟢 | | | | 💡 | | | require-optimization | | | | require-optimization rule | 🟢 | | | | 💡 | | | require-render-return | | | | require-render-return rule | 🟢 | | | | 💡 | | | required-attributes | | | | required-attributes rule | 🟢 | | | | 💡 | | | sort-comp | | | | sort-comp rule | 🟢 | | | | 💡 | | | state-in-constructor | | | | state-in-constructor rule | 🟢 | | | | 💡 | | | static-property-placement | | | | static-property-placement rule | 🟢 | | | | 💡 | | | void-dom-elements-no-children | | | | Prevent void DOM elements from receiving children. This rule is part of eslint-plugin-react-features and pr… | 🟢 | | | | 💡 | |
🔗 Related ESLint Plugins
Part of the Interlace ESLint ecosystem — AI-native rules with LLM-optimized error messages:
Security
| Plugin | Downloads | Description |
| :--- | :---: | :--- |
| eslint-plugin-anthropic-security | | Anthropic SDK security. |
|
eslint-plugin-browser-security | | XSS, DOM security. |
|
eslint-plugin-drizzle-security | | Drizzle security. |
|
eslint-plugin-express-security | | Express middleware hardening. |
|
eslint-plugin-gemini-security | | Google Gemini SDK security. |
|
eslint-plugin-jwt-security | | Token security. |
|
eslint-plugin-knex-security | | Knex security. |
|
eslint-plugin-lambda-security | | AWS Lambda hardening. |
|
eslint-plugin-mcp-sdk-security | | MCP SDK security. |
|
eslint-plugin-mongodb-security | | MongoDB injection. |
|
eslint-plugin-mysql-security | | MySQL security. |
|
eslint-plugin-nestjs-security | | NestJS framework hardening. |
|
eslint-plugin-node-security | | Server-side patterns. |
|
eslint-plugin-openai-security | | OpenAI SDK security. |
|
eslint-plugin-postgresql-security | | PostgreSQL security. |
|
eslint-plugin-prisma-security | | Prisma security. |
|
eslint-plugin-secure-coding | | Injection prevention. |
|
eslint-plugin-sequelize-security | | Sequelize ORM security. |
|
eslint-plugin-sqlite-security | | SQLite security. |
|
eslint-plugin-supabase-security | | Supabase security. |
|
eslint-plugin-typeorm-security | | TypeORM security. |
|
eslint-plugin-vercel-ai-security | | AI SDK security. |
Code quality
| Plugin | Downloads | Description |
| :--- | :---: | :--- |
| eslint-plugin-conventions | | Team-specific habits and styles. |
|
eslint-plugin-import-next | | Fast cycle + import-graph analysis. |
|
eslint-plugin-maintainability | | Cognitive load and clean-code patterns. |
|
eslint-plugin-modernization | | ESNext migration + syntax evolution. |
|
eslint-plugin-modularity | | Structural integrity and DDD patterns. |
|
eslint-plugin-operability | | Production readiness and resource health. |
|
eslint-plugin-react-a11y | | React accessibility / WCAG. |
|
eslint-plugin-reliability | | Runtime stability and error safety. |
⭐ Support & follow
If this plugin caught a real bug for you, star the repo — stars are the signal that keeps the Interlace ESLint ecosystem maintained — and follow the writeups on Dev.to for the benchmarks and security research behind these rules.
📄 License
MIT © Ofri Peretz
