Why is is prettier used if eslint can format?

This page summarizes the projects mentioned and recommended in the original post on /r/node

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • rustfmt

    Format Rust code

  • There isn't overlap between these concerns (formatting and linting), formatting is syntactic analysis and linting is semantic analysis. There's only overlap because ESLint has some formatting capabilities as well. In modern languages, these are separate tools because they are separate concerns (rustfmt and rust-clippy , gofmt and go vet ).

  • Clippy

    A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/

  • There isn't overlap between these concerns (formatting and linting), formatting is syntactic analysis and linting is semantic analysis. There's only overlap because ESLint has some formatting capabilities as well. In modern languages, these are separate tools because they are separate concerns (rustfmt and rust-clippy , gofmt and go vet ).

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • typescript-eslint

    :sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript

  • From experience, Prettier is simply better at formatting than ESLint, and covers more scenarios while at the same time having less configuration. Less configuration is less bikeshedding you need to do with your teammates. Typically, a tool that specializes on one concern can be more effective than a tool that spans multiple concerns. Take for example, the formatting indent rule for TypeScript ESLint, which is described by the maintainers as indefinitely broken. Prettier does not have this issue, because it is a tool designed for syntactic analysis.

  • eslint-config-canonical

    The most comprehensive ES code style guide.

  • For anyone would would like to migrate from Prettier to ESLint, https://github.com/gajus/eslint-config-canonical covers everything that Prettier does and a lot (a lot) more.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts