Why format code you did not write
Minified bundles put thousands of statements on a single line, which makes diffs, stack traces and quick reading painful. A formatter gives each statement its own line and indents blocks so you can follow the control flow. Pasting a snippet from a bug report, a CDN file or a browser's network tab and formatting it is often the first step in understanding it.
Try the default: function a(b){return b+1} becomes a three-line function with the return statement indented two spaces, ending in a semicolon, with strings in single quotes.
- Indent size: 2 matches most front-end style guides; 4 is common in other ecosystems.
- Semicolons: turn off for no-semicolon style; the formatter adds protective semicolons only where the grammar requires them.
- Quotes: single or double, applied to string literals.