Reconfigure ESLint with flat config #577
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
The pipeline in #543 failed because of this warning:
since we have set the maximum number of allowed warnings to$0$ .
There's a solution: the relatively new flag
--no-warn-ignored
(see my stack overflow answer here). Unfortunately, this flag is only available in the new ESLint flat configuration. Starting with v9, ESLint provides a new flat config format (eslint.config.js
). Also see the configuration migration guide.So, I just published a new version
2.0.0
for theeslint-plugin-erb
adopting the new API. This PR therefore upgrades this plugin and also uses the new flat config.Limitations
cypress
-related ESLint rules for the moment and will hopefully bring them back once the plugin is ready for the new configuration.--ignore-path
was dropped with this PR. I totally agree to this comment and hope they will bring the feature back. For now, we have to live without it. If necessary, more folders will have to be added to theignores
section in theeslint.config.mjs
configuration file. It will be a pain to keep this in sync with the.gitignore
.Reviewers
yarn install
such that the new version of ESLint is installed.