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

chore: add support for eslint v9 #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

nelli91
Copy link
Owner

@nelli91 nelli91 commented May 4, 2024

I give it a try to update ESLint to v9.

I followed the official ESLint guide for making the plugin compatible with flat config

What includes:

  • Create new file structure required by ESLint flat config.
  • Refactor rules in order to replace parserOptions with languageOptions.
  • Backward compatibility by still exporting environments key and exporting old configs using -legacy as suggested in migration guide.
  • Update ESLint to v9 and eslint-plugin- dependencies.
  • Delete old eslintrc and add a new eslint.config.js.
  • Add test-v9 in circle.yml (not sure if needed I followed what you already have)
  • Update README.

Closes

TODO:

  • 3 Tests are failing because it doesn't find the rule
// disable the eslint rule
    {
      code: `
        cy.wait(100); // eslint-disable-line no-unnecessary-waiting
      `,
      languageOptions,
    },
    {
      code: `
        /* eslint-disable-next-line no-unnecessary-waiting */
        cy.wait(100)
      `,
      languageOptions,
    },
    {
      code: `
        /* eslint-disable no-unnecessary-waiting */
        cy.wait(100)
        /* eslint-enable no-unnecessary-waiting */
      `,
      languageOptions,
    }
Screenshot 2024-05-04 at 19 48 00

@nelli91 nelli91 marked this pull request as ready for review May 4, 2024 17:31
@nelli91 nelli91 changed the title Chore/add support for eslint v9 chore: add support for eslint v9 May 4, 2024
@MikeMcC399
Copy link

@nelli91

Thanks for your contribution to getting the repo updated to support ESLint v9 flat files! This helped me get up to speed on the conversion.

ESLint v9 flat files are fully supported since v3.3.0 in May 2024.

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

Successfully merging this pull request may close these issues.

2 participants