Skip to content

[Code health] Separate linting and formatting #2329

@gino-m

Description

@gino-m

eslint and prettier currently run together, but this is not recommended:

Efficiency and Speed: Purpose-built formatters are faster because they are architecturally simpler than linters, which often perform more complex static analysis.

Consistency and Reliability: Dedicated formatters offer much more consistent results and fewer edge-case problems than using lint rules for formatting.

Clearer Focus: Separating the concerns allows each tool to excel at its specific job. This also means fewer configuration conflicts between tools.

Better Workflow:
Running the formatter first can prevent linters from reporting "false positives," such as a line being too long before formatting, which would be resolved by the formatter anyway.

The linter reports the correct line numbers for issues when run after formatting, as the file composition won't change after linting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: code healthImprovements to readability or robustness of codebase

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions