-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy path.prettierrc.js
More file actions
41 lines (37 loc) · 870 Bytes
/
.prettierrc.js
File metadata and controls
41 lines (37 loc) · 870 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
35
36
37
38
39
40
41
// Rigby Shared Prettier config
module.exports = {
singleQuote: true,
semi: true,
tabWidth: 2,
endOfLine: 'auto',
printWidth: 100,
trailingComma: 'none',
bracketSpacing: true,
bracketSameLine: false,
arrowParens: 'avoid',
quoteProps: 'as-needed',
proseWrap: 'preserve',
// Plugins for import sorting and Tailwind CSS class sorting
plugins: [
"@ianvs/prettier-plugin-sort-imports",
"prettier-plugin-tailwindcss"
],
singleAttributePerLine: true,
// Order for imports
importOrder: [
"<BUILTIN_MODULES>",
"",
"^react$",
"^react-dom$",
"",
"<THIRD_PARTY_MODULES>",
"",
"@/.*",
"",
"^[.]"
],
importOrderParserPlugins: ["typescript", "jsx"],
importOrderTypeScriptVersion: "5.0.0",
// Functions to detect Tailwind classes
tailwindFunctions: ["clsx", "cn", "twmerge", "cva", "tw"]
};