forked from ScootKit/CustomDCBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
226 lines (224 loc) · 9.69 KB
/
Copy patheslint.config.js
File metadata and controls
226 lines (224 loc) · 9.69 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
const globals = require('globals');
const stylistic = require('@stylistic/eslint-plugin');
module.exports = [
{
ignores: ['docs/', 'gen-doc/', 'node_modules/']
},
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 12,
sourceType: 'commonjs',
globals: {
...globals.node,
...globals.commonjs
}
},
plugins: {
'@stylistic': stylistic
},
rules: {
'no-unused-vars': 'error',
'accessor-pairs': 'error',
'array-callback-return': 'error',
'arrow-body-style': 'off',
'block-scoped-var': 'error',
'camelcase': 'error',
'capitalized-comments': 'off',
'class-methods-use-this': 'error',
'complexity': ['error', 75],
'consistent-return': 'off',
'consistent-this': 'error',
'curly': 'off',
'default-case': 'off',
'default-case-last': 'error',
'default-param-last': 'error',
'dot-notation': 'off',
'eqeqeq': 'error',
'func-name-matching': 'error',
'func-names': 'off',
'func-style': ['error', 'declaration'],
'grouped-accessor-pairs': 'error',
'guard-for-in': 'off',
'id-denylist': 'error',
'id-length': 'off',
'id-match': 'error',
'init-declarations': 'off',
'max-classes-per-file': 'error',
'max-depth': 'off',
'max-lines': ['error', {max: 1000, skipComments: true}],
'max-lines-per-function': 'off',
'max-nested-callbacks': 'error',
'max-params': 'off',
'max-statements': 'off',
'new-cap': 'error',
'no-alert': 'error',
'no-array-constructor': 'error',
'no-await-in-loop': 'off',
'no-bitwise': ['error', {int32Hint: true}],
'no-caller': 'error',
'no-console': 'off',
'no-constructor-return': 'error',
'no-continue': 'off',
'no-div-regex': 'error',
'no-duplicate-imports': 'error',
'no-else-return': 'off',
'no-empty-function': 'off',
'no-eq-null': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-label': 'error',
'no-implicit-globals': 'off',
'no-implied-eval': 'error',
'no-inline-comments': 'off',
'no-invalid-this': 'error',
'no-iterator': 'error',
'no-label-var': 'error',
'no-labels': 'error',
'no-lone-blocks': 'error',
'no-lonely-if': 'error',
'no-loop-func': 'off',
'no-loss-of-precision': 'error',
'no-magic-numbers': 'off',
'no-multi-assign': 'error',
'no-multi-str': 'error',
'no-negated-condition': 'off',
'no-nested-ternary': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-nonoctal-decimal-escape': 'error',
'no-octal-escape': 'error',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-promise-executor-return': 'off',
'no-proto': 'error',
'no-restricted-exports': 'error',
'no-restricted-globals': 'error',
'no-restricted-imports': 'error',
'no-restricted-properties': 'error',
'no-restricted-syntax': 'error',
'no-return-assign': 'off',
'no-return-await': 'off',
'no-script-url': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-shadow': ['error', {allow: ['err', 'resolve', 'reject']}],
'no-template-curly-in-string': 'error',
'no-ternary': 'off',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-undefined': 'error',
'no-underscore-dangle': 'error',
'no-unmodified-loop-condition': 'error',
'no-unneeded-ternary': 'error',
'no-unreachable-loop': 'error',
'no-unsafe-optional-chaining': 'error',
'no-unused-expressions': 'error',
'no-use-before-define': 'off',
'no-useless-backreference': 'error',
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-rename': 'error',
'no-useless-return': 'off',
'no-var': 'error',
'no-void': 'error',
'no-warning-comments': 'off',
'object-shorthand': 'off',
'one-var': 'off',
'operator-assignment': ['error', 'never'],
'prefer-arrow-callback': 'off',
'prefer-const': 'error',
'prefer-destructuring': 'off',
'prefer-exponentiation-operator': 'error',
'prefer-named-capture-group': 'error',
'prefer-numeric-literals': 'error',
'prefer-object-spread': 'error',
'prefer-promise-reject-errors': 'off',
'prefer-regex-literals': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'off',
'radix': ['error', 'as-needed'],
'require-atomic-updates': 'off',
'require-await': 'off',
'require-unicode-regexp': 'off',
'sort-imports': 'error',
'sort-keys': 'off',
'sort-vars': 'off',
'strict': ['error', 'never'],
'symbol-description': 'error',
'vars-on-top': 'error',
'yoda': ['error'],
'@stylistic/array-bracket-newline': 'off',
'@stylistic/array-bracket-spacing': ['error', 'never'],
'@stylistic/array-element-newline': 'off',
'@stylistic/arrow-parens': 'off',
'@stylistic/arrow-spacing': ['error', {after: true, before: true}],
'@stylistic/block-spacing': 'off',
'@stylistic/brace-style': ['error', '1tbs', {allowSingleLine: true}],
'@stylistic/comma-dangle': 'error',
'@stylistic/comma-spacing': ['error', {after: true, before: false}],
'@stylistic/comma-style': ['error', 'last'],
'@stylistic/computed-property-spacing': ['error', 'never'],
'@stylistic/dot-location': ['error', 'property'],
'@stylistic/eol-last': 'off',
'@stylistic/function-call-spacing': 'error',
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
'@stylistic/function-paren-newline': 'off',
'@stylistic/generator-star-spacing': 'error',
'@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
'@stylistic/indent': ['error', 4, {SwitchCase: 1}],
'@stylistic/jsx-quotes': 'error',
'@stylistic/key-spacing': 'error',
'@stylistic/keyword-spacing': ['error', {after: true, before: true}],
'@stylistic/line-comment-position': 'off',
'@stylistic/linebreak-style': ['error', 'unix'],
'@stylistic/lines-around-comment': 'error',
'@stylistic/lines-between-class-members': 'error',
'@stylistic/max-len': 'off',
'@stylistic/max-statements-per-line': ['error', {max: 2}],
'@stylistic/multiline-comment-style': 'error',
'@stylistic/new-parens': 'error',
'@stylistic/newline-per-chained-call': 'off',
'@stylistic/no-confusing-arrow': 'error',
'@stylistic/no-extra-parens': 'off',
'@stylistic/no-extra-semi': 'error',
'@stylistic/no-floating-decimal': 'error',
'@stylistic/no-mixed-operators': 'off',
'@stylistic/no-multi-spaces': 'error',
'@stylistic/no-multiple-empty-lines': 'error',
'@stylistic/no-tabs': 'error',
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/no-whitespace-before-property': 'error',
'@stylistic/nonblock-statement-body-position': 'error',
'@stylistic/object-curly-newline': 'error',
'@stylistic/object-curly-spacing': 'off',
'@stylistic/one-var-declaration-per-line': 'off',
'@stylistic/operator-linebreak': 'error',
'@stylistic/padded-blocks': 'off',
'@stylistic/padding-line-between-statements': 'error',
'@stylistic/quote-props': 'off',
'@stylistic/quotes': ['error', 'single', {allowTemplateLiterals: true}],
'@stylistic/rest-spread-spacing': ['error', 'never'],
'@stylistic/semi': 'error',
'@stylistic/semi-spacing': ['error', {after: true, before: false}],
'@stylistic/semi-style': ['error', 'last'],
'@stylistic/space-before-blocks': 'error',
'@stylistic/space-before-function-paren': 'off',
'@stylistic/space-in-parens': 'error',
'@stylistic/space-infix-ops': 'error',
'@stylistic/space-unary-ops': ['error', {nonwords: false, words: true}],
'@stylistic/spaced-comment': ['error', 'always'],
'@stylistic/switch-colon-spacing': 'error',
'@stylistic/template-curly-spacing': ['error', 'never'],
'@stylistic/template-tag-spacing': 'error',
'@stylistic/wrap-iife': 'error',
'@stylistic/wrap-regex': 'error',
'@stylistic/yield-star-spacing': 'error'
}
}
];