-
Notifications
You must be signed in to change notification settings - Fork 7
/
eslint.config.mjs
45 lines (44 loc) · 1.2 KB
/
eslint.config.mjs
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
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
import perfectionist from 'eslint-plugin-perfectionist'
export default createConfigForNuxt({
features: {
tooling: true,
stylistic: true,
},
dirs: {
src: ['./playground'],
},
})
// Workaround for https://github.com/eslint/eslint/issues/19134
.append({
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
},
})
.append({
plugins: {
perfectionist,
},
rules: {
'import/order': 'off',
'perfectionist/sort-exports': ['error', { order: 'asc', type: 'natural' }],
'perfectionist/sort-imports': ['error', {
groups: [
'type',
['parent-type', 'sibling-type', 'index-type'],
'builtin',
'external',
['internal', 'internal-type'],
['parent', 'sibling', 'index'],
'side-effect',
'object',
'unknown',
],
newlinesBetween: 'ignore',
order: 'asc',
type: 'natural',
}],
'perfectionist/sort-named-exports': ['error', { order: 'asc', type: 'natural' }],
'perfectionist/sort-named-imports': ['error', { order: 'asc', type: 'natural' }],
},
})