Introduction
Standard is a JavaScript style guide, linter, and formatter that requires zero configuration. It enforces a consistent coding style across your project by bundling ESLint with a curated set of rules, removing the need to maintain .eslintrc files or debate formatting choices in code reviews.
What Standard Does
- Lints JavaScript and TypeScript files against a fixed set of style rules
- Automatically fixes most style violations with the
--fixflag - Catches common bugs like unused variables, missing semicolons in dangerous positions, and accidental globals
- Integrates with editors via LSP for real-time feedback
- Works as a pre-commit hook or CI check with zero setup
Architecture Overview
Standard wraps ESLint internally with a locked-down configuration that cannot be overridden per-project. This opinionated approach means every Standard-using project shares identical style rules. The tool parses JavaScript using ESLint's AST parser and applies its rule set in a single pass, reporting violations to stdout in a human-readable format.
Self-Hosting & Configuration
- Install via npm globally or as a dev dependency in your project
- No config files needed — Standard works immediately after install
- Add
"standard": "*"to package.json for editor integration hints - Use
standard --env mochato add environment-specific globals - Pair with
lint-stagedandhuskyfor automatic pre-commit linting
Key Features
- Truly zero-configuration — no
.eslintrc, no.prettierrc - Catches real bugs alongside style issues
- Supports JSX and TypeScript via plugins
- One command for both linting and fixing
- Used by thousands of packages on npm for consistent open-source style
Comparison with Similar Tools
- ESLint — Standard uses ESLint internally but removes all configuration complexity
- Prettier — Prettier handles formatting only; Standard catches logic bugs too
- Biome — Biome is faster (Rust-based) but requires some configuration decisions
- XO — Similar zero-config approach but with more customization options
- Rome (archived) — Was an all-in-one toolchain; Standard focuses purely on style enforcement
FAQ
Q: Can I override specific rules? A: No. Standard is intentionally non-configurable to eliminate style debates. If you need custom rules, use ESLint directly.
Q: Does Standard support TypeScript?
A: Yes. Use ts-standard or configure the TypeScript parser to lint .ts files with the same zero-config philosophy.
Q: How does Standard differ from Prettier? A: Prettier only reformats code. Standard also catches bugs (unused vars, accidental globals) and enforces semantic patterns beyond whitespace.
Q: Is Standard still actively maintained? A: Yes. Standard tracks ESLint updates and continues to receive releases with rule improvements.