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.
Introduce flat configs (blog, doc), required to migrate to ESLint 9 (#342).
Migration guide: https://eslint.org/docs/latest/use/configure/migration-guide
To keep our config compatible with legacy versions, I've created new configs in a separate
flat/
directory.You can see the new usage in the updated README or in the
packages/test/eslint.config.js
files:Notes
I've tried to keep changes minimal, configs in the
flat/
dir are meant to be a simple port.A lot of plugins already expose ways to work with flat configs, I simply followed their doc, for example:
Only the
import
plugin is not fully compatible and I had to disableimport/no-named-as-default
for now.I've been able to reuse the rules in
rules/
by just deleting the deprecated properties:plugins
now moved at the top leveloverrides
is moved as an entry of the flat configChanges
flat/
direslint.config.js
files@eslint/js
andglobal
Refs
env
moved tolanguageOptions
: https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-optionsparser
moved tolanguageOptions
: https://eslint.org/docs/latest/use/configure/migration-guide#custom-parsersSFCC-391