Skip to main content

Rule Deprecations, Renames, And Deletions

Sometimes a rule that used to be 👍 does not age well and becomes 👎. In the past, these cases have included:

  • Overly opinionated and/or stylistic rules that don't represent a universal best practice
  • Renames
  • Rules moved to an external plugin

In these cases, we aim to remove the old rule with minimal user disruption.

Filing the Issue

Rule deprecations and renames can be filed as a new issue bypassing templates.

Provide it an ## Overview containing:

  • The rule name & link to its documentation page
  • A clear explanation of why you believe it should be deprecated and/or renamed
  • Whether it exists in popular configs such as eslint-config-airbnb-typescript and eslint-config-standard-with-typescript
  • Sourcegraph queries showing how often it appears in user configs

See #6036 for examples of those links and queries.

Timeline

  1. In any minor/patch version, add rule meta properties:
    • deprecated: true
    • replacedBy, if applicable
  2. Search through open issues and PRs, and update the name in them accordingly:
    • Deletions: close them with a link to the issue and deprecation PR
    • Renames: update their title and explicitly mention in a comment that the rule has been renamed
  3. In the next major version, you may delete the deprecated rule
    • Leave a documentation page as a tombstone pointing to the new relevant rule or docs (see camelcase as an example)