-
Notifications
You must be signed in to change notification settings - Fork 8
/
.prettierrc.cjs
49 lines (49 loc) · 1022 Bytes
/
.prettierrc.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
45
46
47
48
49
module.exports = {
useTabs: false,
singleQuote: true,
trailingComma: 'all',
printWidth: 100,
tabWidth: 2,
plugins: [
require.resolve('prettier-plugin-svelte'),
require.resolve('./node_modules/prettier-plugin-astro'),
require.resolve('prettier-plugin-tailwindcss'),
require.resolve('@ianvs/prettier-plugin-sort-imports'),
],
// Astro
astroAllowShorthand: false,
overrides: [
{
files: '*.astro',
options: { parser: 'astro' },
},
{
files: '*.svelte',
options: { parser: 'svelte' },
},
],
// Sort Imports
importOrder: [
'^clsx$',
'^react$',
'^next',
'',
'~.*icons',
'',
'.css$',
'',
'^node:',
'<THIRD_PARTY_MODULES>',
'',
'.webp?$',
'.mp4?$',
'',
'^[$]',
'^[../]',
'^(?!.*[.](png|webp|mp4)$)[./].*$',
],
importOrderParserPlugins: ['jsx', 'typescript', 'decorators'],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
importOrderCaseInsensitive: true,
};