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.

Proposal: 'eslint:all' preset should not include deprecated rules

See original GitHub issue

The 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:

  1. It adds deprecated information into the meta property of rules.
  2. eslint:all checks the meta.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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ilyavolodincommented, Jul 22, 2016

Yes, because we said right from the start that eslint:all will not be subject to semantic versioning, while eslint:recommended is. So we will remove deprecated rules from eslint:recommended with a next major release, but we can remove them from eslint:all at any time.

0reactions
albertocommented, Jul 22, 2016

Is it ok to exclude it from eslint:all even if it is enabled in eslint:recommended? I guess yes…

Read more comments on GitHub >

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

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