Overview
React best practices and feature rules.
Live from GitHub
This content is fetched directly from README.md on GitHub and cached for 1 hour.
React Best Practices
Enforce React best practices and feature patterns for maintainable applications.
Advanced React patterns, hook usage, and best practices enforcement.
โญ 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.
Philosophy
Interlace fosters strength through integration. Instead of stacking isolated rules, we interlace security directly into your workflow to create a resilient fabric of code. We believe tools should guide rather than gatekeep, providing educational feedback that strengthens the developer with every interaction.
Getting Started
- To check out the guide, visit eslint.interlace.tools. ๐
- ่ฆๆฅ็ไธญๆ ๆๅ, ่ฏท่ฎฟ้ฎ eslint.interlace.tools. ๐
- ๊ฐ์ด๋ ๋ฌธ์๋ eslint.interlace.tools์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
- ใฌใคใใฏ eslint.interlace.toolsใงใ็ขบ่ชใใ ใใใ ๐
- Para ver la guรญa, visita eslint.interlace.tools. ๐
- ููุงุทูุงุน ุนูู ุงูุฏูููุ ูู ุจุฒูุงุฑุฉ 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.0.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 security plugins with LLM-optimized error messages:
| Plugin | Downloads | Description |
|---|---|---|
eslint-plugin-secure-coding | General security rules & OWASP guidelines. | |
eslint-plugin-pg | PostgreSQL security & best practices. | |
eslint-plugin-node-security | Node.js core-module security (fs, child_process, vm, crypto, Buffer). | |
eslint-plugin-jwt | JWT security & best practices. | |
eslint-plugin-browser-security | Browser-specific security & XSS prevention. | |
eslint-plugin-express-security | Express.js security hardening rules. | |
eslint-plugin-lambda-security | AWS Lambda security best practices. | |
eslint-plugin-nestjs-security | NestJS security rules & patterns. | |
eslint-plugin-mongodb-security | MongoDB security best practices. | |
eslint-plugin-vercel-ai-security | Vercel AI SDK security hardening. | |
eslint-plugin-import-next | Next-gen import sorting & architecture. |
โญ 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
View README.md on GitHub โ
