Skip to content

feat: remove legacy eslintrc configuration #260

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

Merged
merged 2 commits into from
May 29, 2025

Conversation

MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented May 28, 2025

BREAKING CHANGE: Drop legacy configuration support

Situation

Since the release of ESLint v9.0.0 on Apr 5, 2024 all mainstream plugins have been able to migrate to offer a flat configuration option. The need to retain support for legacy eslintrc configuration for actively evolving projects has therefore significantly diminished.

The deprecated eslintrc configuration option requires ESLint v8 for CI testing and this version has been in end-of-life status since Oct 5, 2024. This setup is not sustainable in the long term.

Deprecation was already announced in the plugins documentation ESLINTRC-CONFIG.md > Deprecations with [email protected] on Oct 30, 2024.

This means that users have had more than one year to become acquainted with flat configurations, and have had more than 6 months deprecation notice specifically for this plugin.

Change

  • The default configuration eslint-plugin-cypress now resolves to the flat configuration instead of to the legacy configuration

  • The explicit flat configuration eslint-plugin-cypress/flat continues to resolve to the flat configuration. Since it is however now the default, it becomes redundant to explictly add /flat. It therefore becomes deprecated and documentation states that it is planned for removal in a future major version.

  • The legacy.js export which provided deprecated legacy rules and cypress/recommended is removed

  • The directory tests-legacy containing rule testing for eslintrc configurations is removed. Corresponding Jest tests and configs are also removed.

  • In the circle.yml workflow

    • tests run in the CircleCI convenience image cimg/node:22.16.0 corresponding to the active Node.js LTS version
    • the test-v8 job is removed
    • configurations for the test-project are updated to use eslint-plugin-cypress instead of eslint-plugin-cypress/flat
    • a default-deprecation configuration is added to test eslint-plugin-cypress/flat
  • .node-version and .nvmrc are updated to Node.js 22.16.0.

  • Rules in lib/flat.js are alphabetically sorted for better maintainability.

  • Documentation is updated:

  • globals is updated from 15.15.0 to 16.2.0 (current latest)

  • semantic-release is updated from 24.2.3 to 24.2.5 (current latest)

@cypress-app-bot
Copy link

@MikeMcC399

This comment was marked as resolved.

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented May 28, 2025

ci/circleci: test-v8 needs to be removed as a required job, since it has been removed from the circle.yml workflow

@MikeMcC399

This comment was marked as outdated.

BREAKING CHANGE: Drop legacy configuration support

Support for non-flat legacy configurations is removed
eslint-plugin-cypress/flat is deprecated and replaced by
eslint-plugin-cypress
globals is updated to 16.2.0
semantic-release is update to 24.2.5
@MikeMcC399 MikeMcC399 force-pushed the remove/legacy-config branch from eee34b2 to 5a55560 Compare May 29, 2025 06:06
@MikeMcC399 MikeMcC399 marked this pull request as ready for review May 29, 2025 06:10
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do so love deleting code. Breaking change semantic commit looks good. Changes look good. I removed the v8 status check. Good with deprecation of /flat

@jennifer-shehane jennifer-shehane merged commit 618bd21 into cypress-io:master May 29, 2025
10 checks passed
@jennifer-shehane
Copy link
Member

🎉 This PR is included in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@MikeMcC399
Copy link
Collaborator Author

@jennifer-shehane

I do so love deleting code.

😁 The legacy code wasn't maintainable anymore, so it was definitely good to be able to delete it. I did check on Discord with the ESLint folks about the general timing of removing support for legacy configs and they also thought it was OK now.

Breaking change semantic commit looks good. Changes look good. I removed the v8 status check. Good with deprecation of /flat

Thanks for removing the status check!

If you are able to edit out "simplify import text explanation" from the release notes, that would be clearer, as this was just an afterthought to the README document edit and shouldn't be highlighted.

image

@MikeMcC399 MikeMcC399 deleted the remove/legacy-config branch May 29, 2025 15:09
@jennifer-shehane
Copy link
Member

@MikeMcC399 I updated the release log: https://github.com/cypress-io/eslint-plugin-cypress/releases/tag/v5.0.0

@MikeMcC399
Copy link
Collaborator Author

@jennifer-shehane

I updated the release log: https://github.com/cypress-io/eslint-plugin-cypress/releases/tag/v5.0.0

Thanks! That looks much better now!

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

Successfully merging this pull request may close these issues.

Drop legacy config support
3 participants