ref(eslint): Make @eslint-react the source of truth over eslint-plugin-react#115605
Draft
ryan953 wants to merge 1 commit into
Draft
ref(eslint): Make @eslint-react the source of truth over eslint-plugin-react#115605ryan953 wants to merge 1 commit into
ryan953 wants to merge 1 commit into
Conversation
…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
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.52% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
recommendedandjsx-runtimeconfigseslint-plugin-react-hooks (removed)
@eslint-react/eslint-plugin (promoted)
strict-typescriptconfig (wasrecommended)strict-type-checkedconfig when type-aware linting is enabled (ignores MDX files)