Skip to content

Comment on the futility of directly copying configs in generated ESLint configs #301

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

🚀 Feature Request

Now that this has been out in the wild before, a vague feeling of mine that auto-generated configs are inferior to starting from scratch has become a firm belief. I now recommend to people the following system:

  1. Start from scratch with typescript-eslint's recommended and recommend-requiring-type-checking rulesets
  2. Add a section to your config's 'rules' listing containing all rules you disabled because you don't want them
  3. Add a section to your config's 'rules' listing containing all rules that have any new errors, then file a ticket/issue/whatever-your-JIRA-equivalent-uses to enable each of them
  4. Repeat for any community rulesets you find that appeal to you - e.g. React-specific ESLint rules.

(see also #2 for recommending best practices around Prettier)

Existing Behavior

Generated configs and documentation contain no such comments, and so are implied to be best practice.

Change Proposal

Two things:

  1. Recommend this approach in the README.md
  2. Add comments on top of generated ESLint configs that mention them as auto-generated and inferior

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions