-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathprettier.config.ts
41 lines (37 loc) · 1002 Bytes
/
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
import { type PluginOptions } from "prettier-plugin-tailwindcss";
import { type PluginConfig } from "@trivago/prettier-plugin-sort-imports";
import { type Config } from "prettier";
const importConfig: PluginConfig = {
importOrder: [
"^@core/(.*)$",
"^@server/(.*)$",
"^@ui/(.*)$",
"~/server/(.*)$",
"~/pages/(.*)$",
"~/components/ui/(.*)$",
"~/(.*)",
"^[./]",
],
importOrderCaseInsensitive: true,
importOrderGroupNamespaceSpecifiers: true,
// importOrderParserPlugins: [],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
};
const tailwindConfig: PluginOptions = {
tailwindConfig: "./tailwind.config.ts",
// tailwindAttributes: [],
// tailwindFunctions: [],
tailwindStylesheet: "./src/styles/globals.css",
};
const config: Config = {
tabWidth: 2,
useTabs: false,
...importConfig,
...tailwindConfig,
plugins: [
"@trivago/prettier-plugin-sort-imports",
"prettier-plugin-tailwindcss",
],
};
export default config;