Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsJul 28, 2026·3 min de lectura

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.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
StandardJS
Comando de instalación directa
npx -y tokrepo@latest install 393c9f26-8aa2-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con 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

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados