archive-website icon indicating copy to clipboard operation
archive-website copied to clipboard

Distinguish between formatting and code-quality rules

Open pubmikeb opened this issue 5 years ago • 6 comments

The version of ESLint you are using. 7.2.0

The problem you want to solve. Following the issue https://github.com/eslint/eslint/issues/13348, currently Rules Configuration tool contains a long mixed list of rules, which contains both formatting and code-quality rules all together.

Your take on the correct solution to problem. It's better to separate these rules into two categories:

  • formatting rules
  • code-quality rules

This will simplify the rules management and housekeeping, and will allow easily to delegate code-quality linting to ESLint and rely on Prettier for formatting tasks.

Are you willing to submit a pull request to implement this change? No.

pubmikeb avatar Jun 06 '20 17:06 pubmikeb

Agreed that separating the rules into categories would make the list easier to grok. I think we should group them by the categories in their metadata (similar to https://eslint.org/rules), which should be a fairly simple task!

kaicataldo avatar Jun 06 '20 17:06 kaicataldo

Category in the metadata (https://eslint.org/docs/rules/) is good, but the main idea of this issue is to be able to select all code-quality rules with one click and download the config file withouth reading of metadata of all 100+ rules.

pubmikeb avatar Jun 06 '20 17:06 pubmikeb

I'd like to separate the rules into just three headings: errors, suggestions, and style. Those are already encoded in the rule meta data and I think makes more sense that the category headings we have now.

nzakas avatar Jun 08 '20 17:06 nzakas

@nzakas, great idea, I would also add separation to current (supported) and deprecated rules.

pubmikeb avatar Jun 08 '20 18:06 pubmikeb

Yeah, I think we’d keep deprecated rules as-is, one list of all of them.

nzakas avatar Jun 08 '20 18:06 nzakas

The key idea is to be able to unselect all deprecated rules with one click to not include them into a config.

pubmikeb avatar Jun 08 '20 18:06 pubmikeb