-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy path.prettierrc.js
More file actions
34 lines (32 loc) · 682 Bytes
/
.prettierrc.js
File metadata and controls
34 lines (32 loc) · 682 Bytes
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
/** Simple logger. */
/* istanbul ignore next: Unnecessary. */
if (!global.log) global.log = console;
/** prettier formatter configuration. */
const config = {
arrowParens: 'always',
bracketSpacing: true,
endOfLine: 'lf',
printWidth: 80,
proseWrap: 'never',
quoteProps: 'as-needed',
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
useTabs: true,
overrides: [
{
files: ['**/*.json', '**/*.yaml', '**/*.yml'],
options: {
useTabs: false,
},
},
],
};
if (typeof require !== 'undefined' && require.main === module) {
// When a script.
log.debug(JSON.stringify(config, null, 2));
} else {
// When a module.
module.exports = config;
}