-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.cjs
44 lines (44 loc) · 1.27 KB
/
index.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
module.exports = {
trailingComma: 'all', // default to `all` in v3
printWidth: 100,
singleQuote: true,
arrowParens: 'avoid',
proseWrap: 'always', // printWidth line breaks in md/mdx
overrides: [
{
files: '*.md{,x}',
options: {
semi: false,
trailingComma: 'none',
},
},
{
files: '*.svg',
options: {
parser: 'html',
},
},
],
plugins: [
// for prettifying shellscript, Dockerfile, properties, gitignore, dotenv
require('prettier-plugin-sh'),
// for sort fields in package.json
require('prettier-plugin-pkg'),
// for sorting imports
require('@ianvs/prettier-plugin-sort-imports'),
],
importOrder: [
// React and Next.
'^react(-dom)?$',
'^next(/.*|$)',
// Anything not matched in other groups.
'<THIRD_PARTY_MODULES>',
// Things that start with `@` or digit or underscore.
'^(@|\\d|_)',
// Anything that starts with a dot, or multiple dots, and doesn't have the "other files" extensions.
'^(?=\\.+)(.(?!\\.(graphql|css|png|svg|jpe?g|webp|avif|wasm|mp4|webm)))+$',
// Other files with extensions.
'^.+\\.(graphql|css|png|svg|jpe?g|webp|avif|wasm|mp4|webm)$',
],
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],
};