forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prettier.config.js
19 lines (18 loc) · 839 Bytes
/
prettier.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const baseConfig = require('@sourcegraph/prettierrc')
module.exports = {
...baseConfig,
plugins: [...(baseConfig.plugins || []), '@ianvs/prettier-plugin-sort-imports'],
importOrder: [
'^react$',
'<THIRD_PARTY_MODULES>', // Note: Any unmatched modules will be placed here
'^@sourcegraph/(.*)$', // Any internal module
'^\\$.*$', // Svelte imports
'^(?!.*.s?css$)(?!\\.\\/)(\\.\\.\\/.*$|\\.\\.$)', // Matches parent directory paths, e.g. "../Foo", or "../../Foo". or ".."
'^(?!.*.s?css$)(\\.\\/.*$|\\.$)', // Matches sibling directory paths, e.g. "./Foo" or ".",
'.*\\.s?css$', // SCSS imports. Note: This must be last to ensure predictable styling.
],
importOrderSeparation: true,
importOrderMergeDuplicateImports: true,
importOrderBuiltinModulesToTop: true,
importOrderCaseInsensitive: true,
}