-
Notifications
You must be signed in to change notification settings - Fork 89
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
Drop or change hard-coded ecmaVersion
#215
Comments
Are you suggesting to drop eslint-plugin-cypress/legacy.js Lines 27 to 30 in 0e835e9
eslint-plugin-cypress/lib/flat.js Lines 29 to 32 in 0e835e9
You say you had some issues. Were you able to override the settings in your local ESlint config? I would definitely be in favor of dropping some backwards-compatible settings and configurations at an appropriate time moving forward. v3.0.0 was a breaking change due to dropping support for ESLint v3, v4, v5 & v6. Apart from that, backwards-compatibility has been maintained. Currently there are still far more downloads of the |
Yes.
Yes.
Yeah, removing it would probably not be backward-compatible, because for some it could be a higher |
I would prefer to drop support for legacy configs completely and to move to the default |
I'm going to suggest removing the I prefer not touching the legacy config though to avoid breaking existing setups, since there is no default for legacy. Users who need a higher version will probably already have an override in their configuration. Users who don't, might get surprised if this is updated. You could however argue either way - to keep or to update. |
Adding |
|
This issue is now resolved in [email protected] as far as flat configurations are concerned. As described in the Flat Usage examples:
Note that since ESLint Deprecated legacy configurationNo change has been made to the deprecated legacy configuration
|
I ran into some issues with the Cypress plugin hard-coding ES2019 to my files, not letting me use BigInt literals, for example.
I don't see any reason why Cypress has to have a particular
ecmaVersion
setting. The new default with ESLint is to useecmaVersion: 'next'
. If the purpose is to be more careful than the default, ensuring projects will err if they try to use too advanced of a feature for their browsers, one can use https://github.com/keithamus/eslint-plugin-escompat which, while it setsecmaVersion
to a recent version (now ES2023), detects the project's browser targets and provides linting errors if too recent of ES features are used.The text was updated successfully, but these errors were encountered: