-
Notifications
You must be signed in to change notification settings - Fork 0
/
prettier.config.cjs
44 lines (42 loc) · 1.02 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
/** @typedef {import("prettier").Config} PrettierConfig */
/** @typedef {import("prettier-plugin-tailwindcss").PluginOptions} TailwindConfig */
/** @typedef {import("prettier-plugin-astro").PluginOptions} AstroConfig */
/** @typedef {import("@ianvs/prettier-plugin-sort-imports").PrettierConfig} SortImportsConfig */
/** @type { PrettierConfig | TailwindConfig | AstroConfig | SortImportsConfig } */
const config = {
printWidth: 80,
semi: true,
singleQuote: false,
tabWidth: 2,
useTabs: true,
plugins: [
require.resolve("prettier-plugin-astro"),
require.resolve("@ianvs/prettier-plugin-sort-imports"),
require.resolve("prettier-plugin-tailwindcss") /* Must come last */,
],
overrides: [
{
files: "**/*astro",
options: {
parser: "astro",
},
},
],
importOrder: [
"^(astro/(.*)$)|^(astro$)|^(astro:(.*)$)",
"<THIRD_PARTY_MODULES>",
"",
"^@/components/(.*)$",
"",
"^@/layouts/(.*)$",
"",
"^@/utils/(.*)$",
"",
"^@/(.*)$",
"",
"^~/",
"^[../]",
"^[./]",
],
};
module.exports = config;