Skip to content

Support ESLint 9 #155

@MikeMcC399

Description

@MikeMcC399

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

[email protected]
[email protected]
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

> [email protected] 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions