Formateadores y código
Formateador de JavaScript / TypeScript
Formateador gratuito de JavaScript y TypeScript. Reglas predeterminadas de Prettier, ejecutadas completamente en el navegador — detecta TypeScript automáticamente a partir de anotaciones de tipo. Pega, haz clic, copia.
Nota del editor
Understanding · JS, set to a house style.
Este capítulo en profundidad está disponible solo en inglés por el momento. La herramienta de conversión de arriba funciona en tu idioma; el artículo explicativo extenso aún no se ha traducido.
Preguntas frecuentes
Quick answers.
›Does it handle TypeScript?
Yes — the tool auto-detects TypeScript from type annotations (`: string`, `interface Foo`, `type X = ...`) and routes to Prettier's TS parser. You don't have to toggle anything.
›Which Prettier options does it use?
Prettier's out-of-box defaults: 2-space indent, semicolons, double quotes, 80-column print width, trailing commas. These match the vast majority of published codebases.
›Will it change my code's behaviour?
No — Prettier only reformats; it never changes semantics. The output runs identically to the input, byte-for-byte after transpilation.
›Can it minify JavaScript?
No — Prettier is a formatter, not a minifier. For production minification use Terser, esbuild or SWC locally. They produce far smaller output than a whitespace collapser would.
La gente también busca
Herramientas relacionadas
More in this room.
- Formateador y Validador de JSONEmbellece, minifica y valida JSON — gratis, sin registrarse.
- Formateador de SQLEmbellece e indenta consultas SQL feas.
- Formateador y Validador de XMLEmbellece, minifica y valida XML — al instante.
- Formateador de HTMLEmbellece y minifica HTML — valores por defecto de Prettier.
- Formateador de CSSEmbellece y minifica hojas de estilo CSS.
- Formateador YAMLNormaliza la indentación y estructura de YAML.