-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprettier.config.mjs
More file actions
30 lines (28 loc) · 728 Bytes
/
prettier.config.mjs
File metadata and controls
30 lines (28 loc) · 728 Bytes
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
let options = {
trailingComma: 'es5',
tabWidth: 2,
semi: false,
singleQuote: true,
printWidth: 100,
endOfLine: 'lf',
sqlKeywordCase: 'lower',
sqlLiteralCase: 'lower',
sqlTypeCase: 'lower',
plugins: ['prettier-plugin-sql-cst'],
overrides: [
{
files: '**/*.json',
options: { parser: 'json' },
},
],
}
// Disable sorting imports when running a prettier command in CI. This is to make the sorting work in editors
// for easier migration.
if (process.env.SORT_IMPORTS !== 'false') {
options = {
...options,
plugins: [...options.plugins, '@ianvs/prettier-plugin-sort-imports'],
importOrder: ['<THIRD_PARTY_MODULES>', '', '^(@|\\.{1,2})/(.*)$'],
}
}
export default options