-
Notifications
You must be signed in to change notification settings - Fork 37
/
.prettierrc.cjs
38 lines (31 loc) · 1.19 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
/** @type {import('prettier').Config} */
const importSortConfig = {
importOrder: [
// built-ins like `node:fs`
"<TYPES>^(node:)", // type imports
"<BUILT_IN_MODULES>", // imports
"", // a gap
// anything which doesn't match any other rules
"<TYPES>", // type imports
"<THIRD_PARTY_MODULES>", // imports
"", // a gap
// local aliases / packages starting with one of these prefixes
"<TYPES>^(@common|@talisman|@ui|@tests|@extension/core|@extension/shared)(/.*)?$", // type imports
"^(@common|@talisman|@ui|@tests|@extension/core|@extension/shared)(/.*)?$", // imports
"", // a gap
// local `./blah/something` packages
"<TYPES>^[.]", // type imports
"^[.]", // imports
],
// defaults to "1.0.0" - higher versions of typescript unlock more import-sort capabilities
// https://github.com/IanVS/prettier-plugin-sort-imports?tab=readme-ov-file#importordertypescriptversion
importOrderTypeScriptVersion: "5.6.3",
}
/** @type {import('prettier').Config} */
module.exports = {
plugins: ["@ianvs/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"],
...importSortConfig,
printWidth: 100,
quoteProps: "consistent",
semi: false,
}