fix: switch to eslint-plugin-import-x and drop fixup wrappers#573
Merged
Conversation
eslint-plugin-import still lacks native flat config support, forcing @eslint/compat fixupPluginRules wrappers. Swap to eslint-plugin-import-x (maintained fork with native flat config) and drop the fixup wrappers for jsx-a11y (v6.10+) and react (v7.37+) which also ship native flat config now. Also scope the Next.js config block to JS/TS files so rules referencing the import plugin don't try to apply to JSON/YAML files and fail with "could not find plugin 'import'". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Same latent bug as nextjs — rules block referenced react/* without a files filter, so it applied to JSON/YAML where the react plugin isn't registered. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each preset's test-files/ subdir previously only had JS/TS files, so the existing CI step didn't exercise the json + yaml configs included by every environment preset. That let the nextjs/preact missing files-scope bug slip through CI. Also align the AGENTS.md Node matrix note with the actual CI matrix (20, 22, 24). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
gavmck
approved these changes
Apr 24, 2026
|
🎉 This PR is included in version 3.3.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.



Summary
eslint-plugin-importforeslint-plugin-import-x(native flat config). Rule/setting keys updated toimport-x/*.fixupPluginRuleswrappers forjsx-a11y(v6.10+) andreact(v7.37+) — both ship native flat config now.fixupstill used foryou-dont-need-lodash-underscore.A configuration object specifies rule "import/no-anonymous-default-export", but could not find plugin "import"when consumers run ESLint across JSON/YAML files.Test plan
npx eslint src— clean (only pre-existing sonar/security warnings)npx eslint test-files/— still reports expected violations (jsx-a11y, react, unused-imports, prettier, etc.)🤖 Generated with Claude Code