-
Notifications
You must be signed in to change notification settings - Fork 0
/
prettier.config.ts
52 lines (49 loc) · 1.35 KB
/
prettier.config.ts
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
import type { PluginConfig as SortConfig } from "@trivago/prettier-plugin-sort-imports";
import type { Config as BaseConfig } from "prettier";
type Config = BaseConfig & SortConfig;
const config: Config = {
plugins: ["@trivago/prettier-plugin-sort-imports"],
printWidth: 80,
tabWidth: 4,
quoteProps: "consistent",
trailingComma: "all",
importOrder: [
// Sort node built-ins to the top
"^node:",
// Next is any third-party modules, like React.
"<THIRD_PARTY_MODULES>",
// @reactivated namespace
"^@reactivated$",
"^@reactivated/(.*)$",
// @thelabnyc namespace
"^@thelabnyc/(.*)$",
// All repo-local files EXCEPT for stylesheets
"^[./]+(?!.*(.s?css))",
// Lastly, styles.
"^[./](.*)\\.module\\.s?css$",
"^[./](.*)\\.s?css$",
],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
overrides: [
{
files: [
"*.yml",
"*.yaml",
"package.json",
"yarn.lock",
"package-lock.json",
],
options: {
tabWidth: 2,
},
},
{
files: ["*.json"],
options: {
trailingComma: "none",
},
},
],
};
export = config;