-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
prettier.config.cjs
51 lines (49 loc) · 1.27 KB
/
prettier.config.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
/** @typedef {import("prettier").Config} PrettierConfig */
/** @typedef {import("prettier-plugin-tailwindcss").PluginOptions} TailwindConfig */
/** @typedef {import("@ianvs/prettier-plugin-sort-imports").PluginConfig} SortImportsConfig */
/** @type { PrettierConfig | SortImportsConfig | TailwindConfig } */
const config = {
trailingComma: "es5",
tabWidth: 2,
semi: true,
singleQuote: false,
printWidth: 80,
plugins: [
require.resolve("@ianvs/prettier-plugin-sort-imports"),
require.resolve("prettier-plugin-tailwindcss"),
],
tailwindConfig: "./tailwind.config.cjs",
tailwindFunctions: ["clsx", "cn", "cva", "twMerge"],
importOrder: [
"^(react/(.*)$)|^(react$)|^(react-native(.*)$)",
"<THIRD_PARTY_MODULES>",
"",
"^@/components/(.*)$",
"",
"^@/lib/hooks/(.*)$",
"^@/lib/context/(.*)$",
"",
"^@/lib/api/(.*)$",
"^@/lib/schemas/(.*)$",
"^@/lib/query/(.*)$",
"",
"^@/routes/(.*)$",
"",
"^@/lib/utils/(.*)$",
"",
"^@/lib/config/(.*)$",
"",
"^@/lib/types/(.*)$",
"",
"^@/(.*)$",
"",
"^[./-]",
"",
"^~/",
"^[../]",
"^[./]",
],
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
importOrderTypeScriptVersion: "4.4.0",
};
module.exports = config;