Software Craftsmanship

Why I Stopped Using Prettier and What I Use Instead

Why I Stopped Using Prettier and What I Use Instead

Plot twist: Prettier isn't always the answer. 🤯

The Prettier Problem: • Forces one-size-fits-all formatting • Can make code less readable in some cases • Limited configuration options • Sometimes breaks logical grouping • Opinionated about line length in weird ways

Example of Prettier Gone Wrong:

// What you wrote (logical and readable)
const user = {
  name: 'John',
  email: 'john@example.com',
  
  preferences: {
    theme: 'dark',
    notifications: true
  }
}

// What Prettier does
const user = {
  name: "John",
  email: "john@example.com",
  preferences: { theme: "dark", notifications: true },
};

My Current Setup:

ESLint + Custom Rules

{
  "rules": {
    "indent": ["error", 2],
    "quotes": ["error", "single"],
    "semi": ["error", "never"],
    "object-curly-spacing": ["error", "always"]
  }
}

Benefits: • More control over formatting decisions • Can preserve intentional formatting • Better for code that needs logical grouping • Team can agree on specific rules • Doesn't fight against your mental model

When Prettier Still Makes Sense: • Large teams with mixed experience • Open source projects • When consistency > readability • Rapid prototyping • Teams that can't agree on formatting

Alternative Tools:ESLint --fix: More configurable • dprint: Faster, more configurable • Rome/Biome: All-in-one toolchain • Manual formatting: With good conventions

The Real Solution: Code formatting should serve readability, not dogma. Choose tools that help your team write and read code better.

Sometimes the best tool is the one that gets out of your way.

What's your take on code formatting tools? 🛠️

#CodeFormatting#Prettier#ESLint#DeveloperTools#CodeQuality