Warn against > 80 columns
This commit is contained in:
1 parent
6f0707a995
commit
801519ec79
1 file changed
+1
-1
@@ -254,7 +254,7 @@ Prettier ships with a handful of customizable format options, usable in both the
|
||||
| Option | Default | CLI override | API override |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **Tabs** - Indent lines with tabs instead of spaces. | `false` | `--use-tabs` | `useTabs: <bool>` |
|
||||
| **Print Width** - Specify the length of line that the printer will wrap on. | `80` | `--print-width <int>` | `printWidth: <int>`
|
||||
| **Print Width** - Specify the length of line that the printer will wrap on.<br /><br /><strong>We strongly recommend against using more than 80 columns</strong>. Prettier works by craming as much content as possible until it reaches the limit, which happens to work well for 80 columns but makes lines that are very crowded. When a bigger column count is used in styleguides, it usually means that code is allowed to go beyond 80 columns, but not to make every single line go there, like prettier would do. | `80` | `--print-width <int>` | `printWidth: <int>`
|
||||
| **Tab Width** - Specify the number of spaces per indentation-level. | `2` | `--tab-width <int>` | `tabWidth: <int>` |
|
||||
| **Quotes** - Use single quotes instead of double quotes. | `false` | `--single-quote` | `singleQuote: <bool>` |
|
||||
| **Trailing Commas** - Print trailing commas wherever possible.<br /><br />Valid options: <br /> - `"none"` - no trailing commas <br /> - `"es5"` - trailing commas where valid in ES5 (objects, arrays, etc) <br /> - `"all"` - trailing commas wherever possible (function arguments) | `"none"` | <code>--trailing-comma <none|es5|all></code> | <code>trailingComma: "<none|es5|all>"</code> |
|
||||
|
||||
Reference in new issue
Block a user