-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@cypress/eslint-plugin-dev not compatible with ESLint v8 and later #29344
Comments
I can submit a documentation PR for this if desired. |
It'd be nicer to update it, but a documentation note seems sufficient for today. |
I don't see a quick fix for this, so before anybody else trips up over the compatibility issue like I did, I thought it was a good idea to document it. I see that @AtofStryker is fixing some issues in https://github.com/cypress-io/cypress/tree/update-eslint-plugin-dev but that doesn't solve the compatibility issue with ESLint |
|
Current behavior
Attempting to lint using @cypress/eslint-plugin-dev with ESLint
v8
fails with:The ESLint Migrate to v8.0.0 describes the following in the section The /lib entrypoint has been removed:
The following code shows that @cypress/eslint-plugin-dev is using
require
in the way that is described as no longer allowed in ESLint8.x
.cypress/npm/eslint-plugin-dev/lib/custom-rules/arrow-body-multiline-braces.js
Line 2 in 768afcc
Desired behavior
Add the restriction to the npm/eslint-plugin-dev/README.md that ESLint
7.x
is the highest version supported by @cypress/eslint-plugin-dev.Test code to reproduce
On Ubuntu
22.04.4
LTS with Node.js20.12.2
, execute the following:mkdir eslint-plugin-dev-test cd eslint-plugin-dev-test git init npm init -y npm install eslint@8 @cypress/eslint-plugin-dev eslint-plugin-json-format @typescript-eslint/parser@6 @typescript-eslint/eslint-plugin@6 eslint-plugin-mocha -D
Add the file
.eslintrc.json
with the following contents to the root of the above project:touch index.js npx eslint .
Note the error message:
Cypress Version
@cypress/eslint-plugin-dev
v5.3.3
Node version
v20.12.2
LTSOperating System
Ubuntu
22.04.4
LTSDebug Logs
Other
No response
The text was updated successfully, but these errors were encountered: