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
reconsider the defaults of eslint config #14588
Comments
We can consider this when we move to flat config. Changing this for eslintrc is likely to break a lot of existing users’ configurations. |
I like @nzakas' idea. Flat config gives us a chance to update defaults in a way that likely reduces migration difficulty. |
agreed. I will update the OP later. |
Oops! It looks like we lost track of this issue. @eslint/eslint-tsc what do we want to do here? This issue will auto-close in 7 days without an update. |
I’ll handle this as I’m working on the new config. |
* Update: Flat config support in Linter (refs #13481) * Update lib/linter/linter.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/linter/linter.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Clean up FlatConfigArray detection * Add back FlatConfigArray import * More flat config tests passing; originals failing * Finish languageOptions features * Make sure to recognize RuleTester-wrapped Espree * Move globals into local file * Normalize ecmaVersion to year on context.languageOptions * Clean up ecmaVersion normalization * Revert parserOptions.ecmaVersion behavior to original * Add more tests * Update defaults for flat config (refs #14588) * More tests passing * Fix wrong ecmaVersion conversion * Duplicated all tests for FlatConfig * Finish languageOptions tests * Settings tests working * Rule context tests working * Options tests working * Directives tests working * reportUnusedDisableDirectives tests working * All original tests passing * Add test to verify lazy loading of rules (fixes #14862) * Fix failing tests * Fix failing browser test * Fix ecmaVersion edge cases * Switch globalReturn to false if sourceType is module * Update Espree and eslint-scope to support sourceType:commonjs * Update lib/linter/linter.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/linter/linter.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Fix processors functionality * Update lib/shared/types.js Co-authored-by: Brandon Mills <btmills@users.noreply.github.com> * Update tests/lib/linter/linter.js Co-authored-by: Brandon Mills <btmills@users.noreply.github.com> * Update tests/lib/linter/linter.js Co-authored-by: Brandon Mills <btmills@users.noreply.github.com> * Update lib/linter/linter.js Co-authored-by: Brandon Mills <btmills@users.noreply.github.com> Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> Co-authored-by: Brandon Mills <btmills@users.noreply.github.com>
Fixed in #15185 |
things has changed since eslint was created in 2013. It is time to reconsider the defaults of eslint config.
I would suggest the changes:
ecmaVersion: 5 => "latest"
we have often got issues like "unexpected token...." just because not config
ecmaVersion
. e.g. False positive: Unexpected token , #11643the change should be good for users & maintainers.
--ext: ".js" => ".js,.mjs,.cjs"
it is a breaking change, but it's very easy to restore the old behaviour
if we agreed to the change, document &
eslint --init
should be updated to reflect the change, too.The text was updated successfully, but these errors were encountered: