Skip to content

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

@mysticatea

Description

@mysticatea

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;
}, {});

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussioncoreRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLint

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions