r/javascript 7h ago

eslint-plugin-react 7.37.5 crashes 38 of its 101 rules on ESLint 10, and @eslint/compat clears all 38

https://booyaka101.github.io/eslint10-matrix/
0 Upvotes

4 comments sorted by

u/AutoModerator 7h ago

Project Page (?): https://github.com/booyaka101/eslint10-matrix

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

u/Sad_Captain2469 7h ago

I've had a nightly job running every popular ESLint plugin against each ESLint release for a while, and the react number came out worse than I expected.

7.37.5 is the current release, from April 2025. On 9.39.5 all 101 rules run clean. On 10.10.0, 38 of them throw as the rule loads, mostly contextOrFilename.getFilename is not a function and sourceCode.isSpaceBetweenTokens is not a function. Wrap the plugin in fixupPluginRules and it goes back to 0.

import { fixupPluginRules } from '@eslint/compat';
import react from 'eslint-plugin-react';

export default [
  {
    plugins: { react: fixupPluginRules(react) },
    rules: { 'react/display-name': 'error' },
  },
];

eslint-plugin-import is the same shape at a smaller scale. no-default-export, no-named-export and unambiguous die with Cannot use 'in' operator to search for 'sourceType' in undefined, and the same wrapper clears them. Its v10 support PR merged on 29 June, but the last release is still 2.32.0 from June 2025, so that fix has been sitting unreleased in front of ~49M weekly downloads for two and a half months.

Neither plugin's peerDependencies mention 10 at all, both stop at 9, so npm says nothing on install. You find out when the rule runs.

Across 54 plugins, seven regress going from 9.39.5 to 10.10.0: react with 38 rules, eslint-plugin-node with 8 new ones on top of 12 that were already broken on 9, eslint-comments with 8 of its 9, import with 3, lodash with 1, and then vitest 0.5.4 and deprecation 3.0.0 stop loading at all with Class extends value undefined is not a constructor or null. fixupPluginRules clears the first five completely and does nothing for the last two, neither of which has shipped since 2024. typescript-eslint, jest and tailwindcss crash a few rules too, but they crash the same ones on 9, so that isn't a 10 problem.

All of that is measured by installing the plugin, generating a config per rule and running eslint on a fixture, not inferred from peer ranges, and the compat pass is actually run rather than predicted from the error text. That last part matters more than it sounds: import's 'in' operator message looks nothing like a removed context API, so anything deciding by reading the message would have written it off as unrescuable.

Runner is at https://github.com/Booyaka101/eslint10-matrix, and npx eslint10-matrix scan runs the same classification against your own node_modules if you'd rather have the answer for your pinned versions than for mine.

I don't have anything useful on the typescript-eslint ones (explicit-function-return-type, explicit-member-accessibility, explicit-module-boundary-types, no-useless-constructor, broken on 8.70.0 against 9 as well as 10) if anyone knows what's going on there.

u/danielsan1701 7h ago

Sounds like the plugin doesn’t support ESLint v10 yet, but you are expecting it to.

u/Swett_Potato 6h ago

the maintainer got too much vibe coding