Outdated peerDependencies eslint >= 3.2.1
MikeMcC399 opened this issue ยท comments
Issue
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.
In detail:
ESLint v3 and v4
- The currently used
@cypress/eslint-plugin-dev
is not compatible with ESLintv3
andv4
(see #166).peerDependencies
ofeslint-plugin-cypress
needs to be"eslint": ">=5"
.
ESLint v5 and v6
-
To resolve issue #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
- The plugin cannot lint using ESLint
v8
. It tests successfully with Jest under ESLintv8
. To cover ESlintv8
completely requires resolution of issue #174.
ESLint v9
- Due to breaking changes in ESLint
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
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 ESLint9.x
(otherwise the result is the error message: "TypeError: context.getAncestors is not a function" - see issue #156)) - Allows moving forward with issue #174
- PR #176 implements the suggestion to release a new major version which supports ESLint
v7
andv8
only.
๐ This issue has been resolved in version 3.0.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐