8000 Change Request: Deprecate formatting rules and recommend using a source code formatter · Issue #17522 · eslint/eslint · GitHub
[go: up one dir, main page]

Skip to content
Change Request: Deprecate formatting rules and recommend using a source code formatter #17522
@nzakas

Description

@nzakas

ESLint version

HEAD

What problem do you want to solve?

ESLint has a lot of core rules that simply move whitespace around. After years of maintaining these rules, I personally believe two things:

  1. ESLint is not the right tool for source code formatting. Having each augmentation of whitespace as a separate rule just doesn't scale and forces us to continue to add exceptions and new rules whenever new syntax is added. This type of whitespace management is better handled holistically by source code formatters.
  2. It's getting harder to maintain these rules and people aren't as willing to do so. The indent rule, for example, currently has eight open issues, most of which have been open for over a year. The complexity of this rule alone takes away from the time we can spend on more impactful changes.

What do you think is the correct solution?

I'd like to deprecate all formatting rules (anything that is adjusting whitespace) in v9 and recommend that people use a source code formatter instead. Both Prettier and dprint are viable options that solve the same problems in different ways.

This would free us up from maintaining a large number of core rules and make it easy for us to drop these rules during the rewrite.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

No response

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusioncoreRelates to ESLint's core APIs and featuresdeprecationThis change deprecates an existing featureenhancementThis change enhances an existing feature of ESLint

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0