Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMay 16, 2026·3 min de lecture

Standard — Zero-Config JavaScript Style Guide and Linter

Standard is an opinionated JavaScript linter and formatter that enforces consistent code style with no configuration required, catching bugs and eliminating style debates.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Standard JS
Commande CLI universelle
npx tokrepo install e01dd26c-5165-11f1-9bc6-00163e2b0d79

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 --fix flag
  • 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 mocha to add environment-specific globals
  • Pair with lint-staged and husky for 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.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires