Skip to content
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

Support ESLint 9 #155

Closed
MikeMcC399 opened this issue Apr 9, 2024 · 3 comments
Closed

Support ESLint 9 #155

MikeMcC399 opened this issue Apr 9, 2024 · 3 comments
Assignees

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Apr 9, 2024

Issue

This plugin should support usage with ESLint v9.0.0 announcement dated Apr 5, 2024.

See also the Migration Guide to v9.x.

The repo test running jest fails with ESlint 9.

Versions

eslint@9.0.0
eslint-plugin-cypress@2.15.2
Ubuntu 22.04.4 LTS
Node.js 20.12.2 LTS

Steps to reproduce

Ubuntu 22.04.4 LTS, Node.js 20.12.1 LTS

git clone https://github.com/cypress-io/eslint-plugin-cypress
cd eslint-plugin-cypress
npm install eslint@9 -D
npm test

Logs

Test log

The full log is not shown here. It starts with:

$ npm test

> eslint-plugin-cypress@0.0.0-development test
> jest

 FAIL  tests/lib/rules/no-unnecessary-waiting.js
  ● no-unnecessary-waiting › valid › foo.wait(10)

    ConfigError: ESLint configuration in rule-tester is invalid: Config (unnamed): Key "parserOptions": This appears to be in eslintrc format rather than flat config format.

      at rethrowConfigError (node_modules/@humanwhocodes/config-array/api.js:225:8)
      at node_modules/@humanwhocodes/config-array/api.js:1018:5
          at Array.reduce (<anonymous>)
      at FlatConfigArray.getConfig (node_modules/@humanwhocodes/config-array/api.js:1014:39)
      at runRuleForItem (node_modules/eslint/lib/rule-tester/rule-tester.js:793:25)
      at testValidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:908:28)
      at Object.<anonymous> (node_modules/eslint/lib/rule-tester/rule-tester.js:1258:33)

and ends with:

 PASS  tests/config.js

Test Suites: 9 failed, 1 passed, 10 total
Tests:       130 failed, 3 passed, 133 total
Snapshots:   0 total
Time:        1.651 s, estimated 3 s
Ran all test suites.

Related

Edit: Updated for latest changes to repo Apr 18, 2024

@MikeMcC399
Copy link
Collaborator Author

Unfortunately the title of this issue and the errors it describes are not in sync.

@MikeMcC399 MikeMcC399 self-assigned this May 6, 2024
@MikeMcC399
Copy link
Collaborator Author

  • ESLint v9 is now supported by this plugin in release v3.2.0
  • See README for configuration details.

Enjoy 😄 !

@MikeMcC399
Copy link
Collaborator Author

The repo https://github.com/cypress-io/cypress-example-kitchensink demonstrates eslint-plugin-cypress@3.2.0 running under eslint@9.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant