-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.ts
More file actions
99 lines (86 loc) · 2.4 KB
/
Copy patheslint.ts
File metadata and controls
99 lines (86 loc) · 2.4 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import antfu from '@antfu/eslint-config'
type Options = Parameters<typeof antfu>[0]
export default (options: Options = {}) => antfu({
linterOptions: {
reportUnusedDisableDirectives: 'error',
},
typescript: {
tsconfigPath: './tsconfig.json',
overridesTypeAware: {
'ts/no-unnecessary-condition': 'error',
'ts/no-floating-promises': 'error',
'ts/no-misused-promises': [
'error',
{
checksVoidReturn: {
attributes: false,
},
},
],
'import/no-deprecated': 'off',
'ts/no-deprecated': 'error',
'ts/await-thenable': 'error',
'ts/return-await': ['error', 'always'],
},
},
stylistic: {
indent: 2,
quotes: 'single',
semi: false,
jsx: true,
overrides: {
'style/quotes': ['error', 'single', {
avoidEscape: true,
}],
},
},
...options,
}, {
name: 'vellone/all',
rules: {
'antfu/top-level-function': 'off',
'jsonc/sort-keys': 'off',
curly: ['error', 'all'],
'style/multiline-ternary': 'off',
'style/jsx-one-expression-per-line': 'off',
'style/comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
dynamicImports: 'always-multiline',
enums: 'always-multiline',
generics: 'always-multiline',
importAttributes: 'always-multiline',
tuples: 'always-multiline',
functions: 'never',
}],
'style/jsx-quotes': ['error', 'prefer-single'],
'style/brace-style': ['error', '1tbs'],
'perfectionist/sort-imports': ['error', {
type: 'unsorted',
}],
'perfectionist/sort-named-imports': 'off',
'node/prefer-global/process': 'off',
'ts/consistent-type-definitions': ['error', 'type'],
'ts/strict-boolean-expressions': 'off',
'ts/array-type': ['error', {
default: 'array-simple',
}],
'ts/no-unused-vars': 'error',
'ts/no-explicit-any': 'error',
'ts/no-inferrable-types': 'error',
'no-redeclare': 'off',
'ts/no-redeclare': 'off',
'ts/consistent-generic-constructors': 'error',
'ts/method-signature-style': ['error', 'property'],
'ts/no-empty-object-type': 'error',
'no-loop-func': 'off',
'ts/no-loop-func': 'error',
'eslint-comments/no-use': ['error', {
allow: [
'eslint-disable-next-line',
],
}],
},
})