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. |
|
I think it would be a good idea to include @typescript-eslint in the Phase 3 list. IMO onboarding the project as early as possible is a hard requirement for the workstream. Without ts-eslint's onboarding the majority of ESLint users won't able to transition to flat configs without needing to use the compatibility tooling. For reference - by weekly download volume It would be a real shame if most users' first experience with new config system involves reaching for the compatibility APIs. Making sure that doesn't happen should be a top priority! Feel free to chat with us (cc @JoshuaKGoldberg and @JamesHenry)! Separately but very related to the above - I'd also suggest including |
|
Could not agree more @bradzacher. The success of tools like Next.js, Jest, Prettier and even Create React App proves that many users want simple tools, they need fast onboarding and prefer opinionated presets. It's great to have a configurable tool, but for majority of users thousands of options are overwhelming. People simply do not have time to dig into nuances, they need a solution. In my opinion, ESLint should provide some dead easy way to kick off a fresh project with all necessary dependencies. Something like |
|
@bradzacher will do. The intent is to use phase 3 to test the ecosystem in general. @kirill-konshin this is off topic for this issue, but you can use |
|
Thanks a lot to @sxzz since eslint-define-config v1.8.0 Flat ESLint Config is officially supported by my plugin 🚀 |
|
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)eslintrcsource files and tests into new GitHub repository@eslint/eslintrc@eslint/eslintrcto npm@eslint/eslintrcCLIEngineto useCascadingConfigArrayFactoryfrom@eslint/eslintrcPhase 2: Implement flat config with
eslintrccompatibilityFlatCompatclass ineslint/eslintrcrepositoryFlatConfigArrayto represent simple configsLinterclass to understandFlatConfigArrayobjectsLinter#defineRuleandLinter#definePluginthrow errors when usingFlatConfigArraycontext.languageOptionsin backwards-compatible way tocontextinLintercontext.parserPathstill works inLinterforFlatConfigArray(for now)FlatRuleTesterto allow rule testing withFlatConfigArrayformatFlatESLintclass to mirrorESLintclass but useeslint.config.jsinsteadcli.jsto search foreslint.config.jsfile and useFlatESLintif found (ESLintif not)--resolve-plugins-relative-to)eslint/eslintrepo to use flat configeslintrccompatibilitycwdwere not found #16413FlatESLintgetRulesMetaForResultsfails on anonymous files when optioncwdis set #16410FlatESLintgetRulesMetaForResultsfails on messages without aruleId#16402baseConfigoption is unused inFlatESLint#16341FlatESLint#16340.eslintignoredoesn't work like.gitignore#16264Phase 3: Compatibility testing
typescript-eslintto switch to new format and ensure it works correctly (pull request)eslint-plugin-importto 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-airbnbto switch to new format and ensure it works correctly (@mdjermanovic)eslint-config-standardto switch to new format and ensure it works correctly (pull request]eslint-plugin-nto switch configs to new format and ensure it works correctly (@mdjermanovic) (pull request)eslint-plugin-vueto switch configs to new format and ensure it works correctly (pull request)eslint-plugin-reactto switch configs to new format and ensure it works correctly (@mdjermanovic) (pull request)FlatCompatPhase 4: General availability (v9.0.0)
eslintrcfileseslint.config.jsis the default and recommended format (link to legacyeslintrcdocs from the same page)Linterto use flat config by defaultESLintclass toLegacyESLintand renameFlatESLinttoESLintRuleTesterclass and renameFlatRuleTestertoRuleTesterapi.jsto export new values forESLintandRuleTestershouldUseFlatConfig()to returntrueexcept ifESLINT_USE_FLAT_CONFIGisfalse.Phase 5: Remove
eslintrc(v10.0.0)context.parserPath,context.parserOptions,context.globalsinLinterconfigTypeconstructor option forLinter; throw error if found.eslint-envconfig comment is usedeslintrcsupporteslintrcdocumentationFlatESLintclassLegacyESLintclassshouldUseFlatConfig()to always returntrueeslintrc🎉The text was updated successfully, but these errors were encountered: