-
Notifications
You must be signed in to change notification settings - Fork 13
/
.prettierrc.js
49 lines (47 loc) · 958 Bytes
/
.prettierrc.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
const config = require('@1stg/config');
const { iniRcFiles, jsoncFiles, nonJsonRcFiles, shRcFiles } = config;
/**
* @type {import('prettier').Config}
*/
module.exports = {
arrowParens: 'avoid',
semi: true,
singleAttributePerLine: true,
singleQuote: true,
trailingComma: 'all',
xmlWhitespaceSensitivity: 'ignore',
svelteIndentScriptAndStyle: false, // align with default option of `vueIndentScriptAndStyle`
overrides: [
{
files: iniRcFiles,
options: {
parser: 'ini',
},
},
{
files: jsoncFiles,
options: {
parser: 'json',
},
},
{
files: ['.*rc', '*.json'],
excludeFiles: [...nonJsonRcFiles, ...jsoncFiles],
options: {
parser: 'json-stringify',
},
},
{
files: shRcFiles,
options: {
parser: 'sh',
},
},
{
files: '*.html',
options: {
parser: 'angular',
},
},
],
};