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

config files in readme should not encourage top level config. overrides only. #1983

Open
NullVoxPopuli opened this issue Nov 5, 2023 · 0 comments

Comments

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Nov 5, 2023

tl;dr: without adopting a new file format, we can get people ready by doing suggesting folks do:

// .eslintrc.cjs
module.exports = {
  root: true,
  overrides: [
    /* configs here */
  ]
}

(no top-level config, overrides-only), and that's all there is to it!


Top level configs are problematic.

We can start getting folks used to this style of config by forbidding top level configs and only using overrides in our documentation.
This will make the migration to eslint 9 (or the new config file, which is usable today) easier.

But the key take away is that config files will be overrides-only, dn the future.

Right now, folks can opt in to the eslint9 way entirely, but the ecosystem isn't ready. So only overrides in the classic config is a good stepping stone.

Here are some examples of this:

both of these examples show how we can use the same set of configs for every project -- and with easy escape hatches (overrides).

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

No branches or pull requests

2 participants