forked from Krutoy242/Enigmatica2Expert-Extended
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
71 lines (65 loc) · 2.11 KB
/
eslint.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import antfu from '@antfu/eslint-config'
export default antfu({
// typescript: { tsconfigPath: 'tsconfig.json' },
gitignore: false,
rules : {
// Override @antfu rules to my personal prefferences
'style/key-spacing' : ['error', { align: 'colon' }],
'style/no-multi-spaces': 'off',
// 'style/type-annotation-spacing': 'off',
'antfu/if-newline' : 'off',
'style/comma-dangle' : [
'error',
{
functions: 'never',
imports : 'always-multiline',
exports : 'always-multiline',
arrays : 'always-multiline',
objects : 'always-multiline',
},
],
// Lower error levels
'style/max-statements-per-line': 'warn',
// Sort imports
'import/order': 'off',
'sort-imports': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars' : 'error',
'perfectionist/sort-array-includes' : 'error',
'perfectionist/sort-astro-attributes': 'error',
// 'perfectionist/sort-classes' : 'error',
'perfectionist/sort-enums' : 'error',
'perfectionist/sort-exports' : 'error',
'perfectionist/sort-imports' : ['error', {
type : 'natural',
groups: [
'side-effect',
'side-effect-style',
'type',
'builtin',
'external',
'internal-type',
'internal',
['parent-type', 'sibling-type', 'index-type'],
['parent', 'sibling', 'index'],
'object',
'unknown',
],
}],
'perfectionist/sort-interfaces' : 'error',
'perfectionist/sort-jsx-props' : 'error',
'perfectionist/sort-maps' : 'error',
'perfectionist/sort-named-exports' : 'error',
'perfectionist/sort-named-imports' : 'error',
'perfectionist/sort-object-types' : 'error',
// 'perfectionist/sort-objects': 'error',
'perfectionist/sort-svelte-attributes': 'error',
'perfectionist/sort-union-types' : 'error',
'perfectionist/sort-vue-attributes' : 'error',
},
}, {
files: ['**/*.md'],
rules: {
'style/no-trailing-spaces': 'off',
},
})