Fix update-and-scan CI: use @eslint/compat fixupPluginRules for ESLint 10 compatibility#4
Conversation
…nt 10 compatibility
The React checks are not removed — they are migrated to the ESLint 10-compatible successor.
The No checks were removed. ESLint 10 + all React linting works: |
…plugin-react, keep all rules

ncu -uwas bumping ESLint v9 → v10, which removedcontext.getFilename()— an API thateslint-plugin-reactv7 relies on internally.@eslint/compat'sfixupPluginRules()is the official ESLint shim that restores these deprecated context methods, making the existing plugin work with ESLint 10 without changing or removing any rules.Changes
package.json— add@eslint/compat@^2.1.0; keepeslint-plugin-react@^7unchangedeslint.config.ts— importfixupPluginRulesfrom@eslint/compatand wrap thereactplugin registration:react: fixupPluginRules(reactPlugin). All original rules (react/jsx-filename-extension,react/react-in-jsx-scope: 'off',settings.react, etc.) are preserved exactly as before..github/workflows/⬆️npm-upgrade.yml— revert the previous workaround (ncu -u --target minor→ncu -u) so both minor and major upgrades are checked as intendedNo lint rules were added, removed, or modified. The fix has been verified with both ESLint v9 (current pinned version) and ESLint v10 (post-
ncu -uupgrade).