Skip to content

ref(eslint): Make @eslint-react the source of truth over eslint-plugin-react#115605

Draft
ryan953 wants to merge 1 commit into
masterfrom
ryan953/ref/eslint-react-source-of-truth
Draft

ref(eslint): Make @eslint-react the source of truth over eslint-plugin-react#115605
ryan953 wants to merge 1 commit into
masterfrom
ryan953/ref/eslint-react-source-of-truth

Conversation

@ryan953
Copy link
Copy Markdown
Member

@ryan953 ryan953 commented May 14, 2026

Make @eslint-react/eslint-plugin the authoritative React linting plugin, demoting eslint-plugin-react to a supplement for rules that have no @eslint-react equivalent.

What changed

eslint-plugin-react (demoted)

  • Stopped extending recommended and jsx-runtime configs
  • Registered the plugin manually and kept only 16 rules that have no @eslint-react equivalent: function-component-definition, jsx-boolean-value, jsx-fragments, jsx-curly-brace-presence, jsx-no-duplicate-props, jsx-no-target-blank, no-deprecated, no-is-mounted, no-redundant-should- component-update, no-string-refs, no-typos, no-unknown-property (with css ignore for Emotion), require-render-return, self-closing-comp, sort-comp, jsx-handler-names (off/TODO)
  • Removed 9 rules now covered by @eslint-react: jsx-key, jsx-no-comment- textnodes, no-children-prop, no-danger-with-children, no-direct-mutation- state, no-find-dom-node, no-render-return-value, no-did-mount-set-state, no-did-update-set-state

eslint-plugin-react-hooks (removed)

  • Removed entirely — rules-of-hooks and exhaustive-deps (with the additionalHooks config for useEffectAfterFirstRender and useMemoWithPrevious) are now provided by @eslint-react
  • Removed from package.json dependencies

@eslint-react/eslint-plugin (promoted)

  • Extended strict-typescript config (was recommended)
  • Added conditional strict-type-checked config when type-aware linting is enabled (ignores MDX files)
  • All NEW strict rules are explicitly disabled until violations are fixed: dom-no-missing-button-type, dom-no-missing-iframe-sandbox, dom-no-unsafe-target-blank, jsx-no-useless-fragment, no-class-component, no-misused-capture-owner-stack, no-unstable-context-value, no-unstable-default-props, no-leaked-conditional-rendering (type-checked), no-unused-props (type-checked)
  • Configured exhaustive-deps at error level with additionalHooks to match the previous react-hooks behavior

…n-react

Make @eslint-react/eslint-plugin the authoritative React linting plugin,
demoting eslint-plugin-react to a supplement for rules that have no
@eslint-react equivalent.

## What changed

### eslint-plugin-react (demoted)
- Stopped extending `recommended` and `jsx-runtime` configs
- Registered the plugin manually and kept only 16 rules that have no
  @eslint-react equivalent: function-component-definition, jsx-boolean-value,
  jsx-fragments, jsx-curly-brace-presence, jsx-no-duplicate-props,
  jsx-no-target-blank, no-deprecated, no-is-mounted, no-redundant-should-
  component-update, no-string-refs, no-typos, no-unknown-property (with
  css ignore for Emotion), require-render-return, self-closing-comp, sort-comp,
  jsx-handler-names (off/TODO)
- Removed 9 rules now covered by @eslint-react: jsx-key, jsx-no-comment-
  textnodes, no-children-prop, no-danger-with-children, no-direct-mutation-
  state, no-find-dom-node, no-render-return-value, no-did-mount-set-state,
  no-did-update-set-state

### eslint-plugin-react-hooks (removed)
- Removed entirely — rules-of-hooks and exhaustive-deps (with the
  additionalHooks config for useEffectAfterFirstRender and
  useMemoWithPrevious) are now provided by @eslint-react
- Removed from package.json dependencies

### @eslint-react/eslint-plugin (promoted)
- Extended `strict-typescript` config (was `recommended`)
- Added conditional `strict-type-checked` config when type-aware linting
  is enabled (ignores MDX files)
- All NEW strict rules are explicitly disabled until violations are fixed:
  dom-no-missing-button-type, dom-no-missing-iframe-sandbox,
  dom-no-unsafe-target-blank, jsx-no-useless-fragment, no-class-component,
  no-misused-capture-owner-stack, no-unstable-context-value,
  no-unstable-default-props, no-leaked-conditional-rendering (type-checked),
  no-unused-props (type-checked)
- Configured exhaustive-deps at error level with additionalHooks to match
  the previous react-hooks behavior
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.52%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant