You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The eslint-plugin-cypress plugin currently defines peerDependencies of "eslint": ">= 3.2.1". This includes versions of ESLint v3, v4 and v9 which are not compatible with the current latest version of eslint-plugin-cypress@2.15.2 (including its other peerDependencies). ESLint v8 cannot be linted by @cypress/eslint-plugin-dev and replacement linting recommended by Linting a Plugin only covers ESLint v7 and above.
The intersection of supportable combinations is ESLint v7 and v8 only.
requires a minimum of ESLint 7.0.0. This is the lowest version supported by eslint-plugin-n. peerDependencies of eslint-plugin-cypress needs to be "eslint": ">=7".
ESLint v7
"eslint": "^7.32.0" is the currently configured version of ESLint in the master branch of eslint-plugin-cypress. This version lints with ESLint and tests with Jest successfully. This version is already covered by peerDependencies of "eslint": ">= 3.2.1".
Due to breaking changes in ESLint v9 (see Migrate to v9.x related to removed API calls and flat-file related changes) the plugin eslint-plugin-cypress@2.15.2 (current latest) is not compatible with ESLint v9. peerDependencies of eslint-plugin-cypress needs to be "eslint": "<9".
Suggestion
Considering all of the above issues, eslint-plugin-cypress needs to have its peerDependencies set to the semver range:
"eslint": ">=7 <9"
This is a breaking change needing a new major release eslint-plugin-cypress of 3.x.
Implementing this change has the benefits:
Provides users with a clear package manager incompatibilty message if they install the latest version of eslint-plugin-cypress together with ESLint 9.x (otherwise the result is the error message: "TypeError: context.getAncestors is not a function" - see issue Eslint 9 fails with legacy config .eslintrc #156))
Issue
The
eslint-plugin-cypress
plugin currently definespeerDependencies
of"eslint": ">= 3.2.1"
. This includes versions of ESLintv3
,v4
andv9
which are not compatible with the current latest version ofeslint-plugin-cypress@2.15.2
(including its otherpeerDependencies
). ESLintv8
cannot be linted by@cypress/eslint-plugin-dev
and replacement linting recommended by Linting a Plugin only covers ESLintv7
and above.The intersection of supportable combinations is ESLint
v7
andv8
only.In detail:
ESLint v3 and v4
@cypress/eslint-plugin-dev
is not compatible with ESLintv3
andv4
(see @cypress/eslint-plugin-dev@3.2.0 lacks support for ESLint 4 #166).peerDependencies
ofeslint-plugin-cypress
needs to be"eslint": ">=5"
.ESLint v5 and v6
To resolve issue Migrate from @cypress/eslint-plugin-dev to supported plugins #174 by using plugins recommended by the ESLint documentation section Linting a Plugin:
requires a minimum of ESLint
7.0.0
. This is the lowest version supported by eslint-plugin-n.peerDependencies
ofeslint-plugin-cypress
needs to be"eslint": ">=7"
.ESLint v7
"eslint": "^7.32.0"
is the currently configured version of ESLint in themaster
branch ofeslint-plugin-cypress
. This version lints with ESLint and tests with Jest successfully. This version is already covered bypeerDependencies
of"eslint": ">= 3.2.1"
.ESLint v8
v8
. It tests successfully with Jest under ESLintv8
. To cover ESlintv8
completely requires resolution of issue Migrate from @cypress/eslint-plugin-dev to supported plugins #174.ESLint v9
v9
(see Migrate to v9.x related to removed API calls and flat-file related changes) the plugineslint-plugin-cypress@2.15.2
(current latest) is not compatible with ESLintv9
.peerDependencies
ofeslint-plugin-cypress
needs to be"eslint": "<9"
.Suggestion
Considering all of the above issues,
eslint-plugin-cypress
needs to have its peerDependencies set to the semver range:"eslint": ">=7 <9"
This is a breaking change needing a new major release
eslint-plugin-cypress
of3.x
.Implementing this change has the benefits:
eslint-plugin-cypress
together with ESLint9.x
(otherwise the result is the error message: "TypeError: context.getAncestors is not a function" - see issue Eslint 9 fails with legacy config .eslintrc #156))The text was updated successfully, but these errors were encountered: