Proposal: 'eslint:all' preset should not include deprecated rules
See original GitHub issueThe version of ESLint you are using:
- 3.1.1
The problem you want to solve:
We have several accepted issues we will deprecate rules. (#6080, #6586)
We generate eslint:all
preset from rule files automatically, and this would include deprecated rules.
I think eslint:all
preset should not include deprecated rules.
Your take on the correct solution to problem:
- It adds
deprecated
information into themeta
property of rules. eslint:all
checks themeta.deprecated
property.
var enabledRules = ruleFiles.reduce(function(result, filename) {
const ruleId = path.basename(filename, ".js");
if (path.extname(filename) === ".js" && !rules.get(ruleId).meta.deprecated) {
result[ruleId] = "error";
}
return result;
}, {});
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to fix deprecated rules - Sonar Community
The documentation says: Deprecated : The rule should no longer be used because a similar, but more powerful and accurate rule exists. But ......
Read more >Top 5 ESLint plugins for TypeScript development
ESLint is a great tool and has a decent infrastructure for developing your own rules and plugins. In this post, I'm collecting the...
Read more >Tooling - GitLab Docs
Our configuration may be found in the gitlab-eslint-config project. ... We can use the import/no-deprecated rule to deprecate functions using a JSDoc block ......
Read more >Package exports - webpack
Guidelines. Avoid the default export. It's handled differently between tooling. Only use named exports. Never provide different APIs or semantics ...
Read more >eslint | Yarn - Package Manager
A new option to an existing rule that does not result in ESLint reporting more linting errors by default. A new addition to...
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 Free
Top 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
Yes, because we said right from the start that
eslint:all
will not be subject to semantic versioning, whileeslint:recommended
is. So we will remove deprecated rules fromeslint:recommended
with a next major release, but we can remove them fromeslint:all
at any time.Is it ok to exclude it from
eslint:all
even if it is enabled ineslint:recommended
? I guess yes…