Open brettz9 opened 1 month ago
@brettz9
Are you suggesting to drop ecmaVersion: 2019
setting for both legacy
and flat
configs?
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 v2.x
plugin compared to the v3.x
plugin, so uptake is slow-moving!
@brettz9
Are you suggesting to drop
ecmaVersion: 2019
setting for bothlegacy
andflat
configs?
Yes.
You say you had some issues. Were you able to override the settings in your local ESlint config?
Yes.
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
v2.x
plugin compared to thev3.x
plugin, so uptake is slow-moving!
Yeah, removing it would probably not be backward-compatible, because for some it could be a higher ecmaVersion
than their default. But setting it higher, e.g., to 2025
may work, but that would depend on their ESLint version supporting that as a value (and would require your periodically updating).
I would prefer to drop support for legacy configs completely and to move to the default ecmaVersion
at some convenient stage so that the plugin is fully aligned with ESLint itself.
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.