-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
123 lines (104 loc) · 3.53 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
module.exports = {
plugins: ['@ianvs/prettier-plugin-sort-imports'],
/**
* https://prettier.io/docs/en/options.html#print-width
* Specify the line length that the printer will wrap on.
*/
printWidth: 120,
/**
* https://prettier.io/docs/en/options.html#tab-width
* Specify the number of spaces per indentation-level.
*/
tabWidth: 4,
/**
* https://prettier.io/docs/en/options.html#tabs
* Indent lines with tabs instead of spaces.
*/
useTabs: false,
/**
* https://prettier.io/docs/en/options.html#semicolons
* Print semicolons at the ends of statements.
*/
semi: true,
/**
* https://prettier.io/docs/en/options.html#quotes
* Use single quotes instead of double quotes.
*/
singleQuote: true,
/**
* https://prettier.io/docs/en/options.html#quote-props
* Change when properties in objects are quoted.
*/
quoteProps: 'consistent',
/**
* https://prettier.io/docs/en/options.html#jsx-quotes
* Use single quotes instead of double quotes in JSX.
*/
jsxSingleQuote: false,
/**
* https://prettier.io/docs/en/options.html#trailing-commas
* Print trailing commas wherever possible in multi-line comma-separated syntactic structures. (A single-line array, for example, never gets trailing commas.)
*/
trailingComma: 'es5',
/**
* https://prettier.io/docs/en/options.html#bracket-spacing
* Print spaces between brackets in object literals.
*/
bracketSpacing: true,
/**
* https://prettier.io/docs/en/options.html#bracket-line
* Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
*/
bracketSameLine: true,
/**
* https://prettier.io/docs/en/options.html#arrow-function-parentheses
* Include parentheses around a sole arrow function parameter.
*/
arrowParens: 'always',
/**
* https://prettier.io/docs/en/options.html#html-whitespace-sensitivity
* Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars. See whitespace-sensitive formatting for more info.
*/
htmlWhitespaceSensitivity: 'strict',
/**
* https://prettier.io/docs/en/options.html#vue-files-script-and-style-tags-indentation
* Whether or not to indent the code inside <script> and <style> tags in Vue files.
*/
vueIndentScriptAndStyle: true,
/**
* https://prettier.io/docs/en/options.html#end-of-line
*/
endOfLine: 'lf',
/**
* https://prettier.io/docs/en/options.html#embedded-language-formatting
* Control whether Prettier formats quoted code embedded in the file.
*/
embeddedLanguageFormatting: 'auto',
/**
* https://prettier.io/docs/en/options.html#single-attribute-per-line
* Enforce single attribute per line in HTML, Vue and JSX.
*/
singleAttributePerLine: true,
/**
* https://github.com/IanVS/prettier-plugin-sort-imports#importorder
*/
importOrder: ['<THIRD_PARTY_MODULES>', '^[./]'],
/**
* https://github.com/IanVS/prettier-plugin-sort-imports#importorderparserplugins
*/
importOrderParserPlugins: ['typescript', 'jsx', 'decorators'],
overrides: [
{
files: '*.yml',
options: {
tabWidth: 2,
},
},
{
files: '*.json',
options: {
tabWidth: 2,
},
},
],
};