-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Expand file tree
/
Copy pathprettier.config.js
More file actions
52 lines (51 loc) · 1.18 KB
/
prettier.config.js
File metadata and controls
52 lines (51 loc) · 1.18 KB
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
/**
* @type {import("prettier").Config}
*/
const config = {
plugins: ['@prettier/plugin-oxc', '@ianvs/prettier-plugin-sort-imports'],
importOrder: [
// Node.js builtins.
'<BUILTIN_MODULES>',
'',
// Packages. `react` related packages come first.
'^react',
'<THIRD_PARTY_MODULES>',
'',
// Test should be separate from the app
'^(sentry-test|getsentry-test)(/.*|$)',
'',
// Internal packages.
'^(sentry-locale|sentry-images)(/.*|$)',
'',
'^@sentry/scraps(/.*|$)',
'',
'^(app|sentry)(/.*|$)',
'',
// Getsentry packages.
'^(admin|getsentry)(/.*|$)',
'',
// Style imports.
String.raw`^.+\.less$`,
'',
// Parent imports. Put `..` last.
String.raw`^\.\.(?!/?$)`,
String.raw`^\.\./?$`,
'',
// Other relative imports. Put same-folder imports and `.` last.
String.raw`^\./(?=.*/)(?!/?$)`,
String.raw`^\.(?!/?$)`,
String.raw`^\./?$`,
// newline after imports
'',
],
bracketSpacing: false,
bracketSameLine: false,
printWidth: 90,
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
arrowParens: 'avoid',
};
export default config;