Skip to content

fix: switch to eslint-plugin-import-x and drop fixup wrappers#573

Merged
mergify[bot] merged 3 commits into
mainfrom
fix/import-x-native-flat-config
Apr 24, 2026
Merged

fix: switch to eslint-plugin-import-x and drop fixup wrappers#573
mergify[bot] merged 3 commits into
mainfrom
fix/import-x-native-flat-config

Conversation

@JoshTheWanderer
Copy link
Copy Markdown
Member

@JoshTheWanderer JoshTheWanderer commented Apr 23, 2026

Summary

  • Swap eslint-plugin-import for eslint-plugin-import-x (native flat config). Rule/setting keys updated to import-x/*.
  • Drop fixupPluginRules wrappers for jsx-a11y (v6.10+) and react (v7.37+) — both ship native flat config now. fixup still used for you-dont-need-lodash-underscore.
  • Scope the Next.js and Preact config blocks to JS/TS files — fixes 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

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>
@mergify mergify Bot requested review from a team and gavmck and removed request for a team April 23, 2026 17:42
@mergify mergify Bot requested a review from a team April 23, 2026 17:42
JoshTheWanderer and others added 2 commits April 23, 2026 19:43
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>
@sonarqubecloud
Copy link
Copy Markdown

@mergify mergify Bot merged commit 81e963d into main Apr 24, 2026
13 checks passed
@mergify mergify Bot requested a review from a team April 24, 2026 03:22
@mergify mergify Bot deleted the fix/import-x-native-flat-config branch April 24, 2026 03:22
@mergify mergify Bot requested review from DanWebb and removed request for a team April 24, 2026 03:22
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Development

Successfully merging this pull request may close these issues.

2 participants