-
Notifications
You must be signed in to change notification settings - Fork 12
/
prettier.config.mjs
60 lines (58 loc) · 1.24 KB
/
prettier.config.mjs
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
53
54
55
56
57
58
59
60
// @ts-check
/**
* @see https://prettier.io/docs/en/configuration.html
* @type {import("prettier").Config}
*/
export default {
arrowParens: 'always',
bracketSameLine: false,
bracketSpacing: true,
embeddedLanguageFormatting: 'auto',
endOfLine: 'lf',
htmlWhitespaceSensitivity: 'css',
insertPragma: false,
jsxSingleQuote: true,
printWidth: 100,
proseWrap: 'preserve',
quoteProps: 'as-needed',
requirePragma: false,
semi: false,
singleAttributePerLine: false,
singleQuote: true,
tabWidth: 2,
trailingComma: 'none',
useTabs: false,
vueIndentScriptAndStyle: false,
// Prettier plugins
plugins: [
'prettier-plugin-astro',
'prettier-plugin-tailwindcss',
'@ianvs/prettier-plugin-sort-imports'
],
importOrder: [
'^(astro$)|^(astro/(:*)$)',
'^@astrojs/.*$',
'<THIRD_PARTY_MODULES>',
'',
'^@/types/(.*)$',
'^@/layout/(.*)$',
'^@/pages/(.*)$',
'^@/components/(.*)$',
'^@/utils$',
'^@/utils/(.*)$',
'^@/plugins/(.*)$',
'^@/assets/(.*)$',
'^@/site-config$',
'',
'^[./]'
],
importOrderParserPlugins: ['astro', 'typescript', 'jsx', 'decorators-legacy'],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro'
}
}
]
}