-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Implement Flat Config #13481
Comments
Update: Most of the CLIEngine tests are so tightly coupled to the existing file structure (overriding and stubbing |
I'm going to make one more pass but using a physical file system instead of an in-memory filesystem to see if I can disentangle the tests. If that doesn't work, I'll do a more minimal extraction and move on. |
Any news? |
@mahnunchik you can look at the checklist in the original comment to see the current progress. |
@nzakas now that the new config format has been added in jsx-eslint/eslint-plugin-react#3429, should this checkbox in Phase 3 be checked? |
eslint-plugin-react v7.32.0 has been released, with flat config support - but only less than 12 hours ago. It's probably wise to wait a bit longer to make sure it actually does work correctly :-) |
This comment was marked as off-topic.
This comment was marked as off-topic.
This is a tracking issue and not the best place to ask for help. Please open a discussion instead. |
My intention was to get a chance to help or send PR for some plugins since I already study the code of the flat configs on both Eslint and some plugins. It could be the way to start contribute to the community on the phase 3. Anyway, in that case, you may update somewhere about the concern above whenever Eslint team is ready. |
@CallMeLaNN that's great, we'd appreciate the help...but this is still not the right place for that type of question. Happy to continue in a separate discussion. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Folks - if you have questions about flat config, please open a discussion rather than commenting here. This issue is for tracking purposes only. |
Does |
This issue describes the implementation plan for eslint/rfcs#9, which will take place in several phases:
Phase 1: Extract current config system
eslint/eslintrc
)eslintrc
source files and tests into new GitHub repository@eslint/eslintrc
@eslint/eslintrc
to npm@eslint/eslintrc
CLIEngine
to useCascadingConfigArrayFactory
from@eslint/eslintrc
Phase 2: Implement flat config with
eslintrc
compatibilityFlatCompat
class ineslint/eslintrc
repositoryFlatConfigArray
to represent simple configsLinter
class to understandFlatConfigArray
objectsLinter#defineRule
andLinter#definePlugin
throw errors when usingFlatConfigArray
context.languageOptions
in backwards-compatible way tocontext
inLinter
context.parserPath
still works inLinter
forFlatConfigArray
(for now)FlatRuleTester
to allow rule testing withFlatConfigArray
formatFlatESLint
class to mirrorESLint
class but useeslint.config.js
insteadcli.js
to search foreslint.config.js
file and useFlatESLint
if found (ESLint
if not)--resolve-plugins-relative-to
)eslint/eslint
repo to use flat configeslintrc
compatibilitycwd
were not found #16413FlatESLint
getRulesMetaForResults
fails on anonymous files when optioncwd
is set #16410FlatESLint
getRulesMetaForResults
fails on messages without aruleId
#16402baseConfig
option is unused inFlatESLint
#16341FlatESLint
#16340.eslintignore
doesn't work like.gitignore
#16264Phase 3: Compatibility testing
typescript-eslint
to switch to new format and ensure it works correctly (pull request)eslint-plugin-import
to switch to new format and ensure it works correctly (@mdjermanovic) [Fix] pass languageOptions through in child context import-js/eslint-plugin-import#2829 Support eslint flat config import-js/eslint-plugin-import#2873eslint-config-airbnb
to switch to new format and ensure it works correctly (@mdjermanovic)eslint-config-standard
to switch to new format and ensure it works correctly (pull request]eslint-plugin-n
to switch configs to new format and ensure it works correctly (@mdjermanovic) (pull request)eslint-plugin-vue
to switch configs to new format and ensure it works correctly (pull request)eslint-plugin-react
to switch configs to new format and ensure it works correctly (@mdjermanovic) (pull request)FlatCompat
Phase 4: General availability (v9.0.0)
eslintrc
fileseslint.config.js
is the default and recommended format (link to legacyeslintrc
docs from the same page)Linter
to use flat config by defaultESLint
class toLegacyESLint
and renameFlatESLint
toESLint
RuleTester
class and renameFlatRuleTester
toRuleTester
api.js
to export new values forESLint
andRuleTester
shouldUseFlatConfig()
to returntrue
except ifESLINT_USE_FLAT_CONFIG
isfalse
.Phase 5: Remove
eslintrc
(v10.0.0)context.parserPath
,context.parserOptions
,context.globals
inLinter
configType
constructor option forLinter
; throw error if found.eslint-env
config comment is usedeslintrc
supporteslintrc
documentationFlatESLint
classLegacyESLint
classshouldUseFlatConfig()
to always returntrue
eslintrc
🎉The text was updated successfully, but these errors were encountered: