-
Notifications
You must be signed in to change notification settings - Fork 0
/
prettier.config.cjs
53 lines (51 loc) · 1.29 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
52
53
/** @typedef {import("@ianvs/prettier-plugin-sort-imports").PluginConfig} SortImportsConfig */
/** @typedef {import("prettier").Config} PrettierConfig */
/** @type {PrettierConfig | SortImportsConfig} */
const config = {
semi: true,
tabWidth: 2,
printWidth: 80,
useTabs: false,
endOfLine: "lf",
singleQuote: false,
trailingComma: "none",
arrowParens: "always",
bracketSameLine: false,
// ====================
importOrder: [
"^(react/(.*)$)|^(react$)",
"",
"^(next/(.*)$)|^(next$)",
"",
"<TYPES>",
"<TYPES>^[./]",
"<THIRD_PARTY_MODULES>",
"",
"^types$",
"^~/env(.*)$",
"^~/types/(.*)$",
"^~/utils/(.*)$",
"",
"^~/server/config/(.*)$",
"^~/server/(.*)$",
"^~/data/(.*)$",
"",
"^~/layout/primitives/(.*)$",
"^~/layout/(.*)$",
"^~/styles/(.*)$",
"^~/tests/(.*)$",
"^~/app/(.*)$",
"",
"^[./]",
"",
],
importOrderTypeScriptVersion: "5.1.6",
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
// ==================================================================
plugins: [
require.resolve("@ianvs/prettier-plugin-sort-imports"),
require.resolve("prettier-plugin-packagejson"),
require.resolve("prettier-plugin-tailwindcss"),
],
};
module.exports = config;