Skip to main content
interlace
Plugin: react-features

eslint-plugin-react-features

React best practices and feature rules.

React Best Practices

Enforce React best practices and feature patterns for maintainable applications.

Install

npm install -D eslint-plugin-react-features

Live from GitHub

This content is fetched directly from README.md on GitHub and cached for 1 hour.

Live README from GitHubfrom eslint-plugin-react-features/README.md, cached for 1 hour.Edit on GitHub

⭐ 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

npm install eslint-plugin-react-features --save-dev

⚙️ Configuration Presets

PresetDescription
recommendedRecommended React patterns and performance rules

📦 Compatibility

PackageVersion
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

IconDescription
💼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.
RuleCWEOWASPCVSSDescription🧠💼⚠️🔧💡🚫
checked-requires-onchange-or-readonlychecked-requires-onchange-or-readonly rule🟢💡
default-props-match-prop-typesdefault-props-match-prop-types rule🟢💡
display-namedisplay-name rule🟢💡
hooks-exhaustive-depshooks-exhaustive-deps rule🟢⚠️💡
jsx-handler-namesjsx-handler-names rule🟢💡
jsx-keyjsx-key rule🟢💼💡
jsx-max-depthjsx-max-depth rule🟢💡
jsx-no-bindjsx-no-bind rule🟢💡
jsx-no-duplicate-propsPrevent duplicate props in JSX elements. This rule is part of eslint-plugin-react-features and provides LLM…🟢💼💡
jsx-no-literalsjsx-no-literals rule🟢💡
jsx-no-script-urlPrevent javascript: URLs in JSX. This rule is part of eslint-plugin-react-features and provides LLM-optimiz…🟢💼💡
jsx-no-target-blankRequire rel='noopener noreferrer' with target='_blank'. This rule is part of eslint-plugin-react-features a…🟢💼💡
no-access-state-in-setstateno-access-state-in-setstate rule🟢💡
no-adjacent-inline-elementsno-adjacent-inline-elements rule🟢💡
no-arbitrary-token-class🟢
no-arrow-function-lifecycleno-arrow-function-lifecycle rule🟢💡
no-children-propno-children-prop rule🟢⚠️💡
no-dangerCWE-79no-danger rule🟢⚠️💡
no-danger-with-childrenPrevent using children and dangerouslySetInnerHTML together. This rule is part of eslint-plugin-react-featu…🟢💼💡
no-default-test-id🟢
no-deprecatedWarn about using deprecated React APIs. This rule is part of eslint-plugin-react-features and provides LLM-…🟢⚠️💡
no-did-mount-set-stateno-did-mount-set-state rule🟢💡
no-did-update-set-stateno-did-update-set-state rule🟢💡
no-direct-mutation-stateno-direct-mutation-state rule🟢💡
no-find-dom-nodePrevent using findDOMNode. This rule is part of eslint-plugin-react-features and provides LLM-optimized err…🟢💡
no-inline-style🟢
no-invalid-html-attributeno-invalid-html-attribute rule🟢💡
no-is-mountedno-is-mounted rule🟢💡
no-is-prefix-prop🟢
no-kind-prop-discriminator🟢
no-multi-compno-multi-comp rule🟢💡
no-namespaceno-namespace rule🟢💡
no-object-type-as-default-propno-object-type-as-default-prop rule🟢💡
no-raw-color-literal🟢
no-redundant-should-component-updateno-redundant-should-component-update rule🟢💡
no-render-return-valueno-render-return-value rule🟢💡
no-set-stateno-set-state rule🟢💡
no-string-refsno-string-refs rule🟢💼💡
no-this-in-sfcno-this-in-sfc rule🟢💡
no-typosno-typos rule🟢💡
no-unescaped-entitiesno-unescaped-entities rule🟢💡
no-unknown-propertyno-unknown-property rule🟢💼💡
no-unnecessary-rerendersno-unnecessary-rerenders rule🟢💡
no-unsafeWarn about UNSAFE_ lifecycle methods. This rule is part of eslint-plugin-react-features and provides LLM-op…🟢💡
no-wrapper-sub-component🟢
prefer-es6-classprefer-es6-class rule🟢💡
prefer-stateless-functionprefer-stateless-function rule🟢💡
prop-typesprop-types rule🟢💡
react-class-to-hooksreact-class-to-hooks rule🟢💡
react-in-jsx-scopereact-in-jsx-scope rule🟢💡
react-no-inline-functionsreact-no-inline-functions rule🟢💡
react-render-optimizationreact-render-optimization rule🟢💡
require-data-slot🟢
require-default-propsrequire-default-props rule🟢💡
require-optimizationrequire-optimization rule🟢💡
require-render-returnrequire-render-return rule🟢💡
required-attributesrequired-attributes rule🟢💡
sort-compsort-comp rule🟢💡
state-in-constructorstate-in-constructor rule🟢💡
static-property-placementstatic-property-placement rule🟢💡
void-dom-elements-no-childrenPrevent void DOM elements from receiving children. This rule is part of eslint-plugin-react-features and pr…🟢💡

Part of the Interlace ESLint ecosystem — AI-native rules with LLM-optimized error messages:

Security

PluginDownloadsDescription
eslint-plugin-anthropic-securitydownloadsAnthropic SDK security.
eslint-plugin-browser-securitydownloadsXSS, DOM security.
eslint-plugin-drizzle-securitydownloadsDrizzle security.
eslint-plugin-express-securitydownloadsExpress middleware hardening.
eslint-plugin-gemini-securitydownloadsGoogle Gemini SDK security.
eslint-plugin-jwt-securitydownloadsToken security.
eslint-plugin-knex-securitydownloadsKnex security.
eslint-plugin-lambda-securitydownloadsAWS Lambda hardening.
eslint-plugin-mcp-sdk-securitydownloadsMCP SDK security.
eslint-plugin-mongodb-securitydownloadsMongoDB injection.
eslint-plugin-mysql-securitydownloadsMySQL security.
eslint-plugin-nestjs-securitydownloadsNestJS framework hardening.
eslint-plugin-node-securitydownloadsServer-side patterns.
eslint-plugin-openai-securitydownloadsOpenAI SDK security.
eslint-plugin-postgresql-securitydownloadsPostgreSQL security.
eslint-plugin-prisma-securitydownloadsPrisma security.
eslint-plugin-secure-codingdownloadsInjection prevention.
eslint-plugin-sequelize-securitydownloadsSequelize ORM security.
eslint-plugin-sqlite-securitydownloadsSQLite security.
eslint-plugin-supabase-securitydownloadsSupabase security.
eslint-plugin-typeorm-securitydownloadsTypeORM security.
eslint-plugin-vercel-ai-securitydownloadsAI SDK security.

Code quality

PluginDownloadsDescription
eslint-plugin-conventionsdownloadsTeam-specific habits and styles.
eslint-plugin-import-nextdownloadsFast cycle + import-graph analysis.
eslint-plugin-maintainabilitydownloadsCognitive load and clean-code patterns.
eslint-plugin-modernizationdownloadsESNext migration + syntax evolution.
eslint-plugin-modularitydownloadsStructural integrity and DDD patterns.
eslint-plugin-operabilitydownloadsProduction readiness and resource health.
eslint-plugin-react-a11ydownloadsReact accessibility / WCAG.
eslint-plugin-reliabilitydownloadsRuntime 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.

GitHub stars

📄 License

MIT © Ofri Peretz

View README.md on GitHub →

Building secure JavaScript with Interlace? Star the repo to get new rules and CWE coverage as we ship them — or follow the AI-code-security benchmarks behind them.