-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.prettierrc.cjs
43 lines (43 loc) · 1.07 KB
/
.prettierrc.cjs
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
module.exports = {
singleQuote: true,
trailingComma: 'all',
printWidth: 100,
proseWrap: 'never',
endOfLine: 'lf',
plugins: [
'prettier-plugin-packagejson',
'./scripts/prettierWatchConfigPlugin.cjs', //
],
overrides: [
{
files: '*.md',
options: {
// Never automatically format embedded code
embeddedLanguageFormatting: 'off',
// fix table's style in markdown
proseWrap: 'preserve',
},
},
{
files: 'scripts/**/*.ts',
options: {
plugins: ['@ianvs/prettier-plugin-sort-imports'],
importOrder: [
'<BUILTIN_MODULES>', // Node.js built-in modules
'<THIRD_PARTY_MODULES>', // Imports not matched by other special words or groups.
'@package-json',
'^@(/.*)$', // aliases
'^[.]', // relative imports
],
},
},
{
files: 'docs/**/*.config.json',
options: {
printWidth: 0, // to always have new lines
plugins: ['prettier-plugin-sort-json'],
jsonRecursiveSort: true,
},
},
],
};