-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathprettier.js
48 lines (47 loc) · 1.29 KB
/
prettier.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
/** @type {import("prettier").Options} */
export const config = {
arrowParens: 'always',
bracketSameLine: false,
bracketSpacing: true,
embeddedLanguageFormatting: 'auto',
endOfLine: 'lf',
htmlWhitespaceSensitivity: 'css',
insertPragma: false,
jsxSingleQuote: false,
printWidth: 80,
proseWrap: 'always',
quoteProps: 'as-needed',
requirePragma: false,
semi: false,
singleAttributePerLine: false,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
useTabs: true,
overrides: [
// formatting the package.json with anything other than spaces will cause
// issues when running install...
{
files: ['**/package.json'],
options: {
useTabs: false,
},
},
{
files: ['**/*.mdx'],
options: {
// This stinks, if you don't do this, then an inline component on the
// end of the line will end up wrapping, then the next save Prettier
// will add an extra line break. Super annoying and probably a bug in
// Prettier, but until it's fixed, this is the best we can do.
proseWrap: 'preserve',
htmlWhitespaceSensitivity: 'ignore',
},
},
],
plugins: ['prettier-plugin-tailwindcss'],
tailwindAttributes: ['class', 'className', 'ngClass', '.*[cC]lassName'],
tailwindFunctions: ['clsx', 'cn'],
}
// this is for backward compatibility
export default config