|
| 1 | +module.exports = { |
| 2 | + /** |
| 3 | + * The line length where Prettier will try wrap. |
| 4 | + * Default: `80` |
| 5 | + * |
| 6 | + * See: https://prettier.io/docs/en/options.html#print-width |
| 7 | + */ |
| 8 | + printWidth: 140, |
| 9 | + |
| 10 | + /** |
| 11 | + * Number of spaces per indentation level. |
| 12 | + * Default: `2` |
| 13 | + * |
| 14 | + * See: https://prettier.io/docs/en/options.html#tab-width |
| 15 | + */ |
| 16 | + tabWidth: 4, |
| 17 | + |
| 18 | + /** |
| 19 | + * Indent with tabs instead of spaces. |
| 20 | + * Default: `false` |
| 21 | + * |
| 22 | + * https://prettier.io/docs/en/options.html#tabs |
| 23 | + */ |
| 24 | + useTabs: true, |
| 25 | + |
| 26 | + /** |
| 27 | + * Print semicolons at the ends of statements. |
| 28 | + * default: `true` |
| 29 | + * |
| 30 | + * See: https://prettier.io/docs/options#semicolons |
| 31 | + */ |
| 32 | + semi: true, |
| 33 | + |
| 34 | + /** |
| 35 | + * Use single quotes instead of double quotes. |
| 36 | + * Default: `false` |
| 37 | + * |
| 38 | + * See: https://prettier.io/docs/options#quote-props |
| 39 | + */ |
| 40 | + singleQuote: false, |
| 41 | + |
| 42 | + /** |
| 43 | + * Change when properties in objects are quoted. |
| 44 | + * Default: `"as-needed"` |
| 45 | + * |
| 46 | + * See: https://prettier.io/docs/options#quote-props |
| 47 | + */ |
| 48 | + quoteProps: "as-needed", |
| 49 | + |
| 50 | + /** |
| 51 | + * Print trailing commas wherever possible when multi-line. |
| 52 | + * Default: `"es5"` |
| 53 | + * |
| 54 | + * See: https://prettier.io/docs/en/options.html#trailing-commas |
| 55 | + */ |
| 56 | + trailingComma: "none", |
| 57 | + |
| 58 | + /** |
| 59 | + * Print spaces between brackets. |
| 60 | + * Default: `true` |
| 61 | + * |
| 62 | + * See: https://prettier.io/docs/en/options.html#bracket-spacing |
| 63 | + */ |
| 64 | + bracketSpacing: true, |
| 65 | + |
| 66 | + /** |
| 67 | + * Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being |
| 68 | + * alone on the next line (does not apply to self closing elements). |
| 69 | + * Default: `false` |
| 70 | + * |
| 71 | + * See: https://prettier.io/docs/options#bracket-line |
| 72 | + */ |
| 73 | + bracketSameLine: false, |
| 74 | + |
| 75 | + /** |
| 76 | + * Which end of line characters to apply. |
| 77 | + * Default: `"lf"` |
| 78 | + * |
| 79 | + * See: https://prettier.io/docs/en/options.html#end-of-line |
| 80 | + */ |
| 81 | + endOfLine: "auto", |
| 82 | + |
| 83 | + /** |
| 84 | + * Include parentheses around a sole arrow function parameter. |
| 85 | + * Default: `"always"` |
| 86 | + * |
| 87 | + * See: https://prettier.io/docs/en/options.html#arrow-function-parentheses |
| 88 | + */ |
| 89 | + arrowParens: "always", |
| 90 | + |
| 91 | + /** |
| 92 | + * Control how Prettier formats quoted code embedded in the file. |
| 93 | + * Default: `"auto"` |
| 94 | + * |
| 95 | + * See: https://prettier.io/docs/en/options.html#embedded-language-formatting |
| 96 | + */ |
| 97 | + embeddedLanguageFormatting: "auto", |
| 98 | + |
| 99 | + /** |
| 100 | + * Enforce single attribute per line in HTML, Vue and JSX. |
| 101 | + * Default: `false` |
| 102 | + * |
| 103 | + * Valid options: |
| 104 | + * - `false` - Do not enforce single attribute per line. |
| 105 | + * - `true` - Enforce single attribute per line. |
| 106 | + * |
| 107 | + * See: https://prettier.io/docs/en/options#single-attribute-per-line |
| 108 | + */ |
| 109 | + singleAttributePerLine: false, |
| 110 | + |
| 111 | + overrides: [ |
| 112 | + { |
| 113 | + files: "*.{pcss,scss,css,json,md,yml}", |
| 114 | + options: { |
| 115 | + tabWidth: 2, |
| 116 | + useTabs: false |
| 117 | + } |
| 118 | + }, |
| 119 | + { |
| 120 | + files: "*.html", |
| 121 | + options: { |
| 122 | + parser: "angular" |
| 123 | + } |
| 124 | + } |
| 125 | + ] |
| 126 | +}; |
0 commit comments