-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
123 lines (123 loc) · 3.48 KB
/
.eslintrc.cjs
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
module.exports = {
root: true,
env: {
es6: true,
node: true
},
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'import'
],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
globalReturn: true
},
project: ['./tsconfig.json'], // Specify it only for TypeScript files
},
rules: {
'@typescript-eslint/ban-types': 'off',
'no-with': 'error',
'no-unexpected-multiline': 'error',
'array-bracket-spacing': [
'error',
'never'
],
'import/no-duplicates': 'error',
'default-param-last': 'error',
'default-case-last': 'warn',
'space-in-parens': [
'error',
'never'
],
'no-unsafe-negation': 'error',
'no-extra-boolean-cast': 'error',
'no-sparse-arrays': 'error',
'no-new-wrappers': 'error',
'no-multiple-empty-lines': [
'error',
{
max: 2,
maxEOF: 1,
maxBOF: 0
}
],
'no-extend-native': 'error',
'no-func-assign': 'error',
'no-unreachable': 'error',
'no-unreachable-loop': 'error',
'no-dupe-args': 'error',
'no-var': 'error',
'no-debugger': 'error',
'no-new-func': 'error',
'no-dupe-keys': 'error',
'getter-return': 'error',
'no-extra-semi': 'error',
'for-direction': 'error',
'arrow-spacing': [
'error',
{
before: true,
after: true
}
],
'brace-style': [
'error',
'1tbs'
],
'use-isnan': 'warn',
'no-caller': 'error',
'no-empty': 'error',
indent: [
'error',
4,
{
SwitchCase: 1
}
],
quotes: [
'error',
'single'
],
semi: [
'error',
'always'
],
yoda: 'error',
'@typescript-eslint/adjacent-overload-signatures': 'warn',
'@typescript-eslint/consistent-type-definitions': [
'error',
'interface'
],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/no-namespace': [
'error',
{
allowDeclarations: true
}
],
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'quote-props': ['error', 'as-needed'],
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: false
}
],
'no-template-curly-in-string': 'error',
'prefer-template': 'error',
'arrow-parens': 'error',
'array-callback-return': 'error',
'constructor-super': 'error',
'no-constructor-return': 'error',
'no-duplicate-case': 'error',
'no-unmodified-loop-condition': 'error',
}
}