hkx-eslint-config 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/dist/eslint-config-CV6O12vO.js +707 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3 -0
- package/dist/jsx-a11y-vI7yjRkI.js +94 -0
- package/dist/node-BCedUlu_.js +50 -0
- package/dist/node.d.ts +6 -0
- package/dist/node.js +12 -0
- package/dist/typescript/index.d.ts +6 -0
- package/dist/typescript/index.js +41 -0
- package/dist/typescript/node.d.ts +6 -0
- package/dist/typescript/node.js +23 -0
- package/dist/typescript/vue.d.ts +6 -0
- package/dist/typescript/vue.js +32 -0
- package/dist/typescript-BzyvxM81.js +197 -0
- package/dist/vue.d.ts +6 -0
- package/dist/vue.js +27 -0
- package/package.json +61 -0
package/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
import stylistic from "@stylistic/eslint-plugin";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
import importPlugin from "eslint-plugin-import";
|
|
4
|
+
|
|
5
|
+
//#region rules/base/best-practices.ts
|
|
6
|
+
var best_practices_default = [{
|
|
7
|
+
name: "rules/base/best-practices",
|
|
8
|
+
plugins: { "@stylistic": stylistic },
|
|
9
|
+
rules: {
|
|
10
|
+
"accessor-pairs": "off",
|
|
11
|
+
"array-callback-return": ["error", { allowImplicit: true }],
|
|
12
|
+
"block-scoped-var": "error",
|
|
13
|
+
"class-methods-use-this": ["off", { exceptMethods: [] }],
|
|
14
|
+
complexity: ["off", 10],
|
|
15
|
+
"consistent-return": "off",
|
|
16
|
+
curly: ["error", "multi-line"],
|
|
17
|
+
"default-case": ["warn", { commentPattern: "^no default$" }],
|
|
18
|
+
"dot-notation": ["error", { allowKeywords: true }],
|
|
19
|
+
eqeqeq: [
|
|
20
|
+
"warn",
|
|
21
|
+
"always",
|
|
22
|
+
{ null: "ignore" }
|
|
23
|
+
],
|
|
24
|
+
"guard-for-in": "warn",
|
|
25
|
+
"max-classes-per-file": "off",
|
|
26
|
+
"no-alert": "warn",
|
|
27
|
+
"no-caller": "error",
|
|
28
|
+
"no-case-declarations": "error",
|
|
29
|
+
"no-div-regex": "off",
|
|
30
|
+
"no-else-return": "error",
|
|
31
|
+
"no-empty-function": ["error", { allow: [
|
|
32
|
+
"arrowFunctions",
|
|
33
|
+
"functions",
|
|
34
|
+
"methods"
|
|
35
|
+
] }],
|
|
36
|
+
"no-empty-pattern": "error",
|
|
37
|
+
"no-eq-null": "off",
|
|
38
|
+
"no-eval": "error",
|
|
39
|
+
"no-extend-native": "error",
|
|
40
|
+
"no-extra-bind": "error",
|
|
41
|
+
"no-extra-label": "error",
|
|
42
|
+
"no-fallthrough": "error",
|
|
43
|
+
"no-global-assign": ["error", { exceptions: [] }],
|
|
44
|
+
"no-implicit-coercion": ["off", {
|
|
45
|
+
boolean: false,
|
|
46
|
+
number: true,
|
|
47
|
+
string: true,
|
|
48
|
+
allow: []
|
|
49
|
+
}],
|
|
50
|
+
"no-implicit-globals": "off",
|
|
51
|
+
"no-implied-eval": "error",
|
|
52
|
+
"no-invalid-this": "off",
|
|
53
|
+
"no-iterator": "error",
|
|
54
|
+
"no-labels": ["warn", {
|
|
55
|
+
allowLoop: false,
|
|
56
|
+
allowSwitch: false
|
|
57
|
+
}],
|
|
58
|
+
"no-lone-blocks": "error",
|
|
59
|
+
"no-loop-func": "error",
|
|
60
|
+
"no-magic-numbers": ["off", {
|
|
61
|
+
ignore: [],
|
|
62
|
+
ignoreArrayIndexes: true,
|
|
63
|
+
enforceConst: true,
|
|
64
|
+
detectObjects: false
|
|
65
|
+
}],
|
|
66
|
+
"no-multi-str": "error",
|
|
67
|
+
"no-new": "error",
|
|
68
|
+
"no-new-func": "error",
|
|
69
|
+
"no-new-wrappers": "error",
|
|
70
|
+
"no-octal": "error",
|
|
71
|
+
"no-octal-escape": "error",
|
|
72
|
+
"no-param-reassign": ["warn", {
|
|
73
|
+
props: true,
|
|
74
|
+
ignorePropertyModificationsFor: [
|
|
75
|
+
"acc",
|
|
76
|
+
"e",
|
|
77
|
+
"ctx",
|
|
78
|
+
"draft",
|
|
79
|
+
"req",
|
|
80
|
+
"request",
|
|
81
|
+
"res",
|
|
82
|
+
"response",
|
|
83
|
+
"$scope"
|
|
84
|
+
]
|
|
85
|
+
}],
|
|
86
|
+
"no-proto": "error",
|
|
87
|
+
"no-redeclare": "error",
|
|
88
|
+
"no-restricted-properties": "off",
|
|
89
|
+
"no-return-assign": ["error", "always"],
|
|
90
|
+
"no-script-url": "error",
|
|
91
|
+
"no-self-assign": "error",
|
|
92
|
+
"no-self-compare": "error",
|
|
93
|
+
"no-sequences": "error",
|
|
94
|
+
"no-throw-literal": "warn",
|
|
95
|
+
"no-unmodified-loop-condition": "off",
|
|
96
|
+
"no-unused-expressions": ["error", {
|
|
97
|
+
allowShortCircuit: true,
|
|
98
|
+
allowTernary: true,
|
|
99
|
+
allowTaggedTemplates: true
|
|
100
|
+
}],
|
|
101
|
+
"no-unused-labels": "error",
|
|
102
|
+
"no-useless-call": "off",
|
|
103
|
+
"no-useless-catch": "error",
|
|
104
|
+
"no-useless-concat": "error",
|
|
105
|
+
"no-useless-escape": "error",
|
|
106
|
+
"no-useless-return": "error",
|
|
107
|
+
"no-void": "error",
|
|
108
|
+
"no-warning-comments": ["off", {
|
|
109
|
+
terms: ["todo", "fixme"],
|
|
110
|
+
location: "start"
|
|
111
|
+
}],
|
|
112
|
+
"no-with": "error",
|
|
113
|
+
"prefer-promise-reject-errors": ["warn", { allowEmptyReject: true }],
|
|
114
|
+
radix: "warn",
|
|
115
|
+
"require-await": "off",
|
|
116
|
+
"require-unicode-regexp": "off",
|
|
117
|
+
"vars-on-top": "off",
|
|
118
|
+
yoda: "warn",
|
|
119
|
+
"@stylistic/dot-location": ["error", "property"],
|
|
120
|
+
"@stylistic/no-floating-decimal": "error",
|
|
121
|
+
"@stylistic/no-multi-spaces": ["error", { ignoreEOLComments: false }],
|
|
122
|
+
"@stylistic/wrap-iife": [
|
|
123
|
+
"error",
|
|
124
|
+
"any",
|
|
125
|
+
{ functionPrototypeMethods: false }
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
}];
|
|
129
|
+
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region rules/base/possible-errors.ts
|
|
132
|
+
var possible_errors_default = [{
|
|
133
|
+
name: "rules/base/possible-errors",
|
|
134
|
+
plugins: { "@stylistic": stylistic },
|
|
135
|
+
rules: {
|
|
136
|
+
"for-direction": "error",
|
|
137
|
+
"getter-return": ["error", { allowImplicit: true }],
|
|
138
|
+
"no-async-promise-executor": "error",
|
|
139
|
+
"no-await-in-loop": "warn",
|
|
140
|
+
"no-compare-neg-zero": "error",
|
|
141
|
+
"no-cond-assign": ["error", "always"],
|
|
142
|
+
"no-console": "error",
|
|
143
|
+
"no-constant-condition": "warn",
|
|
144
|
+
"no-control-regex": "off",
|
|
145
|
+
"no-debugger": "error",
|
|
146
|
+
"no-dupe-args": "error",
|
|
147
|
+
"no-dupe-keys": "error",
|
|
148
|
+
"no-duplicate-case": "error",
|
|
149
|
+
"no-empty": "error",
|
|
150
|
+
"no-empty-character-class": "error",
|
|
151
|
+
"no-ex-assign": "error",
|
|
152
|
+
"no-extra-boolean-cast": "error",
|
|
153
|
+
"no-func-assign": "error",
|
|
154
|
+
"no-inner-declarations": "error",
|
|
155
|
+
"no-invalid-regexp": "error",
|
|
156
|
+
"no-irregular-whitespace": "error",
|
|
157
|
+
"no-misleading-character-class": "error",
|
|
158
|
+
"no-obj-calls": "error",
|
|
159
|
+
"no-prototype-builtins": "error",
|
|
160
|
+
"no-regex-spaces": "error",
|
|
161
|
+
"no-sparse-arrays": "error",
|
|
162
|
+
"no-template-curly-in-string": "warn",
|
|
163
|
+
"no-unexpected-multiline": "error",
|
|
164
|
+
"no-unreachable": "error",
|
|
165
|
+
"no-unsafe-finally": "error",
|
|
166
|
+
"no-unsafe-negation": "error",
|
|
167
|
+
"require-atomic-updates": "warn",
|
|
168
|
+
"use-isnan": "error",
|
|
169
|
+
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
170
|
+
"@stylistic/no-extra-parens": [
|
|
171
|
+
"error",
|
|
172
|
+
"all",
|
|
173
|
+
{
|
|
174
|
+
conditionalAssign: true,
|
|
175
|
+
nestedBinaryExpressions: false,
|
|
176
|
+
returnAssign: false,
|
|
177
|
+
ignoreJSX: "all",
|
|
178
|
+
enforceForArrowConditionals: false
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"@stylistic/no-extra-semi": "error"
|
|
182
|
+
}
|
|
183
|
+
}];
|
|
184
|
+
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region rules/base/style.ts
|
|
187
|
+
var style_default = [{
|
|
188
|
+
name: "rules/base/style",
|
|
189
|
+
plugins: { "@stylistic": stylistic },
|
|
190
|
+
rules: {
|
|
191
|
+
"@stylistic/array-bracket-newline": "off",
|
|
192
|
+
"@stylistic/array-bracket-spacing": ["error", "never"],
|
|
193
|
+
"@stylistic/array-element-newline": "off",
|
|
194
|
+
"@stylistic/block-spacing": ["error", "always"],
|
|
195
|
+
"@stylistic/brace-style": [
|
|
196
|
+
"error",
|
|
197
|
+
"1tbs",
|
|
198
|
+
{ allowSingleLine: true }
|
|
199
|
+
],
|
|
200
|
+
"@stylistic/comma-dangle": ["error", "always-multiline"],
|
|
201
|
+
"@stylistic/comma-spacing": ["error", {
|
|
202
|
+
before: false,
|
|
203
|
+
after: true
|
|
204
|
+
}],
|
|
205
|
+
"@stylistic/comma-style": ["error", "last"],
|
|
206
|
+
"@stylistic/computed-property-spacing": ["error", "never"],
|
|
207
|
+
"@stylistic/eol-last": ["warn", "always"],
|
|
208
|
+
"@stylistic/function-call-spacing": ["error", "never"],
|
|
209
|
+
"@stylistic/function-paren-newline": ["error", "consistent"],
|
|
210
|
+
"@stylistic/implicit-arrow-linebreak": ["error", "beside"],
|
|
211
|
+
"@stylistic/indent": [
|
|
212
|
+
"error",
|
|
213
|
+
2,
|
|
214
|
+
{
|
|
215
|
+
SwitchCase: 1,
|
|
216
|
+
VariableDeclarator: 1,
|
|
217
|
+
outerIIFEBody: 1,
|
|
218
|
+
FunctionDeclaration: {
|
|
219
|
+
parameters: 1,
|
|
220
|
+
body: 1
|
|
221
|
+
},
|
|
222
|
+
FunctionExpression: {
|
|
223
|
+
parameters: 1,
|
|
224
|
+
body: 1
|
|
225
|
+
},
|
|
226
|
+
CallExpression: { arguments: 1 },
|
|
227
|
+
ArrayExpression: 1,
|
|
228
|
+
ObjectExpression: 1,
|
|
229
|
+
ImportDeclaration: 1,
|
|
230
|
+
flatTernaryExpressions: false,
|
|
231
|
+
ignoredNodes: [
|
|
232
|
+
"JSXElement",
|
|
233
|
+
"JSXElement > *",
|
|
234
|
+
"JSXAttribute",
|
|
235
|
+
"JSXIdentifier",
|
|
236
|
+
"JSXNamespacedName",
|
|
237
|
+
"JSXMemberExpression",
|
|
238
|
+
"JSXSpreadAttribute",
|
|
239
|
+
"JSXExpressionContainer",
|
|
240
|
+
"JSXOpeningElement",
|
|
241
|
+
"JSXClosingElement",
|
|
242
|
+
"JSXText",
|
|
243
|
+
"JSXEmptyExpression",
|
|
244
|
+
"JSXSpreadChild"
|
|
245
|
+
],
|
|
246
|
+
ignoreComments: false
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"@stylistic/jsx-quotes": ["error", "prefer-double"],
|
|
250
|
+
"@stylistic/key-spacing": ["error", {
|
|
251
|
+
beforeColon: false,
|
|
252
|
+
afterColon: true
|
|
253
|
+
}],
|
|
254
|
+
"@stylistic/keyword-spacing": ["error", {
|
|
255
|
+
before: true,
|
|
256
|
+
after: true,
|
|
257
|
+
overrides: {
|
|
258
|
+
return: { after: true },
|
|
259
|
+
throw: { after: true },
|
|
260
|
+
case: { after: true }
|
|
261
|
+
}
|
|
262
|
+
}],
|
|
263
|
+
"@stylistic/line-comment-position": ["error", {
|
|
264
|
+
position: "above",
|
|
265
|
+
ignorePattern: "",
|
|
266
|
+
applyDefaultIgnorePatterns: true
|
|
267
|
+
}],
|
|
268
|
+
"@stylistic/linebreak-style": ["error", "unix"],
|
|
269
|
+
"@stylistic/lines-between-class-members": [
|
|
270
|
+
"error",
|
|
271
|
+
"always",
|
|
272
|
+
{ exceptAfterSingleLine: false }
|
|
273
|
+
],
|
|
274
|
+
"@stylistic/lines-around-comment": "off",
|
|
275
|
+
"@stylistic/max-len": [
|
|
276
|
+
"warn",
|
|
277
|
+
100,
|
|
278
|
+
2,
|
|
279
|
+
{
|
|
280
|
+
ignoreUrls: true,
|
|
281
|
+
ignoreComments: false,
|
|
282
|
+
ignoreRegExpLiterals: true,
|
|
283
|
+
ignoreStrings: true,
|
|
284
|
+
ignoreTemplateLiterals: true
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"@stylistic/max-statements-per-line": ["warn", { max: 1 }],
|
|
288
|
+
"@stylistic/multiline-comment-style": ["warn", "starred-block"],
|
|
289
|
+
"@stylistic/multiline-ternary": ["error", "never"],
|
|
290
|
+
"@stylistic/new-parens": "error",
|
|
291
|
+
"@stylistic/newline-per-chained-call": ["warn", { ignoreChainWithDepth: 4 }],
|
|
292
|
+
"@stylistic/no-mixed-operators": ["error", {
|
|
293
|
+
groups: [
|
|
294
|
+
["%", "**"],
|
|
295
|
+
["%", "+"],
|
|
296
|
+
["%", "-"],
|
|
297
|
+
["%", "*"],
|
|
298
|
+
["%", "/"],
|
|
299
|
+
["**", "+"],
|
|
300
|
+
["**", "-"],
|
|
301
|
+
["**", "*"],
|
|
302
|
+
["**", "/"],
|
|
303
|
+
[
|
|
304
|
+
"&",
|
|
305
|
+
"|",
|
|
306
|
+
"^",
|
|
307
|
+
"~",
|
|
308
|
+
"<<",
|
|
309
|
+
">>",
|
|
310
|
+
">>>"
|
|
311
|
+
],
|
|
312
|
+
[
|
|
313
|
+
"==",
|
|
314
|
+
"!=",
|
|
315
|
+
"===",
|
|
316
|
+
"!==",
|
|
317
|
+
">",
|
|
318
|
+
">=",
|
|
319
|
+
"<",
|
|
320
|
+
"<="
|
|
321
|
+
],
|
|
322
|
+
["&&", "||"],
|
|
323
|
+
["in", "instanceof"]
|
|
324
|
+
],
|
|
325
|
+
allowSamePrecedence: false
|
|
326
|
+
}],
|
|
327
|
+
"@stylistic/no-mixed-spaces-and-tabs": "error",
|
|
328
|
+
"@stylistic/no-multiple-empty-lines": ["error", {
|
|
329
|
+
max: 2,
|
|
330
|
+
maxEOF: 1
|
|
331
|
+
}],
|
|
332
|
+
"@stylistic/no-tabs": "error",
|
|
333
|
+
"@stylistic/no-trailing-spaces": ["error", {
|
|
334
|
+
skipBlankLines: false,
|
|
335
|
+
ignoreComments: false
|
|
336
|
+
}],
|
|
337
|
+
"@stylistic/no-whitespace-before-property": "error",
|
|
338
|
+
"@stylistic/nonblock-statement-body-position": [
|
|
339
|
+
"error",
|
|
340
|
+
"beside",
|
|
341
|
+
{ overrides: {} }
|
|
342
|
+
],
|
|
343
|
+
"@stylistic/object-curly-newline": "off",
|
|
344
|
+
"@stylistic/object-curly-spacing": ["error", "always"],
|
|
345
|
+
"@stylistic/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
346
|
+
"@stylistic/one-var-declaration-per-line": ["error", "always"],
|
|
347
|
+
"@stylistic/operator-linebreak": "off",
|
|
348
|
+
"@stylistic/padded-blocks": ["warn", {
|
|
349
|
+
blocks: "never",
|
|
350
|
+
classes: "never",
|
|
351
|
+
switches: "never"
|
|
352
|
+
}],
|
|
353
|
+
"@stylistic/padding-line-between-statements": "off",
|
|
354
|
+
"@stylistic/quote-props": [
|
|
355
|
+
"error",
|
|
356
|
+
"as-needed",
|
|
357
|
+
{
|
|
358
|
+
keywords: false,
|
|
359
|
+
unnecessary: true,
|
|
360
|
+
numbers: false
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
"@stylistic/quotes": [
|
|
364
|
+
"error",
|
|
365
|
+
"single",
|
|
366
|
+
{ avoidEscape: true }
|
|
367
|
+
],
|
|
368
|
+
"@stylistic/semi": ["error", "always"],
|
|
369
|
+
"@stylistic/semi-spacing": ["error", {
|
|
370
|
+
before: false,
|
|
371
|
+
after: true
|
|
372
|
+
}],
|
|
373
|
+
"@stylistic/semi-style": ["error", "last"],
|
|
374
|
+
"@stylistic/space-before-blocks": "error",
|
|
375
|
+
"@stylistic/space-before-function-paren": ["error", {
|
|
376
|
+
anonymous: "always",
|
|
377
|
+
named: "never",
|
|
378
|
+
asyncArrow: "always"
|
|
379
|
+
}],
|
|
380
|
+
"@stylistic/space-in-parens": ["error", "never"],
|
|
381
|
+
"@stylistic/space-infix-ops": "error",
|
|
382
|
+
"@stylistic/space-unary-ops": ["error", {
|
|
383
|
+
words: true,
|
|
384
|
+
nonwords: false,
|
|
385
|
+
overrides: {}
|
|
386
|
+
}],
|
|
387
|
+
"@stylistic/spaced-comment": [
|
|
388
|
+
"error",
|
|
389
|
+
"always",
|
|
390
|
+
{
|
|
391
|
+
line: {
|
|
392
|
+
exceptions: ["-", "+"],
|
|
393
|
+
markers: [
|
|
394
|
+
"=",
|
|
395
|
+
"!",
|
|
396
|
+
"/"
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
block: {
|
|
400
|
+
exceptions: ["-", "+"],
|
|
401
|
+
markers: ["=", "!"],
|
|
402
|
+
balanced: true
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
"@stylistic/switch-colon-spacing": ["error", {
|
|
407
|
+
after: true,
|
|
408
|
+
before: false
|
|
409
|
+
}],
|
|
410
|
+
"@stylistic/template-tag-spacing": ["error", "never"],
|
|
411
|
+
"@stylistic/wrap-regex": "off",
|
|
412
|
+
"capitalized-comments": "off",
|
|
413
|
+
camelcase: "off",
|
|
414
|
+
"consistent-this": "off",
|
|
415
|
+
"func-name-matching": [
|
|
416
|
+
"off",
|
|
417
|
+
"always",
|
|
418
|
+
{ includeCommonJSModuleExports: false }
|
|
419
|
+
],
|
|
420
|
+
"func-names": "off",
|
|
421
|
+
"func-style": "off",
|
|
422
|
+
"id-denylist": "off",
|
|
423
|
+
"id-length": "off",
|
|
424
|
+
"id-match": "off",
|
|
425
|
+
"max-depth": ["off", 4],
|
|
426
|
+
"max-lines": ["off", {
|
|
427
|
+
max: 1e3,
|
|
428
|
+
skipBlankLines: true,
|
|
429
|
+
skipComments: true
|
|
430
|
+
}],
|
|
431
|
+
"max-lines-per-function": ["off", {
|
|
432
|
+
max: 80,
|
|
433
|
+
skipBlankLines: true,
|
|
434
|
+
skipComments: true,
|
|
435
|
+
IIFEs: true
|
|
436
|
+
}],
|
|
437
|
+
"max-nested-callbacks": "off",
|
|
438
|
+
"max-params": ["off", 3],
|
|
439
|
+
"max-statements": ["off", 10],
|
|
440
|
+
"new-cap": ["error", {
|
|
441
|
+
newIsCap: true,
|
|
442
|
+
newIsCapExceptions: [],
|
|
443
|
+
capIsNew: false,
|
|
444
|
+
capIsNewExceptions: [
|
|
445
|
+
"Immutable.Map",
|
|
446
|
+
"Immutable.Set",
|
|
447
|
+
"Immutable.List"
|
|
448
|
+
]
|
|
449
|
+
}],
|
|
450
|
+
"no-array-constructor": "error",
|
|
451
|
+
"no-bitwise": "warn",
|
|
452
|
+
"no-continue": "off",
|
|
453
|
+
"no-inline-comments": "off",
|
|
454
|
+
"no-lonely-if": "error",
|
|
455
|
+
"no-multi-assign": "error",
|
|
456
|
+
"no-negated-condition": "off",
|
|
457
|
+
"no-nested-ternary": "error",
|
|
458
|
+
"no-object-constructor": "error",
|
|
459
|
+
"no-plusplus": ["off", { allowForLoopAfterthoughts: true }],
|
|
460
|
+
"no-restricted-syntax": "off",
|
|
461
|
+
"no-ternary": "off",
|
|
462
|
+
"no-underscore-dangle": "warn",
|
|
463
|
+
"no-unneeded-ternary": ["error", { defaultAssignment: false }],
|
|
464
|
+
"one-var": ["error", "never"],
|
|
465
|
+
"operator-assignment": ["warn", "always"],
|
|
466
|
+
"prefer-object-spread": "off",
|
|
467
|
+
"sort-keys": [
|
|
468
|
+
"off",
|
|
469
|
+
"asc",
|
|
470
|
+
{
|
|
471
|
+
caseSensitive: false,
|
|
472
|
+
natural: true
|
|
473
|
+
}
|
|
474
|
+
],
|
|
475
|
+
"sort-vars": "off",
|
|
476
|
+
"unicode-bom": ["off", "never"]
|
|
477
|
+
}
|
|
478
|
+
}];
|
|
479
|
+
|
|
480
|
+
//#endregion
|
|
481
|
+
//#region rules/base/variables.ts
|
|
482
|
+
var variables_default = [{
|
|
483
|
+
name: "rules/base/variables",
|
|
484
|
+
languageOptions: { globals: {
|
|
485
|
+
...globals.browser,
|
|
486
|
+
...globals.es2015,
|
|
487
|
+
...globals.jasmine,
|
|
488
|
+
...globals.jest,
|
|
489
|
+
...globals.jquery,
|
|
490
|
+
...globals.mocha,
|
|
491
|
+
...globals.node
|
|
492
|
+
} },
|
|
493
|
+
rules: {
|
|
494
|
+
"init-declarations": "off",
|
|
495
|
+
"no-delete-var": "error",
|
|
496
|
+
"no-label-var": "error",
|
|
497
|
+
"no-restricted-globals": "off",
|
|
498
|
+
"no-shadow": "error",
|
|
499
|
+
"no-shadow-restricted-names": "error",
|
|
500
|
+
"no-undef": "error",
|
|
501
|
+
"no-undef-init": "error",
|
|
502
|
+
"no-undefined": "off",
|
|
503
|
+
"no-unused-vars": ["error", {
|
|
504
|
+
vars: "all",
|
|
505
|
+
args: "after-used",
|
|
506
|
+
ignoreRestSiblings: true
|
|
507
|
+
}],
|
|
508
|
+
"no-use-before-define": ["error", {
|
|
509
|
+
functions: false,
|
|
510
|
+
classes: false,
|
|
511
|
+
variables: false
|
|
512
|
+
}]
|
|
513
|
+
}
|
|
514
|
+
}];
|
|
515
|
+
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region rules/base/es6.ts
|
|
518
|
+
var es6_default = [{
|
|
519
|
+
name: "rules/base/es6",
|
|
520
|
+
plugins: { "@stylistic": stylistic },
|
|
521
|
+
rules: {
|
|
522
|
+
"arrow-body-style": [
|
|
523
|
+
"error",
|
|
524
|
+
"as-needed",
|
|
525
|
+
{ requireReturnForObjectLiteral: false }
|
|
526
|
+
],
|
|
527
|
+
"constructor-super": "error",
|
|
528
|
+
"no-class-assign": "error",
|
|
529
|
+
"no-const-assign": "error",
|
|
530
|
+
"no-dupe-class-members": "error",
|
|
531
|
+
"no-duplicate-imports": "error",
|
|
532
|
+
"no-new-native-nonconstructor": "error",
|
|
533
|
+
"no-restricted-imports": ["off", {
|
|
534
|
+
paths: [],
|
|
535
|
+
patterns: []
|
|
536
|
+
}],
|
|
537
|
+
"no-this-before-super": "error",
|
|
538
|
+
"no-useless-computed-key": "error",
|
|
539
|
+
"no-useless-constructor": "error",
|
|
540
|
+
"no-useless-rename": ["error", {
|
|
541
|
+
ignoreDestructuring: false,
|
|
542
|
+
ignoreImport: false,
|
|
543
|
+
ignoreExport: false
|
|
544
|
+
}],
|
|
545
|
+
"no-var": "error",
|
|
546
|
+
"object-shorthand": [
|
|
547
|
+
"error",
|
|
548
|
+
"always",
|
|
549
|
+
{
|
|
550
|
+
ignoreConstructors: false,
|
|
551
|
+
avoidQuotes: true
|
|
552
|
+
}
|
|
553
|
+
],
|
|
554
|
+
"prefer-arrow-callback": ["error", {
|
|
555
|
+
allowNamedFunctions: false,
|
|
556
|
+
allowUnboundThis: true
|
|
557
|
+
}],
|
|
558
|
+
"prefer-const": ["error", {
|
|
559
|
+
destructuring: "any",
|
|
560
|
+
ignoreReadBeforeAssign: true
|
|
561
|
+
}],
|
|
562
|
+
"prefer-destructuring": [
|
|
563
|
+
"warn",
|
|
564
|
+
{
|
|
565
|
+
VariableDeclarator: {
|
|
566
|
+
array: false,
|
|
567
|
+
object: true
|
|
568
|
+
},
|
|
569
|
+
AssignmentExpression: {
|
|
570
|
+
array: false,
|
|
571
|
+
object: false
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
{ enforceForRenamedProperties: false }
|
|
575
|
+
],
|
|
576
|
+
"prefer-numeric-literals": "off",
|
|
577
|
+
"prefer-rest-params": "warn",
|
|
578
|
+
"prefer-spread": "warn",
|
|
579
|
+
"prefer-template": "warn",
|
|
580
|
+
"require-yield": "error",
|
|
581
|
+
"sort-imports": ["off", {
|
|
582
|
+
ignoreCase: false,
|
|
583
|
+
ignoreDeclarationSort: false,
|
|
584
|
+
ignoreMemberSort: false,
|
|
585
|
+
memberSyntaxSortOrder: [
|
|
586
|
+
"none",
|
|
587
|
+
"all",
|
|
588
|
+
"multiple",
|
|
589
|
+
"single"
|
|
590
|
+
],
|
|
591
|
+
allowSeparatedGroups: false
|
|
592
|
+
}],
|
|
593
|
+
"symbol-description": "warn",
|
|
594
|
+
"@stylistic/arrow-parens": ["warn", "always"],
|
|
595
|
+
"@stylistic/arrow-spacing": ["error", {
|
|
596
|
+
before: true,
|
|
597
|
+
after: true
|
|
598
|
+
}],
|
|
599
|
+
"@stylistic/generator-star-spacing": ["error", {
|
|
600
|
+
before: false,
|
|
601
|
+
after: true
|
|
602
|
+
}],
|
|
603
|
+
"@stylistic/no-confusing-arrow": "error",
|
|
604
|
+
"@stylistic/rest-spread-spacing": ["error", "never"],
|
|
605
|
+
"@stylistic/template-curly-spacing": "warn",
|
|
606
|
+
"@stylistic/yield-star-spacing": ["error", "after"]
|
|
607
|
+
}
|
|
608
|
+
}];
|
|
609
|
+
|
|
610
|
+
//#endregion
|
|
611
|
+
//#region rules/base/strict.ts
|
|
612
|
+
var strict_default = [{
|
|
613
|
+
name: "rules/base/strict",
|
|
614
|
+
rules: { strict: "off" }
|
|
615
|
+
}];
|
|
616
|
+
|
|
617
|
+
//#endregion
|
|
618
|
+
//#region rules/import.ts
|
|
619
|
+
var import_default = [{
|
|
620
|
+
name: "rules/import",
|
|
621
|
+
plugins: { import: importPlugin },
|
|
622
|
+
settings: { "import/ignore": ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"] },
|
|
623
|
+
rules: {
|
|
624
|
+
"import/no-unresolved": "error",
|
|
625
|
+
"import/named": "error",
|
|
626
|
+
"import/default": "error",
|
|
627
|
+
"import/namespace": "error",
|
|
628
|
+
"import/export": "error",
|
|
629
|
+
"import/no-named-as-default": "error",
|
|
630
|
+
"import/no-named-as-default-member": "warn",
|
|
631
|
+
"import/no-deprecated": "off",
|
|
632
|
+
"import/no-extraneous-dependencies": "off",
|
|
633
|
+
"import/no-mutable-exports": "off",
|
|
634
|
+
"import/unambiguous": "off",
|
|
635
|
+
"import/no-commonjs": "off",
|
|
636
|
+
"import/no-amd": "warn",
|
|
637
|
+
"import/no-nodejs-modules": "off",
|
|
638
|
+
"import/first": "error",
|
|
639
|
+
"import/no-duplicates": "error",
|
|
640
|
+
"import/no-namespace": "off",
|
|
641
|
+
"import/extensions": "off",
|
|
642
|
+
"import/order": ["off", {
|
|
643
|
+
groups: [
|
|
644
|
+
"builtin",
|
|
645
|
+
"external",
|
|
646
|
+
"internal",
|
|
647
|
+
"parent",
|
|
648
|
+
"sibling",
|
|
649
|
+
"index"
|
|
650
|
+
],
|
|
651
|
+
"newlines-between": "never"
|
|
652
|
+
}],
|
|
653
|
+
"import/newline-after-import": "warn",
|
|
654
|
+
"import/prefer-default-export": "off",
|
|
655
|
+
"import/no-restricted-paths": "off",
|
|
656
|
+
"import/max-dependencies": ["off", { max: 10 }],
|
|
657
|
+
"import/no-absolute-path": "off",
|
|
658
|
+
"import/no-dynamic-require": "off",
|
|
659
|
+
"import/no-internal-modules": ["off", { allow: [] }],
|
|
660
|
+
"import/no-webpack-loader-syntax": "off",
|
|
661
|
+
"import/no-unassigned-import": "off",
|
|
662
|
+
"import/no-named-default": "error",
|
|
663
|
+
"import/no-anonymous-default-export": ["off", {
|
|
664
|
+
allowArray: false,
|
|
665
|
+
allowArrowFunction: false,
|
|
666
|
+
allowAnonymousClass: false,
|
|
667
|
+
allowAnonymousFunction: false,
|
|
668
|
+
allowLiteral: false,
|
|
669
|
+
allowObject: false
|
|
670
|
+
}],
|
|
671
|
+
"import/exports-last": "off",
|
|
672
|
+
"import/group-exports": "off",
|
|
673
|
+
"import/no-default-export": "off",
|
|
674
|
+
"import/no-self-import": "error",
|
|
675
|
+
"import/no-cycle": ["error", { maxDepth: Infinity }],
|
|
676
|
+
"import/no-useless-path-segments": "off",
|
|
677
|
+
"import/dynamic-import-chunkname": ["off", {
|
|
678
|
+
importFunctions: [],
|
|
679
|
+
webpackChunknameFormat: "[0-9a-zA-Z-_/.]+"
|
|
680
|
+
}],
|
|
681
|
+
"import/no-relative-parent-imports": "off"
|
|
682
|
+
}
|
|
683
|
+
}];
|
|
684
|
+
|
|
685
|
+
//#endregion
|
|
686
|
+
//#region index.ts
|
|
687
|
+
var eslint_config_default = [
|
|
688
|
+
...best_practices_default,
|
|
689
|
+
...possible_errors_default,
|
|
690
|
+
...style_default,
|
|
691
|
+
...variables_default,
|
|
692
|
+
...es6_default,
|
|
693
|
+
...strict_default,
|
|
694
|
+
...import_default,
|
|
695
|
+
{
|
|
696
|
+
name: "eslint-config/index",
|
|
697
|
+
files: ["*.{js,jsx}", "**/*.{jsx}"],
|
|
698
|
+
languageOptions: { parserOptions: { ecmaFeatures: {
|
|
699
|
+
globalReturn: false,
|
|
700
|
+
impliedStrict: true,
|
|
701
|
+
jsx: true
|
|
702
|
+
} } }
|
|
703
|
+
}
|
|
704
|
+
];
|
|
705
|
+
|
|
706
|
+
//#endregion
|
|
707
|
+
export { eslint_config_default };
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import pluginVue from "eslint-plugin-vue";
|
|
2
|
+
import parserVue from "vue-eslint-parser";
|
|
3
|
+
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
4
|
+
|
|
5
|
+
//#region rules/vue.ts
|
|
6
|
+
var vue_default = [
|
|
7
|
+
{
|
|
8
|
+
name: "rules/vue/base/setup",
|
|
9
|
+
plugins: { vue: pluginVue },
|
|
10
|
+
languageOptions: { sourceType: "module" }
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "rules/vue/base/setup-for-vue",
|
|
14
|
+
plugins: { vue: pluginVue },
|
|
15
|
+
files: ["*.vue", "**/*.vue"],
|
|
16
|
+
languageOptions: {
|
|
17
|
+
parser: parserVue,
|
|
18
|
+
sourceType: "module"
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
"vue/comment-directive": "error",
|
|
22
|
+
"vue/jsx-uses-vars": "error"
|
|
23
|
+
},
|
|
24
|
+
processor: "vue/vue"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "rules/vue",
|
|
28
|
+
rules: {
|
|
29
|
+
"vue/no-shared-component-data": "error",
|
|
30
|
+
"vue/require-prop-type-constructor": "error",
|
|
31
|
+
"vue/require-valid-default-prop": "error",
|
|
32
|
+
"vue/require-v-for-key": "error",
|
|
33
|
+
"vue/no-use-v-if-with-v-for": "warn",
|
|
34
|
+
"vue/no-async-in-computed-properties": "error",
|
|
35
|
+
"vue/no-dupe-keys": "error",
|
|
36
|
+
"vue/no-duplicate-attributes": "error",
|
|
37
|
+
"vue/no-parsing-error": ["error", {
|
|
38
|
+
"x-invalid-end-tag": false,
|
|
39
|
+
"invalid-first-character-of-tag-name": false
|
|
40
|
+
}],
|
|
41
|
+
"vue/no-reserved-keys": "error",
|
|
42
|
+
"vue/no-side-effects-in-computed-properties": "error",
|
|
43
|
+
"vue/no-template-key": "warn",
|
|
44
|
+
"vue/no-textarea-mustache": "error",
|
|
45
|
+
"vue/no-unused-components": "warn",
|
|
46
|
+
"vue/no-unused-vars": "warn",
|
|
47
|
+
"vue/require-component-is": "warn",
|
|
48
|
+
"vue/require-render-return": "error",
|
|
49
|
+
"vue/return-in-computed-property": "error",
|
|
50
|
+
"vue/use-v-on-exact": "error",
|
|
51
|
+
"vue/valid-template-root": "error",
|
|
52
|
+
"vue/valid-v-bind": "error",
|
|
53
|
+
"vue/valid-v-cloak": "error",
|
|
54
|
+
"vue/valid-v-else-if": "error",
|
|
55
|
+
"vue/valid-v-else": "error",
|
|
56
|
+
"vue/valid-v-for": "error",
|
|
57
|
+
"vue/valid-v-html": "error",
|
|
58
|
+
"vue/valid-v-if": "error",
|
|
59
|
+
"vue/valid-v-model": "error",
|
|
60
|
+
"vue/valid-v-on": "error",
|
|
61
|
+
"vue/valid-v-once": "error",
|
|
62
|
+
"vue/valid-v-pre": "error",
|
|
63
|
+
"vue/valid-v-show": "error",
|
|
64
|
+
"vue/valid-v-slot": "error",
|
|
65
|
+
"vue/valid-v-text": "error"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region rules/jsx-a11y.ts
|
|
72
|
+
var jsx_a11y_default = [{
|
|
73
|
+
name: "rules/jsx-a11y",
|
|
74
|
+
plugins: { "jsx-a11y": jsxA11y },
|
|
75
|
+
files: ["*.{jsx,tsx,vue}", "**/*.{jsx,tsx,vue}"],
|
|
76
|
+
rules: {
|
|
77
|
+
"jsx-a11y/alt-text": "warn",
|
|
78
|
+
"jsx-a11y/img-redundant-alt": "warn",
|
|
79
|
+
"jsx-a11y/anchor-has-content": "warn",
|
|
80
|
+
"jsx-a11y/aria-props": "warn",
|
|
81
|
+
"jsx-a11y/aria-proptypes": "warn",
|
|
82
|
+
"jsx-a11y/aria-unsupported-elements": "warn",
|
|
83
|
+
"jsx-a11y/aria-role": ["warn", { ignoreNonDOM: true }],
|
|
84
|
+
"jsx-a11y/role-has-required-aria-props": "warn",
|
|
85
|
+
"jsx-a11y/role-supports-aria-props": "warn",
|
|
86
|
+
"jsx-a11y/iframe-has-title": "warn",
|
|
87
|
+
"jsx-a11y/no-access-key": "warn",
|
|
88
|
+
"jsx-a11y/no-distracting-elements": "warn",
|
|
89
|
+
"jsx-a11y/scope": "warn"
|
|
90
|
+
}
|
|
91
|
+
}];
|
|
92
|
+
|
|
93
|
+
//#endregion
|
|
94
|
+
export { jsx_a11y_default, vue_default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import node from "eslint-plugin-n";
|
|
2
|
+
|
|
3
|
+
//#region rules/node.ts
|
|
4
|
+
var node_default = [{
|
|
5
|
+
name: "rules/node",
|
|
6
|
+
plugins: { node },
|
|
7
|
+
languageOptions: { ecmaVersion: "latest" },
|
|
8
|
+
rules: {
|
|
9
|
+
"node/no-new-require": "error",
|
|
10
|
+
"node/prefer-global/buffer": ["error", "always"],
|
|
11
|
+
"node/prefer-global/console": ["error", "always"],
|
|
12
|
+
"node/prefer-global/process": ["error", "always"],
|
|
13
|
+
"node/prefer-global/text-decoder": "off",
|
|
14
|
+
"node/prefer-global/text-encoder": "off",
|
|
15
|
+
"node/prefer-global/url-search-params": "off",
|
|
16
|
+
"node/prefer-global/url": "off",
|
|
17
|
+
"node/prefer-promises/dns": "warn",
|
|
18
|
+
"node/prefer-promises/fs": "warn",
|
|
19
|
+
"node/no-unpublished-import": "off",
|
|
20
|
+
"node/no-unsupported-features/es-builtins": "off",
|
|
21
|
+
"node/shebang": "off",
|
|
22
|
+
"node/no-unsupported-features/es-syntax": "off",
|
|
23
|
+
"node/no-unsupported-features/node-builtins": "off",
|
|
24
|
+
"node/process-exit-as-throw": "off",
|
|
25
|
+
"node/no-deprecated-api": "off",
|
|
26
|
+
"node/handle-callback-err": "off",
|
|
27
|
+
"node/no-callback-literal": "off",
|
|
28
|
+
"node/no-exports-assign": "off",
|
|
29
|
+
"node/no-extraneous-import": "off",
|
|
30
|
+
"node/no-extraneous-require": "off",
|
|
31
|
+
"node/no-missing-import": "off",
|
|
32
|
+
"node/no-missing-require": "off",
|
|
33
|
+
"node/no-path-concat": "off",
|
|
34
|
+
"node/no-process-exit": "off",
|
|
35
|
+
"node/no-unpublished-bin": "off",
|
|
36
|
+
"node/no-unpublished-require": "off",
|
|
37
|
+
"node/callback-return": "off",
|
|
38
|
+
"node/file-extension-in-import": "off",
|
|
39
|
+
"node/global-require": "off",
|
|
40
|
+
"node/no-mixed-requires": "off",
|
|
41
|
+
"node/no-process-env": "off",
|
|
42
|
+
"node/no-restricted-import": "off",
|
|
43
|
+
"node/no-restricted-require": "off",
|
|
44
|
+
"node/no-sync": "off",
|
|
45
|
+
"node/exports-style": "off"
|
|
46
|
+
}
|
|
47
|
+
}];
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { node_default };
|
package/dist/node.d.ts
ADDED
package/dist/node.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { eslint_config_default } from "./eslint-config-CV6O12vO.js";
|
|
2
|
+
import { node_default } from "./node-BCedUlu_.js";
|
|
3
|
+
|
|
4
|
+
//#region node.ts
|
|
5
|
+
var node_default$1 = [{
|
|
6
|
+
name: "eslint-config/node",
|
|
7
|
+
extends: [node_default, eslint_config_default],
|
|
8
|
+
files: ["*.js", "**/*.js"]
|
|
9
|
+
}];
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { node_default$1 as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { eslint_config_default } from "../eslint-config-CV6O12vO.js";
|
|
2
|
+
import { typescript_default } from "../typescript-BzyvxM81.js";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
|
|
5
|
+
//#region typescript/index.ts
|
|
6
|
+
var typescript_default$1 = [
|
|
7
|
+
...eslint_config_default,
|
|
8
|
+
...typescript_default,
|
|
9
|
+
{
|
|
10
|
+
name: "eslint-config/typescript/index",
|
|
11
|
+
files: ["*.{ts,tsx}", "**/*.{ts,tsx}"],
|
|
12
|
+
settings: {
|
|
13
|
+
"import/parsers": { [tseslint.parser]: [
|
|
14
|
+
".ts",
|
|
15
|
+
".d.ts",
|
|
16
|
+
".tsx"
|
|
17
|
+
] },
|
|
18
|
+
"import/resolver": { typescript: {} },
|
|
19
|
+
"import/extensions": [
|
|
20
|
+
".js",
|
|
21
|
+
".ts",
|
|
22
|
+
".mjs"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
languageOptions: {
|
|
26
|
+
ecmaVersion: "latest",
|
|
27
|
+
sourceType: "module",
|
|
28
|
+
parser: tseslint.parser,
|
|
29
|
+
parserOptions: {
|
|
30
|
+
ecmaFeatures: {
|
|
31
|
+
globalReturn: false,
|
|
32
|
+
jsx: true
|
|
33
|
+
},
|
|
34
|
+
projectService: { allowDefaultProject: ["*.js"] }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { typescript_default$1 as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { eslint_config_default } from "../eslint-config-CV6O12vO.js";
|
|
2
|
+
import { node_default } from "../node-BCedUlu_.js";
|
|
3
|
+
import { typescript_default } from "../typescript-BzyvxM81.js";
|
|
4
|
+
import tseslint from "typescript-eslint";
|
|
5
|
+
|
|
6
|
+
//#region typescript/node.ts
|
|
7
|
+
var node_default$1 = [{
|
|
8
|
+
name: "eslint-config/typescript/node",
|
|
9
|
+
extends: [
|
|
10
|
+
eslint_config_default,
|
|
11
|
+
typescript_default,
|
|
12
|
+
node_default
|
|
13
|
+
],
|
|
14
|
+
files: ["**/*.{ts,js}"],
|
|
15
|
+
languageOptions: {
|
|
16
|
+
parser: tseslint.parser,
|
|
17
|
+
ecmaVersion: "latest",
|
|
18
|
+
sourceType: "module"
|
|
19
|
+
}
|
|
20
|
+
}];
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { node_default$1 as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { eslint_config_default } from "../eslint-config-CV6O12vO.js";
|
|
2
|
+
import { jsx_a11y_default, vue_default } from "../jsx-a11y-vI7yjRkI.js";
|
|
3
|
+
import { typescript_default } from "../typescript-BzyvxM81.js";
|
|
4
|
+
import tseslint from "typescript-eslint";
|
|
5
|
+
|
|
6
|
+
//#region typescript/vue.ts
|
|
7
|
+
var vue_default$1 = [{
|
|
8
|
+
name: "eslint-config/typescript/vue",
|
|
9
|
+
extends: [
|
|
10
|
+
eslint_config_default,
|
|
11
|
+
jsx_a11y_default,
|
|
12
|
+
typescript_default,
|
|
13
|
+
vue_default
|
|
14
|
+
],
|
|
15
|
+
files: ["**/*.{ts,tsx,js,jsx,vue}"],
|
|
16
|
+
languageOptions: {
|
|
17
|
+
ecmaVersion: "latest",
|
|
18
|
+
sourceType: "module",
|
|
19
|
+
parserOptions: {
|
|
20
|
+
parser: {
|
|
21
|
+
ts: tseslint.parser,
|
|
22
|
+
tsx: tseslint.parser,
|
|
23
|
+
js: "espree",
|
|
24
|
+
jsx: "espree"
|
|
25
|
+
},
|
|
26
|
+
ecmaFeatures: { jsx: true }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}];
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { vue_default$1 as default };
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import tseslint from "typescript-eslint";
|
|
2
|
+
|
|
3
|
+
//#region rules/typescript.ts
|
|
4
|
+
var typescript_default = [
|
|
5
|
+
{
|
|
6
|
+
name: "rules/typescript/base",
|
|
7
|
+
languageOptions: {
|
|
8
|
+
parser: tseslint.parser,
|
|
9
|
+
sourceType: "module"
|
|
10
|
+
},
|
|
11
|
+
plugins: { "@typescript-eslint": tseslint.plugin }
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
files: [
|
|
15
|
+
"**/*.ts",
|
|
16
|
+
"**/*.tsx",
|
|
17
|
+
"**/*.mts",
|
|
18
|
+
"**/*.cts"
|
|
19
|
+
],
|
|
20
|
+
name: "typescript-eslint/eslint-recommended",
|
|
21
|
+
rules: {
|
|
22
|
+
"no-undef": "off",
|
|
23
|
+
"import/no-unresolved": "off"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "rules/typescript/aware",
|
|
28
|
+
files: [
|
|
29
|
+
"**/*.ts",
|
|
30
|
+
"**/*.tsx",
|
|
31
|
+
"**/*.mts",
|
|
32
|
+
"**/*.cts"
|
|
33
|
+
],
|
|
34
|
+
languageOptions: { parserOptions: {
|
|
35
|
+
ecmaFeatures: { jsx: true },
|
|
36
|
+
projectService: true
|
|
37
|
+
} },
|
|
38
|
+
rules: {
|
|
39
|
+
"@typescript-eslint/restrict-plus-operands": "warn",
|
|
40
|
+
"dot-notation": "off",
|
|
41
|
+
"@typescript-eslint/dot-notation": ["error", { allowKeywords: true }]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "rules/typescript",
|
|
46
|
+
rules: {
|
|
47
|
+
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
48
|
+
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
|
49
|
+
"@typescript-eslint/await-thenable": "off",
|
|
50
|
+
"@typescript-eslint/ban-ts-comment": ["warn", {
|
|
51
|
+
"ts-expect-error": "allow-with-description",
|
|
52
|
+
"ts-ignore": "allow-with-description",
|
|
53
|
+
"ts-nocheck": "allow-with-description",
|
|
54
|
+
"ts-check": "allow-with-description"
|
|
55
|
+
}],
|
|
56
|
+
"@typescript-eslint/ban-tslint-comment": "error",
|
|
57
|
+
"@typescript-eslint/no-empty-object-type": ["warn", { allowInterfaces: "never" }],
|
|
58
|
+
"@typescript-eslint/no-unsafe-function-type": "off",
|
|
59
|
+
"@typescript-eslint/no-wrapper-object-types": "off",
|
|
60
|
+
"@typescript-eslint/class-literal-property-style": ["warn", "fields"],
|
|
61
|
+
"@typescript-eslint/consistent-type-assertions": ["error", {
|
|
62
|
+
assertionStyle: "as",
|
|
63
|
+
objectLiteralTypeAssertions: "never"
|
|
64
|
+
}],
|
|
65
|
+
"@typescript-eslint/consistent-type-definitions": ["warn", "interface"],
|
|
66
|
+
"default-param-last": "off",
|
|
67
|
+
"@typescript-eslint/default-param-last": "off",
|
|
68
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
69
|
+
"@typescript-eslint/explicit-member-accessibility": ["warn", { accessibility: "no-public" }],
|
|
70
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
71
|
+
"init-declarations": "off",
|
|
72
|
+
"@typescript-eslint/init-declarations": "off",
|
|
73
|
+
"@typescript-eslint/member-ordering": ["warn", { default: [
|
|
74
|
+
"public-static-field",
|
|
75
|
+
"protected-static-field",
|
|
76
|
+
"private-static-field",
|
|
77
|
+
"static-field",
|
|
78
|
+
"public-static-method",
|
|
79
|
+
"protected-static-method",
|
|
80
|
+
"private-static-method",
|
|
81
|
+
"static-method",
|
|
82
|
+
"public-instance-field",
|
|
83
|
+
"protected-instance-field",
|
|
84
|
+
"private-instance-field",
|
|
85
|
+
"public-field",
|
|
86
|
+
"protected-field",
|
|
87
|
+
"private-field",
|
|
88
|
+
"instance-field",
|
|
89
|
+
"field",
|
|
90
|
+
"constructor",
|
|
91
|
+
"public-instance-method",
|
|
92
|
+
"protected-instance-method",
|
|
93
|
+
"private-instance-method",
|
|
94
|
+
"public-method",
|
|
95
|
+
"protected-method",
|
|
96
|
+
"private-method",
|
|
97
|
+
"instance-method",
|
|
98
|
+
"method"
|
|
99
|
+
] }],
|
|
100
|
+
"@typescript-eslint/method-signature-style": ["warn", "property"],
|
|
101
|
+
"@typescript-eslint/naming-convention": "off",
|
|
102
|
+
"no-array-constructor": "off",
|
|
103
|
+
"@typescript-eslint/no-array-constructor": "error",
|
|
104
|
+
"@typescript-eslint/no-base-to-string": "off",
|
|
105
|
+
"@typescript-eslint/no-confusing-non-null-assertion": "warn",
|
|
106
|
+
"@typescript-eslint/no-dynamic-delete": "off",
|
|
107
|
+
"no-empty-function": "off",
|
|
108
|
+
"@typescript-eslint/no-empty-function": ["error", { allow: [
|
|
109
|
+
"arrowFunctions",
|
|
110
|
+
"functions",
|
|
111
|
+
"methods"
|
|
112
|
+
] }],
|
|
113
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
114
|
+
"@typescript-eslint/no-extra-non-null-assertion": "off",
|
|
115
|
+
"@typescript-eslint/no-extraneous-class": "off",
|
|
116
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
117
|
+
"@typescript-eslint/no-for-in-array": "off",
|
|
118
|
+
"@typescript-eslint/no-implied-eval": "off",
|
|
119
|
+
"@typescript-eslint/no-inferrable-types": "warn",
|
|
120
|
+
"@typescript-eslint/no-invalid-void-type": "error",
|
|
121
|
+
"no-magic-numbers": "off",
|
|
122
|
+
"@typescript-eslint/no-magic-numbers": "off",
|
|
123
|
+
"@typescript-eslint/no-misused-new": "off",
|
|
124
|
+
"@typescript-eslint/no-misused-promises": "off",
|
|
125
|
+
"@typescript-eslint/no-namespace": ["error", {
|
|
126
|
+
allowDeclarations: true,
|
|
127
|
+
allowDefinitionFiles: true
|
|
128
|
+
}],
|
|
129
|
+
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
130
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
131
|
+
"@typescript-eslint/parameter-properties": "off",
|
|
132
|
+
"@typescript-eslint/no-require-imports": "warn",
|
|
133
|
+
"no-shadow": "off",
|
|
134
|
+
"@typescript-eslint/no-shadow": "error",
|
|
135
|
+
"@typescript-eslint/no-this-alias": ["warn", { allowDestructuring: true }],
|
|
136
|
+
"@typescript-eslint/only-throw-error": "off",
|
|
137
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
|
|
138
|
+
"@typescript-eslint/no-unnecessary-condition": "off",
|
|
139
|
+
"@typescript-eslint/no-unnecessary-qualifier": "off",
|
|
140
|
+
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
141
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
142
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
143
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
144
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
145
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
146
|
+
"no-unused-expressions": "off",
|
|
147
|
+
"@typescript-eslint/no-unused-expressions": ["error", {
|
|
148
|
+
allowShortCircuit: true,
|
|
149
|
+
allowTernary: true,
|
|
150
|
+
allowTaggedTemplates: true
|
|
151
|
+
}],
|
|
152
|
+
"no-unused-vars": "off",
|
|
153
|
+
"@typescript-eslint/no-unused-vars": ["error", {
|
|
154
|
+
vars: "all",
|
|
155
|
+
args: "after-used",
|
|
156
|
+
ignoreRestSiblings: true
|
|
157
|
+
}],
|
|
158
|
+
"no-use-before-define": "off",
|
|
159
|
+
"@typescript-eslint/no-use-before-define": ["error", {
|
|
160
|
+
functions: false,
|
|
161
|
+
classes: false,
|
|
162
|
+
variables: false
|
|
163
|
+
}],
|
|
164
|
+
"no-useless-constructor": "off",
|
|
165
|
+
"@typescript-eslint/no-useless-constructor": "error",
|
|
166
|
+
"@typescript-eslint/prefer-as-const": "warn",
|
|
167
|
+
"@typescript-eslint/prefer-for-of": "off",
|
|
168
|
+
"@typescript-eslint/prefer-function-type": "off",
|
|
169
|
+
"@typescript-eslint/prefer-includes": "off",
|
|
170
|
+
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
171
|
+
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
172
|
+
"@typescript-eslint/prefer-optional-chain": "off",
|
|
173
|
+
"@typescript-eslint/prefer-readonly": "off",
|
|
174
|
+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
175
|
+
"@typescript-eslint/prefer-reduce-type-parameter": "off",
|
|
176
|
+
"@typescript-eslint/prefer-regexp-exec": "off",
|
|
177
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "off",
|
|
178
|
+
"@typescript-eslint/promise-function-async": "off",
|
|
179
|
+
"require-await": "off",
|
|
180
|
+
"@typescript-eslint/require-await": "off",
|
|
181
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
182
|
+
"@typescript-eslint/return-await": "off",
|
|
183
|
+
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
184
|
+
"@typescript-eslint/switch-exhaustiveness-check": "off",
|
|
185
|
+
"@typescript-eslint/triple-slash-reference": ["error", {
|
|
186
|
+
path: "never",
|
|
187
|
+
types: "always",
|
|
188
|
+
lib: "always"
|
|
189
|
+
}],
|
|
190
|
+
"@typescript-eslint/unbound-method": "off",
|
|
191
|
+
"@typescript-eslint/unified-signatures": "warn"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
];
|
|
195
|
+
|
|
196
|
+
//#endregion
|
|
197
|
+
export { typescript_default };
|
package/dist/vue.d.ts
ADDED
package/dist/vue.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { eslint_config_default } from "./eslint-config-CV6O12vO.js";
|
|
2
|
+
import { jsx_a11y_default, vue_default } from "./jsx-a11y-vI7yjRkI.js";
|
|
3
|
+
|
|
4
|
+
//#region vue.ts
|
|
5
|
+
var vue_default$1 = [{
|
|
6
|
+
extends: [
|
|
7
|
+
eslint_config_default,
|
|
8
|
+
vue_default,
|
|
9
|
+
jsx_a11y_default
|
|
10
|
+
],
|
|
11
|
+
files: ["**/*.{js,jsx,vue}"],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
ecmaVersion: "latest",
|
|
14
|
+
sourceType: "module",
|
|
15
|
+
parserOptions: {
|
|
16
|
+
parser: "espree",
|
|
17
|
+
ecmaFeatures: {
|
|
18
|
+
globalReturn: false,
|
|
19
|
+
impliedStrict: true,
|
|
20
|
+
jsx: true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}];
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { vue_default$1 as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hkx-eslint-config",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "HKX 代码规范",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"eslint",
|
|
8
|
+
"hkx",
|
|
9
|
+
"lint",
|
|
10
|
+
"withAthree"
|
|
11
|
+
],
|
|
12
|
+
"author": "withAthree <huangkaixiang8462@163.com>",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": "./dist/index.js",
|
|
16
|
+
"./vue/node": "./dist/vue/node.js",
|
|
17
|
+
"./node": "./dist/node.js",
|
|
18
|
+
"./vue": "./dist/vue.js",
|
|
19
|
+
"./typescript": "./dist/typescript.js",
|
|
20
|
+
"./typescript/vue": "./dist/typescript/vue.js",
|
|
21
|
+
"./typescript/node": "./dist/typescript/node.js"
|
|
22
|
+
},
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"directories": {
|
|
26
|
+
"test": "__tests__"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/withAthree/hkx-web-tools.git"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"test": "npx vitest",
|
|
37
|
+
"build": "tsdown"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/withAthree/hkx-web-tools/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/withAthree/hkx-web-tools#readme",
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@eslint/config-helpers": "^0.3.1",
|
|
45
|
+
"@stylistic/eslint-plugin": "^5.2.2",
|
|
46
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
47
|
+
"eslint-plugin-import": "^2.32.0",
|
|
48
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
49
|
+
"eslint-plugin-n": "^17.21.3",
|
|
50
|
+
"eslint-plugin-vue": "^10.4.0",
|
|
51
|
+
"globals": "^16.3.0",
|
|
52
|
+
"typescript-eslint": "^8.39.0",
|
|
53
|
+
"vue-eslint-parser": "^10.2.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"eslint": "^9.32.0"
|
|
57
|
+
},
|
|
58
|
+
"resolutions": {
|
|
59
|
+
"eslint": "^9.32.0"
|
|
60
|
+
}
|
|
61
|
+
}
|