Skip to content
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

Document behavior and defaults of useFlatConfig across ESLint v8, v9, v10 #1879

Closed
karlhorky opened this issue Jun 19, 2024 · 2 comments · Fixed by #1882
Closed

Document behavior and defaults of useFlatConfig across ESLint v8, v9, v10 #1879

karlhorky opened this issue Jun 19, 2024 · 2 comments · Fixed by #1882
Milestone

Comments

@karlhorky
Copy link
Contributor

karlhorky commented Jun 19, 2024

Thanks for the ESLint VS Code extension - essential tool in both our app development as well as teaching students ❤️

It would be great to get documentation of the eslint.useFlatConfig setting defaults across ESLint v8, v9 and v10, since it appears that the defaults are probably different for different ESLint versions.

(if the defaults are not different for different ESLint versions, then maybe that's a feature request / bug waiting to be reported)

Background

I saw that Enable Flat Config by default (issue #1644) was closed recently by the release of v3.0.10, which sounds great!

However, it was not clear what exactly had changed with the behavior of the extension, so I read through the thread, and encountered some interesting details about potential behavior in v8, v9 and v10, also backed up by the Flat config rollout plans:

This seems like the extension (and the eslint.useFlatConfig setting) will behave differently in v8, v9 and v10:

  • v8: eslint.useFlatConfig defaults to false
  • v9: eslint.useFlatConfig defaults to true
  • v10: eslint.useFlatConfig defaults to true, cannot be overridden to false

Is this an accurate description of the behavior differences of eslint.useFlatConfig on these versions?

I couldn't find any documentation of these divergent behaviors / the setting defaults across versions in the readme.

Migration guide

Another thing that I was thinking about, which may be able to be bundled with the setting docs request above:

What is the upgrade path / migration guide for users who want to use flat config (or who want to opt out of flat config) on ESLint version 8, 9, and 10? Eg:

  1. If a flat config user is on ESLint v9, can they remove the eslint.useFlatConfig config setting altogether, because it defaults to true? (I would expect this)
  2. If a non-flat config user is on ESLint v9, they need to add the eslint.useFlatConfig: false setting, because it defaults to true? (I would also expect this)
  3. etc
@dbaeumer
Copy link
Member

@karlhorky thanks for bringing this up. I added that to the settings documentation.

@karlhorky
Copy link
Contributor Author

Great, thanks for the docs! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants