-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprettier.config.js
35 lines (33 loc) · 891 Bytes
/
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
/** @typedef { import('prettier').Config } PrettierConfig */
/** @typedef { import('@trivago/prettier-plugin-sort-imports').PluginConfig } SortImportsConfig */
/**
* @type {PrettierConfig & SortImportsConfig}
*/
const prettierConfig = {
plugins: ['@trivago/prettier-plugin-sort-imports'],
// Code style
semi: true,
tabWidth: 4,
printWidth: 100,
endOfLine: 'lf',
singleQuote: true,
jsxSingleQuote: false,
trailingComma: 'none',
arrowParens: 'avoid',
bracketSameLine: false,
// Import sort
importOrder: [
'^react$',
'^[A-z]',
'^@[^/]',
'^@/',
'^\\../',
'^\\./',
'^.+.s?css$',
'^\\u0000.+'
],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy']
};
export default prettierConfig;