-
Notifications
You must be signed in to change notification settings - Fork 1
/
.prettierrc.cjs
55 lines (53 loc) · 1.76 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
44
45
46
47
48
49
50
51
52
53
54
55
/**
* See documentation for {@link https://prettier.io/docs/en/options.html Prettier Options}.
*/
module.exports = {
/**
* Indent lines with tabs instead of spaces. (Tabs will be used for indentation but Prettier uses spaces to align things, such as in ternaries. This behavior is known as SmartTabs.)
*/
useTabs: false,
/**
* Print trailing commas wherever possible in multi-line comma-separated syntactic structures. (A single-line array, for example, never gets trailing commas.)
*/
trailingComma: 'es5',
/**
* Use single quotes instead of double quotes.
*/
singleQuote: true,
/**
* Use single quotes instead of double quotes in JSX.
*/
jsxSingleQuote: false,
/**
* Print spaces between brackets in object literals.
*/
bracketSpacing: true,
/**
* Print semicolons at the ends of statements.
*/
semi: true,
/**
* Specify the line length that the printer will wrap on. NOTE: Setting a print width of 80 will destructure imports at the top of file. While this is undesirable and can be overriden with `printWidth: 9999`, not having a limited print width will prompt prettier to collapse JSX component props to single-line, which in comparison makes destructured imports lesser of the two evils.
*/
printWidth: 120,
/**
* Include parentheses around a sole arrow function parameter.
*/
arrowParens: 'always',
/**
* See {@link https://github.com/IanVS/prettier-plugin-sort-imports doc}.
*/
importOrder: ['^@[a-zA-Z]+/(.*)$', '^[a-zA-Z-\\/]+$', '^[./]'],
/**
* See {@link https://prettier.io/docs/en/plugins.html Prettier Plugins}.
*/
plugins: ['@ianvs/prettier-plugin-sort-imports'],
overrides: [
{
files: 'package.json',
options: {
useTabs: false,
},
},
],
};