question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eslint-recommended changes in eslint v6.0.0

See original GitHub issue

Similar to previous release, new rules can be added to eslint:recommended(https://github.com/eslint/eslint#semantic-versioning-policy)

some candidates:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
not-an-aardvarkcommented, Mar 28, 2019

Personally, I’m convinced that no-prototype-builtins is worth adding. I suspect a majority of hasOwnProperty usages are buggy even if no one has discovered the bug yet, due to the possibility that hasOwnProperty 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 shadow Object.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.

2reactions
not-an-aardvarkcommented, Mar 15, 2019

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
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found