Skip to content

フォーマッター&コード

JavaScript / TypeScript フォーマッター

無料のJavaScriptおよびTypeScriptフォーマッターです。Prettierのデフォルトルールがブラウザ内で完全に実行されます。型アノテーションからTypeScriptを自動検出します。貼り付け、クリック、コピーで完了です。

Runs in your browser
JavaScript / TypeScript formatter & validator
lines: 0chars: 0size: 0 B
JavaScript / TypeScript · UTF-8 · 2-space indent

編集者注

Understanding · JS, set to a house style.

この詳細な解説章は現在、英語版のみで提供されています。上の変換ツールはあなたの言語で動作しますが、長文の解説記事はまだ翻訳されていません。

よくある質問

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.

他の人はこちらも検索しています

関連ツール

More in this room.

すべて表示 フォーマッター&コード