eslint-plugin-react icon indicating copy to clipboard operation
eslint-plugin-react copied to clipboard

Latest version forces users to use Eslint 9.7

Open ematipico opened this issue 1 year ago • 5 comments
trafficstars

As the title says, the latest version forces users to bump eslint to 9.7.

However, the commit that changed it https://github.com/jsx-eslint/eslint-plugin-react/commit/4b3209bf3a65502a279da1d98b80d2d998d27357 doesn't show any particular API that might have been introduced in v9.7.

I believe a generic v9 as peer dependency should be sufficient, so users aren't forced to 9.7, unless there's a reason visible in the changelog.

ematipico avatar Jul 20 '24 22:07 ematipico

The reason is to reduce the support surface of the package. We never supported eslint 9 below 9.7, and there’s no reason to be using eslint 9 and not be using 9 latest, so why are you on an older version of v9?

ljharb avatar Jul 21 '24 00:07 ljharb

I'm not sure I fully understand the meaning of the "support surface".

and there’s no reason to be using eslint 9 and not be using 9 latest

Should I expect this behaviour every time this library is bumped? Like, next time a minor is released, will you bump the V9 peer dep to the latest?

so why are you on an older version of v9?

Maintenance creep, mostly. However, I was mostly concerned about the logic of the peer dependency, because all the other versions of Eslint (V8, v7, etc) don't depend on the latest.

ematipico avatar Jul 21 '24 06:07 ematipico

yarn test fails after the latest bump due to missing eslint.config file.

ESLint: 9.7.0
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.

etherealm13 avatar Jul 21 '24 09:07 etherealm13

@ematipico

Should I expect this behaviour every time this library is bumped? Like, next time a minor is released, will you bump the V9 peer dep to the latest?

no, of course not. That would be a breaking change.

ljharb avatar Jul 21 '24 15:07 ljharb

@etherealm13 if you’re upgrading to eslint 9, flat config is the default, so you either need to use the env var to select eslintrc, or migrate your config. That’s an eslint question tho, not related to this plugin.

ljharb avatar Jul 21 '24 15:07 ljharb

Version 7.34.4 had this:

  "peerDependencies": {
    "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8"
  },

Version 7.35.0 had this:

  "peerDependencies": {
    "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"
  },

The latter is a strict superset of the former. 9.x was not supported in 7.34.4.

(I think this issue can be closed)

voxpelli avatar Sep 25 '24 09:09 voxpelli