-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
/
prettier.config.js
60 lines (56 loc) · 1.32 KB
/
prettier.config.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
export default {
printWidth: 100,
tabWidth: 2,
bracketSpacing: true,
trailingComma: 'es5',
singleQuote: true,
arrowParens: 'always',
overrides: [
{
files: '*.html',
options: { parser: 'babel' },
},
{
files: '*.component.html',
options: { parser: 'angular' },
},
{
files: ['**/frameworks/angular/src/**/*.ts', '**/frameworks/angular/template/**/*.ts'],
options: { parser: 'babel-ts' },
},
{
files: ['*.md', '*.mdx'],
options: {
importOrderSeparation: false,
importOrderSortSpecifiers: false,
},
},
],
plugins: [
'@trivago/prettier-plugin-sort-imports',
'prettier-plugin-brace-style',
'prettier-plugin-curly',
'prettier-plugin-jsdoc',
'prettier-plugin-css-order',
'prettier-plugin-merge',
],
// @trivago/prettier-plugin-sort-imports
importOrder: [
'^node:',
'^(vitest|@testing-library)',
'^react(-dom(/client)?(/server)?)?$',
'^storybook/internal',
'^@storybook/[^-]*$',
'^@storybook/(?!addon-)(.*)$',
'^@storybook/addon-(.*)$',
'<THIRD_PARTY_MODULES>',
'^[./]',
],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
// prettier-plugin-jsdoc
jsdocPreferCodeFences: true,
tsdoc: true,
// prettier-plugin-brace-style
braceStyle: '1tbs',
};