-
Notifications
You must be signed in to change notification settings - Fork 0
/
prettier.config.js
45 lines (43 loc) · 1.09 KB
/
prettier.config.js
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
// @ts-check
/**
* Project prettier configuration.
* Another plugin to consider is `prettier-plugin-tailwindcss` if you agree with its more opinionated defaults.
*
* @see https://github.com/withastro/prettier-plugin-astro
* @see https://github.com/tailwindlabs/prettier-plugin-tailwindcss
* @see https://tailwindcss.com/blog/automatic-class-sorting-with-prettier#how-classes-are-sorted
*
* @type {import("prettier").Config}
*/
export default {
singleQuote: true,
trailingComma: 'all',
semi: false,
bracketSpacing: true,
tabWidth: 2,
useTabs: false,
printWidth: 120,
endOfLine: 'lf',
tailwindFunctions: ['clsx', 'cn'],
plugins: [
// uncomment if adding astro
// 'prettier-plugin-astro',
// prettier-plugin-tailwindcss must come last when using alongside other plugins (per its README)
'prettier-plugin-tailwindcss',
],
overrides: [
// uncomment if adding astro
// {
// files: '*.astro',
// options: {
// parser: 'astro',
// },
// },
{
files: '*.css',
options: {
printWidth: 120,
},
},
],
}