eslint-recommended changes in eslint v6.0.0
See original GitHub issueSimilar to previous release, new rules can be added to eslint:recommended
(https://github.com/eslint/eslint#semantic-versioning-policy)
some candidates:
-
require-unicode-regexp
-
no-misleading-character-class
-
no-async-promise-executor
-
require-atomic-updates
-
reconsider rules like
eval
,no-implied-eval
,no-new-func
. (https://github.com/eslint/eslint/issues/9406#issuecomment-335983858) -
no-console
-
no-mixed-spaces-and-tabs
: enable smart-tabs options. -
no-shadow-restricted-names
-
no-prototype-builtins
-
https://github.com/eslint/eslint/issues/11279 (not accepted/implemented yet)
-
no-useless-catch
-
no-with
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Migrating to v6.0.0 - ESLint - Pluggable JavaScript Linter
This guide is intended to walk you through the breaking changes. ... In ESLint v6, eslint:recommended has no effect on non-recommended rules.
Read more >User Guide | eslint-plugin-regexp
ESLint v6.0.0 and above; Node.js v12.x, v14.x and above ... The plugin:regexp/recommended config enables a subset of the rules that should be most...
Read more >ESLint v6.0.0-alpha.2 released - ESLint中文文档
If you're upgrading from ESLint v5.x, we recommend looking at the migration guide, which describes the changes in great detail along with the...
Read more >User Guide | eslint-plugin-vue
ESLint v6.2.0 and above; Node.js v14.17.x, v16.x and above ... such as: // 'eslint:recommended', 'plugin:vue/vue3-recommended', ...
Read more >eslint - npm
An AST-based pattern checker for JavaScript.. Latest version: 8.30.0, last published: 12 days ago. Start using eslint in your project by ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Personally, I’m convinced that
no-prototype-builtins
is worth adding. I suspect a majority ofhasOwnProperty
usages are buggy even if no one has discovered the bug yet, due to the possibility thathasOwnProperty
can be shadowed in user-provided objects. (hasOwnProperty
is only useful for objects where the set of keys isn’t known at development time, and that’s precisely the case where one of the keys could shadowObject.prototype
.)To me, this is a case where developers can either (a) use a terse notation that is occasionally subtlely wrong, or (b) use a more verbose notation that doesn’t have those problems. So my opinion is that always doing (b) is an easy choice, and enforcing against the buggy choice is important for developers who might not be aware of the subtle bug.
It seems like we need a full proposal to decide on. I’ll propose the following:
Add the following rules to
eslint:recommended
:no-misleading-character-class
no-async-promise-executor
require-atomic-updates
no-shadow-restricted-names
no-useless-catch
no-with
no-prototype-builtins
Remove the following rule:
no-console