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

StandardJS — JavaScript Style Guide with Built-In Linter and Auto-Fixer

An opinionated JavaScript style guide, linter, and formatter that requires zero configuration. Catch errors and enforce consistent style across your entire codebase automatically.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
StandardJS
Commande d'installation directe
npx -y tokrepo@latest install 393c9f26-8aa2-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

StandardJS is a JavaScript style guide, linter, and formatter rolled into one tool with zero configuration required. It enforces a consistent coding style across projects by combining a curated set of ESLint rules into a single opinionated package, eliminating debates about code formatting.

What StandardJS Does

  • Lints JavaScript and TypeScript files against a fixed rule set with no .eslintrc needed
  • Auto-fixes formatting issues in place with the --fix flag
  • Integrates with editors like VS Code, Vim, and Sublime for real-time feedback
  • Supports JSX and Flow syntax out of the box
  • Provides a sharable ESLint config (eslint-config-standard) for custom setups

Architecture Overview

StandardJS is built on top of ESLint and bundles a carefully curated set of rules from eslint-config-standard. When you run standard, it invokes ESLint internally with a locked configuration, so there are no config files to manage. The --fix flag delegates to ESLint's auto-fix engine to rewrite code in place.

Self-Hosting & Configuration

  • Install via npm: npm install standard --save-dev
  • Add a lint script to package.json: "scripts": {"lint": "standard"}
  • Use standard --fix in CI pipelines for automatic formatting
  • Ignore specific files with a standard.ignore field in package.json
  • Override globals with standard.globals in package.json when needed

Key Features

  • Zero configuration required to get started
  • Catches common bugs like unused variables and accidental globals
  • Automatic code formatting with --fix
  • Supports modern ES2024+ syntax, JSX, and TypeScript via plugins
  • Used by companies including npm, GitHub, and Brave

Comparison with Similar Tools

  • ESLint — More flexible but requires configuration; StandardJS wraps ESLint with fixed rules
  • Prettier — Focuses only on formatting, not linting; StandardJS does both
  • Biome — Rust-based all-in-one tool; StandardJS is JS-native and ESLint-compatible
  • XO — Similar opinionated linter by Sindre Sorhus; StandardJS has a larger community

FAQ

Q: Can I override specific rules? A: StandardJS is intentionally opinionated and does not support per-rule overrides. If you need customization, use eslint-config-standard directly with ESLint.

Q: Does StandardJS work with TypeScript? A: Yes. Use ts-standard or configure eslint-config-standard-with-typescript for full TypeScript support.

Q: Does it support semicolons? A: StandardJS enforces no-semicolon style by default. If you prefer semicolons, use semistandard instead.

Q: How does it compare in performance to ESLint? A: Performance is equivalent since StandardJS runs ESLint under the hood. The difference is in configuration: StandardJS needs none.

Sources

Fil de discussion

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

Actifs similaires