Generate prettier config

Create a Prettier configuration for indentation, quotes, wrapping, and line endings.

freeworks offlinenothing uploaded
ToolPrettier Config Generator
Input
Output

How it works

Print width, tab width, semicolon, quote, trailing-comma, bracket, and line-ending choices are serialized as a configuration object. The output defines preferences but does not format files.

  • Prettier defaults favor two spaces and readable wrapping.
  • Explicit values document team deviations.

Worked example

Standard Prettier config
Generate a Prettier config with single quotes and no semicolons
Input
											Print width: 100
Tab width: 2
Use tabs: false
Semi: false
Single quote: true
Trailing comma: all
Bracket spacing: true
Arrow parens: always
End of line: lf
Jsx single quote: false
Format: json
										
Output
												Print width: 100
Tab width: 2
Use tabs: no
Semi: no
Single quote: yes
Trailing comma: all
Bracket spacing: yes
Arrow parens: always
End of line: lf
Jsx single quote: no
											

When to use this

Repository configs, pre-commit hooks, and editor settings create Prettier options.

Edge cases

  • A narrow width wraps text rather than truncating it.
  • Quote preference still escapes characters required by the string.
  • Line-ending changes can create cross-platform diffs.

References