@zinkawaii/eslint-config 0.0.2 → 0.1.1
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/dist/index.cjs +523 -0
- package/dist/index.js +501 -0
- package/package.json +23 -3
- package/index.js +0 -11
- package/lib/recommended.js +0 -47
- package/lib/standard.js +0 -29
- package/lib/stylistic.js +0 -96
- package/lib/vue.js +0 -101
- package/utils/index.js +0 -5
package/dist/index.cjs
ADDED
@@ -0,0 +1,523 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
|
19
|
+
// src/index.ts
|
20
|
+
var src_exports = {};
|
21
|
+
__export(src_exports, {
|
22
|
+
default: () => src_default
|
23
|
+
});
|
24
|
+
module.exports = __toCommonJS(src_exports);
|
25
|
+
|
26
|
+
// src/utils.ts
|
27
|
+
function prefixary(prefix, rules) {
|
28
|
+
return typeof prefix === "object" ? prefix : Object.fromEntries(
|
29
|
+
Object.entries(rules).map(([key, value]) => {
|
30
|
+
return [`${prefix}/${key}`, value];
|
31
|
+
})
|
32
|
+
);
|
33
|
+
}
|
34
|
+
|
35
|
+
// src/lib/patch.ts
|
36
|
+
var patch_default = prefixary({
|
37
|
+
"antfu/curly": "off",
|
38
|
+
"antfu/if-newline": "off",
|
39
|
+
"antfu/no-import-dist": "off",
|
40
|
+
"antfu/top-level-function": "off",
|
41
|
+
"node/prefer-global/process": "off",
|
42
|
+
"unused-imports/no-unused-vars": "off"
|
43
|
+
});
|
44
|
+
|
45
|
+
// src/lib/recommended.ts
|
46
|
+
var recommended_default = prefixary({
|
47
|
+
"constructor-super": "warn",
|
48
|
+
"for-direction": "warn",
|
49
|
+
"getter-return": "warn",
|
50
|
+
"no-async-promise-executor": "warn",
|
51
|
+
"no-case-declarations": "warn",
|
52
|
+
"no-class-assign": "warn",
|
53
|
+
"no-compare-neg-zero": "warn",
|
54
|
+
"no-cond-assign": "off",
|
55
|
+
"no-const-assign": "warn",
|
56
|
+
"no-constant-binary-expression": "warn",
|
57
|
+
"no-constant-condition": ["warn", {
|
58
|
+
checkLoops: false
|
59
|
+
}],
|
60
|
+
"no-control-regex": "warn",
|
61
|
+
"no-debugger": "warn",
|
62
|
+
"no-delete-var": "warn",
|
63
|
+
"no-dupe-args": "warn",
|
64
|
+
"no-dupe-class-members": "warn",
|
65
|
+
"no-dupe-else-if": "warn",
|
66
|
+
"no-dupe-keys": "warn",
|
67
|
+
"no-duplicate-case": "warn",
|
68
|
+
"no-empty": "warn",
|
69
|
+
"no-empty-character-class": "warn",
|
70
|
+
"no-empty-static-block": "warn",
|
71
|
+
"no-empty-pattern": "warn",
|
72
|
+
"no-ex-assign": "warn",
|
73
|
+
"no-extra-boolean-cast": "warn",
|
74
|
+
"no-fallthrough": "off",
|
75
|
+
"no-func-assign": "warn",
|
76
|
+
"no-global-assign": "warn",
|
77
|
+
"no-import-assign": "warn",
|
78
|
+
"no-invalid-regexp": "warn",
|
79
|
+
"no-irregular-whitespace": "warn",
|
80
|
+
"no-loss-of-precision": "warn",
|
81
|
+
"no-misleading-character-class": "warn",
|
82
|
+
"no-new-native-nonconstructor": "warn",
|
83
|
+
"no-nonoctal-decimal-escape": "warn",
|
84
|
+
"no-obj-calls": "warn",
|
85
|
+
"no-octal": "warn",
|
86
|
+
"no-prototype-builtins": "warn",
|
87
|
+
"no-redeclare": "warn",
|
88
|
+
"no-regex-spaces": "warn",
|
89
|
+
"no-self-assign": "warn",
|
90
|
+
"no-setter-return": "warn",
|
91
|
+
"no-shadow-restricted-names": "warn",
|
92
|
+
"no-sparse-arrays": "warn",
|
93
|
+
"no-this-before-super": "warn",
|
94
|
+
"no-undef": "off",
|
95
|
+
"no-unexpected-multiline": "warn",
|
96
|
+
"no-unreachable": "warn",
|
97
|
+
"no-unsafe-finally": "warn",
|
98
|
+
"no-unsafe-negation": ["warn", {
|
99
|
+
enforceForOrderingRelations: true
|
100
|
+
}],
|
101
|
+
"no-unsafe-optional-chaining": "warn",
|
102
|
+
"no-unused-labels": "warn",
|
103
|
+
"no-unused-private-class-members": "warn",
|
104
|
+
"no-unused-vars": "off",
|
105
|
+
"no-useless-backreference": "warn",
|
106
|
+
"no-useless-catch": "warn",
|
107
|
+
"no-useless-escape": "warn",
|
108
|
+
"no-with": "warn",
|
109
|
+
"require-yield": "warn",
|
110
|
+
"use-isnan": ["warn", {
|
111
|
+
enforceForIndexOf: true
|
112
|
+
}],
|
113
|
+
"valid-typeof": "warn"
|
114
|
+
});
|
115
|
+
|
116
|
+
// src/lib/standard.ts
|
117
|
+
var standard_default = prefixary({
|
118
|
+
"accessor-pairs": "warn",
|
119
|
+
"array-callback-return": "warn",
|
120
|
+
"arrow-body-style": "off",
|
121
|
+
"block-scoped-var": "warn",
|
122
|
+
"camelcase": "off",
|
123
|
+
"capitalized-comments": "off",
|
124
|
+
"class-methods-use-this": "off",
|
125
|
+
"complexity": "off",
|
126
|
+
"consistent-return": "off",
|
127
|
+
"curly": ["warn", "multi-line"],
|
128
|
+
"default-case": "off",
|
129
|
+
"default-case-last": "warn",
|
130
|
+
"default-param-last": "warn",
|
131
|
+
"dot-notation": ["warn", {
|
132
|
+
allowPattern: "^[a-z]+(_[a-z]+)+$"
|
133
|
+
}],
|
134
|
+
"eqeqeq": ["warn", "smart"],
|
135
|
+
"func-name-matching": "off",
|
136
|
+
"func-names": "off",
|
137
|
+
"func-style": ["warn", "declaration", {
|
138
|
+
allowArrowFunctions: true
|
139
|
+
}],
|
140
|
+
"grouped-accessor-pairs": "off",
|
141
|
+
"guard-for-in": "off",
|
142
|
+
"id-denylist": "off",
|
143
|
+
"id-length": "off",
|
144
|
+
"id-match": "off",
|
145
|
+
"init-declarations": "off",
|
146
|
+
"logical-assignment-operators": "warn",
|
147
|
+
"max-classes-per-file": "off",
|
148
|
+
"max-depth": "off",
|
149
|
+
"max-lines": "off",
|
150
|
+
"max-lines-per-function": "off",
|
151
|
+
"max-nested-callbacks": "off",
|
152
|
+
"max-params": "off",
|
153
|
+
"max-statements": "off",
|
154
|
+
"multiline-comment-style": "warn",
|
155
|
+
"new-cap": "warn",
|
156
|
+
"no-alert": "warn",
|
157
|
+
"no-array-constructor": "warn",
|
158
|
+
"no-await-in-loop": "off",
|
159
|
+
"no-bitwise": "off",
|
160
|
+
"no-caller": "off",
|
161
|
+
"no-console": "off",
|
162
|
+
"no-constructor-return": "warn",
|
163
|
+
"no-continue": "off",
|
164
|
+
"no-div-regex": "off",
|
165
|
+
"no-duplicate-imports": "warn",
|
166
|
+
"no-else-return": "off",
|
167
|
+
"no-empty-function": "off",
|
168
|
+
"no-eq-null": "off",
|
169
|
+
"no-eval": "warn",
|
170
|
+
"no-extend-native": "warn",
|
171
|
+
"no-extra-bind": "warn",
|
172
|
+
"no-extra-label": "off",
|
173
|
+
"no-implicit-coercion": "off",
|
174
|
+
"no-implicit-globals": "off",
|
175
|
+
"no-implied-eval": "warn",
|
176
|
+
"no-inline-comments": "off",
|
177
|
+
"no-inner-declarations": "off",
|
178
|
+
"no-invalid-this": "off",
|
179
|
+
"no-iterator": "warn",
|
180
|
+
"no-label-var": "off",
|
181
|
+
"no-labels": "off",
|
182
|
+
"no-lone-blocks": "warn",
|
183
|
+
"no-lonely-if": "warn",
|
184
|
+
"no-loop-func": "warn",
|
185
|
+
"no-magic-numbers": "off",
|
186
|
+
"no-multi-assign": ["warn", {
|
187
|
+
ignoreNonDeclaration: true
|
188
|
+
}],
|
189
|
+
"no-multi-str": "warn",
|
190
|
+
"no-negated-condition": "off",
|
191
|
+
"no-nested-ternary": "off",
|
192
|
+
"no-new": "warn",
|
193
|
+
"no-new-func": "warn",
|
194
|
+
"no-new-wrappers": "warn",
|
195
|
+
"no-object-constructor": "warn",
|
196
|
+
"no-octal-escape": "warn",
|
197
|
+
"no-param-reassign": "off",
|
198
|
+
"no-plusplus": "off",
|
199
|
+
"no-promise-executor-return": "warn",
|
200
|
+
"no-proto": "warn",
|
201
|
+
"no-restricted-exports": "off",
|
202
|
+
"no-restricted-globals": "off",
|
203
|
+
"no-restricted-imports": "off",
|
204
|
+
"no-restricted-properties": "off",
|
205
|
+
"no-restricted-syntax": "off",
|
206
|
+
"no-return-assign": "warn",
|
207
|
+
"no-script-url": "off",
|
208
|
+
"no-self-compare": "warn",
|
209
|
+
"no-sequences": "off",
|
210
|
+
"no-shadow": "off",
|
211
|
+
"no-template-curly-in-string": "off",
|
212
|
+
"no-ternary": "off",
|
213
|
+
"no-throw-literal": "off",
|
214
|
+
"no-undef-init": "warn",
|
215
|
+
"no-undefined": "warn",
|
216
|
+
"no-underscore-dangle": "off",
|
217
|
+
"no-unmodified-loop-condition": "warn",
|
218
|
+
"no-unneeded-ternary": ["warn", {
|
219
|
+
defaultAssignment: false
|
220
|
+
}],
|
221
|
+
"no-unreachable-loop": "warn",
|
222
|
+
"no-unused-expressions": "off",
|
223
|
+
"no-unused-private-class-members": "warn",
|
224
|
+
"no-use-before-define": "off",
|
225
|
+
"no-useless-assignment": "off",
|
226
|
+
"no-useless-call": "warn",
|
227
|
+
"no-useless-computed-key": "warn",
|
228
|
+
"no-useless-concat": "warn",
|
229
|
+
"no-useless-constructor": "warn",
|
230
|
+
"no-useless-rename": "warn",
|
231
|
+
"no-useless-return": "warn",
|
232
|
+
"no-var": "warn",
|
233
|
+
"no-void": "off",
|
234
|
+
"no-warning-comments": "off",
|
235
|
+
"object-shorthand": ["warn", "methods"],
|
236
|
+
"one-var": ["warn", {
|
237
|
+
uninitialized: "consecutive"
|
238
|
+
}],
|
239
|
+
"operator-assignment": ["warn", "always"],
|
240
|
+
"prefer-arrow-callback": ["warn", {
|
241
|
+
allowNamedFunctions: false,
|
242
|
+
allowUnboundThis: true
|
243
|
+
}],
|
244
|
+
"prefer-const": ["warn", {
|
245
|
+
destructuring: "all",
|
246
|
+
ignoreReadBeforeAssign: false
|
247
|
+
}],
|
248
|
+
"prefer-destructuring": "off",
|
249
|
+
"prefer-exponentiation-operator": "warn",
|
250
|
+
"prefer-named-capture-group": "off",
|
251
|
+
"prefer-numeric-literals": "warn",
|
252
|
+
"prefer-object-has-own": "warn",
|
253
|
+
"prefer-object-spread": "warn",
|
254
|
+
"prefer-promise-reject-errors": "warn",
|
255
|
+
"prefer-regex-literals": ["warn", {
|
256
|
+
disallowRedundantWrapping: true
|
257
|
+
}],
|
258
|
+
"prefer-rest-params": "warn",
|
259
|
+
"prefer-spread": "warn",
|
260
|
+
"prefer-template": "off",
|
261
|
+
"radix": "off",
|
262
|
+
"require-atomic-updates": "off",
|
263
|
+
"require-await": "off",
|
264
|
+
"require-unicode-regexp": "off",
|
265
|
+
"sort-imports": "warn",
|
266
|
+
"sort-keys": "off",
|
267
|
+
"sort-vars": "off",
|
268
|
+
"strict": "off",
|
269
|
+
"symbol-description": "off",
|
270
|
+
"vars-on-top": "warn",
|
271
|
+
"yoda": ["warn", "never", {
|
272
|
+
exceptRange: true
|
273
|
+
}]
|
274
|
+
});
|
275
|
+
|
276
|
+
// src/lib/stylistic.ts
|
277
|
+
var stylistic_default = prefixary("style", {
|
278
|
+
"array-element-newline": ["warn", "consistent"],
|
279
|
+
"arrow-parens": ["warn", "always"],
|
280
|
+
"arrow-spacing": ["warn", {
|
281
|
+
before: true,
|
282
|
+
after: true
|
283
|
+
}],
|
284
|
+
"block-spacing": ["warn", "always"],
|
285
|
+
"brace-style": ["warn", "stroustrup"],
|
286
|
+
"comma-dangle": ["warn", "never"],
|
287
|
+
"comma-spacing": ["warn", {
|
288
|
+
before: false,
|
289
|
+
after: true
|
290
|
+
}],
|
291
|
+
"comma-style": ["warn", "last"],
|
292
|
+
"computed-property-spacing": ["warn", "never"],
|
293
|
+
"dot-location": ["warn", "property"],
|
294
|
+
"eol-last": ["warn", "never"],
|
295
|
+
"function-call-argument-newline": ["warn", "consistent"],
|
296
|
+
"function-call-spacing": ["warn", "never"],
|
297
|
+
"function-paren-newline": ["warn", "consistent"],
|
298
|
+
"implicit-arrow-linebreak": ["warn", "beside"],
|
299
|
+
"indent": "off",
|
300
|
+
"indent-binary-ops": "off",
|
301
|
+
"generator-star-spacing": ["warn", {
|
302
|
+
named: {
|
303
|
+
before: false,
|
304
|
+
after: true
|
305
|
+
},
|
306
|
+
anonymous: {
|
307
|
+
before: true,
|
308
|
+
after: false
|
309
|
+
},
|
310
|
+
method: {
|
311
|
+
before: true,
|
312
|
+
after: true
|
313
|
+
}
|
314
|
+
}],
|
315
|
+
"jsx-quotes": ["warn", "prefer-double"],
|
316
|
+
"key-spacing": ["warn", {
|
317
|
+
beforeColon: false,
|
318
|
+
afterColon: true,
|
319
|
+
mode: "strict"
|
320
|
+
}],
|
321
|
+
"keyword-spacing": ["warn", {
|
322
|
+
before: true,
|
323
|
+
after: true
|
324
|
+
}],
|
325
|
+
"linebreak-style": ["warn", "unix"],
|
326
|
+
"lines-between-class-members": ["warn", "always", {
|
327
|
+
exceptAfterSingleLine: true
|
328
|
+
}],
|
329
|
+
"member-delimiter-style": ["warn", {
|
330
|
+
multiline: {
|
331
|
+
delimiter: "semi",
|
332
|
+
requireLast: true
|
333
|
+
}
|
334
|
+
}],
|
335
|
+
"multiline-ternary": "off",
|
336
|
+
"new-parens": "warn",
|
337
|
+
"no-confusing-arrow": "warn",
|
338
|
+
"no-extra-parens": ["warn", "functions"],
|
339
|
+
"no-extra-semi": "warn",
|
340
|
+
"no-floating-decimal": "warn",
|
341
|
+
"no-mixed-operators": "off",
|
342
|
+
"no-mixed-spaces-and-tabs": "warn",
|
343
|
+
"no-multi-spaces": ["warn", {
|
344
|
+
ignoreEOLComments: true
|
345
|
+
}],
|
346
|
+
"no-multiple-empty-lines": ["warn", {
|
347
|
+
max: 1
|
348
|
+
}],
|
349
|
+
"no-tabs": "warn",
|
350
|
+
"no-trailing-spaces": "warn",
|
351
|
+
"no-whitespace-before-property": "warn",
|
352
|
+
"nonblock-statement-body-position": ["warn", "beside"],
|
353
|
+
"object-curly-newline": "warn",
|
354
|
+
"object-curly-spacing": ["warn", "always"],
|
355
|
+
"object-property-newline": ["warn", {
|
356
|
+
allowAllPropertiesOnSameLine: true
|
357
|
+
}],
|
358
|
+
"operator-linebreak": "off",
|
359
|
+
"padded-blocks": ["warn", "never"],
|
360
|
+
"quote-props": ["warn", "as-needed"],
|
361
|
+
"quotes": ["warn", "double", {
|
362
|
+
allowTemplateLiterals: true
|
363
|
+
}],
|
364
|
+
"rest-spread-spacing": ["warn", "never"],
|
365
|
+
"semi": ["warn", "always"],
|
366
|
+
"semi-spacing": ["warn", {
|
367
|
+
before: false,
|
368
|
+
after: true
|
369
|
+
}],
|
370
|
+
"semi-style": ["warn", "last"],
|
371
|
+
"space-before-blocks": ["warn", "always"],
|
372
|
+
"space-before-function-paren": ["warn", {
|
373
|
+
named: "never",
|
374
|
+
anonymous: "never",
|
375
|
+
asyncArrow: "always"
|
376
|
+
}],
|
377
|
+
"space-in-parens": ["warn", "never"],
|
378
|
+
"space-infix-ops": "warn",
|
379
|
+
"space-unary-ops": "warn",
|
380
|
+
"spaced-comment": "off",
|
381
|
+
"switch-colon-spacing": ["warn", {
|
382
|
+
before: false,
|
383
|
+
after: true
|
384
|
+
}],
|
385
|
+
"template-curly-spacing": ["warn", "never"],
|
386
|
+
"template-tag-spacing": ["warn", "never"],
|
387
|
+
"type-annotation-spacing": ["warn", {
|
388
|
+
before: false,
|
389
|
+
after: true,
|
390
|
+
overrides: {
|
391
|
+
arrow: {
|
392
|
+
before: true
|
393
|
+
}
|
394
|
+
}
|
395
|
+
}],
|
396
|
+
"type-generic-spacing": "warn",
|
397
|
+
"type-named-tuple-spacing": "warn",
|
398
|
+
"wrap-iife": ["warn", "inside", {
|
399
|
+
functionPrototypeMethods: true
|
400
|
+
}],
|
401
|
+
"yield-star-spacing": ["warn", "after"]
|
402
|
+
});
|
403
|
+
|
404
|
+
// src/lib/vue.ts
|
405
|
+
var vue_default = prefixary("vue", {
|
406
|
+
"attribute-hyphenation": "warn",
|
407
|
+
"attributes-order": ["warn", {
|
408
|
+
order: [
|
409
|
+
"LIST_RENDERING",
|
410
|
+
"CONDITIONALS",
|
411
|
+
"RENDER_MODIFIERS",
|
412
|
+
"OTHER_DIRECTIVES",
|
413
|
+
"SLOT",
|
414
|
+
"DEFINITION",
|
415
|
+
"UNIQUE",
|
416
|
+
"GLOBAL",
|
417
|
+
["ATTR_DYNAMIC", "ATTR_STATIC", "ATTR_SHORTHAND_BOOL"],
|
418
|
+
"TWO_WAY_BINDING",
|
419
|
+
"EVENTS",
|
420
|
+
"CONTENT"
|
421
|
+
]
|
422
|
+
}],
|
423
|
+
"comma-dangle": ["warn", "never"],
|
424
|
+
"component-definition-name-casing": ["warn", "kebab-case"],
|
425
|
+
"component-name-in-template-casing": ["warn", "kebab-case"],
|
426
|
+
"first-attribute-linebreak": ["warn", {
|
427
|
+
singleline: "beside",
|
428
|
+
multiline: "below"
|
429
|
+
}],
|
430
|
+
"html-closing-bracket-newline": ["warn", {
|
431
|
+
singleline: "never",
|
432
|
+
multiline: "always"
|
433
|
+
}],
|
434
|
+
"html-closing-bracket-spacing": "off",
|
435
|
+
"html-indent": "off",
|
436
|
+
"html-quotes": ["warn", "double"],
|
437
|
+
"html-self-closing": ["warn", {
|
438
|
+
html: {
|
439
|
+
void: "always",
|
440
|
+
normal: "never",
|
441
|
+
component: "always"
|
442
|
+
},
|
443
|
+
svg: "always",
|
444
|
+
math: "always"
|
445
|
+
}],
|
446
|
+
"multiline-html-element-content-newline": "off",
|
447
|
+
"mustache-interpolation-spacing": ["warn", "always"],
|
448
|
+
"no-dupe-keys": "warn",
|
449
|
+
"no-dupe-v-else-if": "warn",
|
450
|
+
"no-duplicate-attributes": "warn",
|
451
|
+
"no-export-in-script-setup": "warn",
|
452
|
+
"no-expose-after-await": "warn",
|
453
|
+
"no-lifecycle-after-await": "warn",
|
454
|
+
"no-lone-template": "warn",
|
455
|
+
"no-mutating-props": "warn",
|
456
|
+
"no-multiple-slot-args": "warn",
|
457
|
+
"no-multi-spaces": "warn",
|
458
|
+
"no-ref-as-operand": "warn",
|
459
|
+
"no-reserved-component-names": "warn",
|
460
|
+
"no-reserved-keys": "warn",
|
461
|
+
"no-reserved-props": "warn",
|
462
|
+
"no-side-effects-in-computed-properties": "warn",
|
463
|
+
"no-spaces-around-equal-signs-in-attribute": "warn",
|
464
|
+
"no-template-key": "warn",
|
465
|
+
"no-template-shadow": "warn",
|
466
|
+
"no-textarea-mustache": "warn",
|
467
|
+
"no-unused-vars": "warn",
|
468
|
+
"no-use-computed-property-like-method": "warn",
|
469
|
+
"no-use-v-if-with-v-for": "warn",
|
470
|
+
"no-useless-template-attributes": "warn",
|
471
|
+
"no-v-for-template-key-on-child": "warn",
|
472
|
+
"no-v-text-v-html-on-component": "warn",
|
473
|
+
"no-watch-after-await": "warn",
|
474
|
+
"one-component-per-file": "warn",
|
475
|
+
"operator-linebreak": "off",
|
476
|
+
"prefer-import-from-vue": "warn",
|
477
|
+
"prefer-template": "warn",
|
478
|
+
"prop-name-casing": ["warn", "camelCase"],
|
479
|
+
"require-component-is": "warn",
|
480
|
+
"require-explicit-emits": "warn",
|
481
|
+
"require-prop-type-constructor": "warn",
|
482
|
+
"require-render-return": "warn",
|
483
|
+
"require-slots-as-functions": "warn",
|
484
|
+
"require-toggle-inside-transition": "warn",
|
485
|
+
"require-valid-default-prop": "warn",
|
486
|
+
"require-v-for-key": "off",
|
487
|
+
"return-in-computed-property": "warn",
|
488
|
+
"return-in-emits-validator": "warn",
|
489
|
+
"singleline-html-element-content-newline": "off",
|
490
|
+
"this-in-template": ["warn", "never"],
|
491
|
+
"use-v-on-exact": "warn",
|
492
|
+
"valid-attribute-name": "warn",
|
493
|
+
"valid-define-emits": "warn",
|
494
|
+
"valid-define-props": "warn",
|
495
|
+
"valid-next-tick": "warn",
|
496
|
+
"valid-template-root": "off",
|
497
|
+
"valid-v-bind": "warn",
|
498
|
+
"valid-v-cloak": "warn",
|
499
|
+
"valid-v-else-if": "warn",
|
500
|
+
"valid-v-else": "warn",
|
501
|
+
"valid-v-for": "off",
|
502
|
+
"valid-v-html": "warn",
|
503
|
+
"valid-v-if": "warn",
|
504
|
+
"valid-v-memo": "warn",
|
505
|
+
"valid-v-model": "warn",
|
506
|
+
"valid-v-on": "warn",
|
507
|
+
"valid-v-once": "warn",
|
508
|
+
"valid-v-pre": "warn",
|
509
|
+
"valid-v-show": "warn",
|
510
|
+
"valid-v-slot": "warn",
|
511
|
+
"valid-v-text": "warn",
|
512
|
+
"v-bind-style": ["warn", "shorthand"],
|
513
|
+
"v-on-style": ["warn", "shorthand"]
|
514
|
+
});
|
515
|
+
|
516
|
+
// src/index.ts
|
517
|
+
var src_default = {
|
518
|
+
patch: patch_default,
|
519
|
+
recommended: recommended_default,
|
520
|
+
standard: standard_default,
|
521
|
+
stylistic: stylistic_default,
|
522
|
+
vue: vue_default
|
523
|
+
};
|
package/dist/index.js
ADDED
@@ -0,0 +1,501 @@
|
|
1
|
+
// src/utils.ts
|
2
|
+
function prefixary(prefix, rules) {
|
3
|
+
return typeof prefix === "object" ? prefix : Object.fromEntries(
|
4
|
+
Object.entries(rules).map(([key, value]) => {
|
5
|
+
return [`${prefix}/${key}`, value];
|
6
|
+
})
|
7
|
+
);
|
8
|
+
}
|
9
|
+
|
10
|
+
// src/lib/patch.ts
|
11
|
+
var patch_default = prefixary({
|
12
|
+
"antfu/curly": "off",
|
13
|
+
"antfu/if-newline": "off",
|
14
|
+
"antfu/no-import-dist": "off",
|
15
|
+
"antfu/top-level-function": "off",
|
16
|
+
"node/prefer-global/process": "off",
|
17
|
+
"unused-imports/no-unused-vars": "off"
|
18
|
+
});
|
19
|
+
|
20
|
+
// src/lib/recommended.ts
|
21
|
+
var recommended_default = prefixary({
|
22
|
+
"constructor-super": "warn",
|
23
|
+
"for-direction": "warn",
|
24
|
+
"getter-return": "warn",
|
25
|
+
"no-async-promise-executor": "warn",
|
26
|
+
"no-case-declarations": "warn",
|
27
|
+
"no-class-assign": "warn",
|
28
|
+
"no-compare-neg-zero": "warn",
|
29
|
+
"no-cond-assign": "off",
|
30
|
+
"no-const-assign": "warn",
|
31
|
+
"no-constant-binary-expression": "warn",
|
32
|
+
"no-constant-condition": ["warn", {
|
33
|
+
checkLoops: false
|
34
|
+
}],
|
35
|
+
"no-control-regex": "warn",
|
36
|
+
"no-debugger": "warn",
|
37
|
+
"no-delete-var": "warn",
|
38
|
+
"no-dupe-args": "warn",
|
39
|
+
"no-dupe-class-members": "warn",
|
40
|
+
"no-dupe-else-if": "warn",
|
41
|
+
"no-dupe-keys": "warn",
|
42
|
+
"no-duplicate-case": "warn",
|
43
|
+
"no-empty": "warn",
|
44
|
+
"no-empty-character-class": "warn",
|
45
|
+
"no-empty-static-block": "warn",
|
46
|
+
"no-empty-pattern": "warn",
|
47
|
+
"no-ex-assign": "warn",
|
48
|
+
"no-extra-boolean-cast": "warn",
|
49
|
+
"no-fallthrough": "off",
|
50
|
+
"no-func-assign": "warn",
|
51
|
+
"no-global-assign": "warn",
|
52
|
+
"no-import-assign": "warn",
|
53
|
+
"no-invalid-regexp": "warn",
|
54
|
+
"no-irregular-whitespace": "warn",
|
55
|
+
"no-loss-of-precision": "warn",
|
56
|
+
"no-misleading-character-class": "warn",
|
57
|
+
"no-new-native-nonconstructor": "warn",
|
58
|
+
"no-nonoctal-decimal-escape": "warn",
|
59
|
+
"no-obj-calls": "warn",
|
60
|
+
"no-octal": "warn",
|
61
|
+
"no-prototype-builtins": "warn",
|
62
|
+
"no-redeclare": "warn",
|
63
|
+
"no-regex-spaces": "warn",
|
64
|
+
"no-self-assign": "warn",
|
65
|
+
"no-setter-return": "warn",
|
66
|
+
"no-shadow-restricted-names": "warn",
|
67
|
+
"no-sparse-arrays": "warn",
|
68
|
+
"no-this-before-super": "warn",
|
69
|
+
"no-undef": "off",
|
70
|
+
"no-unexpected-multiline": "warn",
|
71
|
+
"no-unreachable": "warn",
|
72
|
+
"no-unsafe-finally": "warn",
|
73
|
+
"no-unsafe-negation": ["warn", {
|
74
|
+
enforceForOrderingRelations: true
|
75
|
+
}],
|
76
|
+
"no-unsafe-optional-chaining": "warn",
|
77
|
+
"no-unused-labels": "warn",
|
78
|
+
"no-unused-private-class-members": "warn",
|
79
|
+
"no-unused-vars": "off",
|
80
|
+
"no-useless-backreference": "warn",
|
81
|
+
"no-useless-catch": "warn",
|
82
|
+
"no-useless-escape": "warn",
|
83
|
+
"no-with": "warn",
|
84
|
+
"require-yield": "warn",
|
85
|
+
"use-isnan": ["warn", {
|
86
|
+
enforceForIndexOf: true
|
87
|
+
}],
|
88
|
+
"valid-typeof": "warn"
|
89
|
+
});
|
90
|
+
|
91
|
+
// src/lib/standard.ts
|
92
|
+
var standard_default = prefixary({
|
93
|
+
"accessor-pairs": "warn",
|
94
|
+
"array-callback-return": "warn",
|
95
|
+
"arrow-body-style": "off",
|
96
|
+
"block-scoped-var": "warn",
|
97
|
+
"camelcase": "off",
|
98
|
+
"capitalized-comments": "off",
|
99
|
+
"class-methods-use-this": "off",
|
100
|
+
"complexity": "off",
|
101
|
+
"consistent-return": "off",
|
102
|
+
"curly": ["warn", "multi-line"],
|
103
|
+
"default-case": "off",
|
104
|
+
"default-case-last": "warn",
|
105
|
+
"default-param-last": "warn",
|
106
|
+
"dot-notation": ["warn", {
|
107
|
+
allowPattern: "^[a-z]+(_[a-z]+)+$"
|
108
|
+
}],
|
109
|
+
"eqeqeq": ["warn", "smart"],
|
110
|
+
"func-name-matching": "off",
|
111
|
+
"func-names": "off",
|
112
|
+
"func-style": ["warn", "declaration", {
|
113
|
+
allowArrowFunctions: true
|
114
|
+
}],
|
115
|
+
"grouped-accessor-pairs": "off",
|
116
|
+
"guard-for-in": "off",
|
117
|
+
"id-denylist": "off",
|
118
|
+
"id-length": "off",
|
119
|
+
"id-match": "off",
|
120
|
+
"init-declarations": "off",
|
121
|
+
"logical-assignment-operators": "warn",
|
122
|
+
"max-classes-per-file": "off",
|
123
|
+
"max-depth": "off",
|
124
|
+
"max-lines": "off",
|
125
|
+
"max-lines-per-function": "off",
|
126
|
+
"max-nested-callbacks": "off",
|
127
|
+
"max-params": "off",
|
128
|
+
"max-statements": "off",
|
129
|
+
"multiline-comment-style": "warn",
|
130
|
+
"new-cap": "warn",
|
131
|
+
"no-alert": "warn",
|
132
|
+
"no-array-constructor": "warn",
|
133
|
+
"no-await-in-loop": "off",
|
134
|
+
"no-bitwise": "off",
|
135
|
+
"no-caller": "off",
|
136
|
+
"no-console": "off",
|
137
|
+
"no-constructor-return": "warn",
|
138
|
+
"no-continue": "off",
|
139
|
+
"no-div-regex": "off",
|
140
|
+
"no-duplicate-imports": "warn",
|
141
|
+
"no-else-return": "off",
|
142
|
+
"no-empty-function": "off",
|
143
|
+
"no-eq-null": "off",
|
144
|
+
"no-eval": "warn",
|
145
|
+
"no-extend-native": "warn",
|
146
|
+
"no-extra-bind": "warn",
|
147
|
+
"no-extra-label": "off",
|
148
|
+
"no-implicit-coercion": "off",
|
149
|
+
"no-implicit-globals": "off",
|
150
|
+
"no-implied-eval": "warn",
|
151
|
+
"no-inline-comments": "off",
|
152
|
+
"no-inner-declarations": "off",
|
153
|
+
"no-invalid-this": "off",
|
154
|
+
"no-iterator": "warn",
|
155
|
+
"no-label-var": "off",
|
156
|
+
"no-labels": "off",
|
157
|
+
"no-lone-blocks": "warn",
|
158
|
+
"no-lonely-if": "warn",
|
159
|
+
"no-loop-func": "warn",
|
160
|
+
"no-magic-numbers": "off",
|
161
|
+
"no-multi-assign": ["warn", {
|
162
|
+
ignoreNonDeclaration: true
|
163
|
+
}],
|
164
|
+
"no-multi-str": "warn",
|
165
|
+
"no-negated-condition": "off",
|
166
|
+
"no-nested-ternary": "off",
|
167
|
+
"no-new": "warn",
|
168
|
+
"no-new-func": "warn",
|
169
|
+
"no-new-wrappers": "warn",
|
170
|
+
"no-object-constructor": "warn",
|
171
|
+
"no-octal-escape": "warn",
|
172
|
+
"no-param-reassign": "off",
|
173
|
+
"no-plusplus": "off",
|
174
|
+
"no-promise-executor-return": "warn",
|
175
|
+
"no-proto": "warn",
|
176
|
+
"no-restricted-exports": "off",
|
177
|
+
"no-restricted-globals": "off",
|
178
|
+
"no-restricted-imports": "off",
|
179
|
+
"no-restricted-properties": "off",
|
180
|
+
"no-restricted-syntax": "off",
|
181
|
+
"no-return-assign": "warn",
|
182
|
+
"no-script-url": "off",
|
183
|
+
"no-self-compare": "warn",
|
184
|
+
"no-sequences": "off",
|
185
|
+
"no-shadow": "off",
|
186
|
+
"no-template-curly-in-string": "off",
|
187
|
+
"no-ternary": "off",
|
188
|
+
"no-throw-literal": "off",
|
189
|
+
"no-undef-init": "warn",
|
190
|
+
"no-undefined": "warn",
|
191
|
+
"no-underscore-dangle": "off",
|
192
|
+
"no-unmodified-loop-condition": "warn",
|
193
|
+
"no-unneeded-ternary": ["warn", {
|
194
|
+
defaultAssignment: false
|
195
|
+
}],
|
196
|
+
"no-unreachable-loop": "warn",
|
197
|
+
"no-unused-expressions": "off",
|
198
|
+
"no-unused-private-class-members": "warn",
|
199
|
+
"no-use-before-define": "off",
|
200
|
+
"no-useless-assignment": "off",
|
201
|
+
"no-useless-call": "warn",
|
202
|
+
"no-useless-computed-key": "warn",
|
203
|
+
"no-useless-concat": "warn",
|
204
|
+
"no-useless-constructor": "warn",
|
205
|
+
"no-useless-rename": "warn",
|
206
|
+
"no-useless-return": "warn",
|
207
|
+
"no-var": "warn",
|
208
|
+
"no-void": "off",
|
209
|
+
"no-warning-comments": "off",
|
210
|
+
"object-shorthand": ["warn", "methods"],
|
211
|
+
"one-var": ["warn", {
|
212
|
+
uninitialized: "consecutive"
|
213
|
+
}],
|
214
|
+
"operator-assignment": ["warn", "always"],
|
215
|
+
"prefer-arrow-callback": ["warn", {
|
216
|
+
allowNamedFunctions: false,
|
217
|
+
allowUnboundThis: true
|
218
|
+
}],
|
219
|
+
"prefer-const": ["warn", {
|
220
|
+
destructuring: "all",
|
221
|
+
ignoreReadBeforeAssign: false
|
222
|
+
}],
|
223
|
+
"prefer-destructuring": "off",
|
224
|
+
"prefer-exponentiation-operator": "warn",
|
225
|
+
"prefer-named-capture-group": "off",
|
226
|
+
"prefer-numeric-literals": "warn",
|
227
|
+
"prefer-object-has-own": "warn",
|
228
|
+
"prefer-object-spread": "warn",
|
229
|
+
"prefer-promise-reject-errors": "warn",
|
230
|
+
"prefer-regex-literals": ["warn", {
|
231
|
+
disallowRedundantWrapping: true
|
232
|
+
}],
|
233
|
+
"prefer-rest-params": "warn",
|
234
|
+
"prefer-spread": "warn",
|
235
|
+
"prefer-template": "off",
|
236
|
+
"radix": "off",
|
237
|
+
"require-atomic-updates": "off",
|
238
|
+
"require-await": "off",
|
239
|
+
"require-unicode-regexp": "off",
|
240
|
+
"sort-imports": "warn",
|
241
|
+
"sort-keys": "off",
|
242
|
+
"sort-vars": "off",
|
243
|
+
"strict": "off",
|
244
|
+
"symbol-description": "off",
|
245
|
+
"vars-on-top": "warn",
|
246
|
+
"yoda": ["warn", "never", {
|
247
|
+
exceptRange: true
|
248
|
+
}]
|
249
|
+
});
|
250
|
+
|
251
|
+
// src/lib/stylistic.ts
|
252
|
+
var stylistic_default = prefixary("style", {
|
253
|
+
"array-element-newline": ["warn", "consistent"],
|
254
|
+
"arrow-parens": ["warn", "always"],
|
255
|
+
"arrow-spacing": ["warn", {
|
256
|
+
before: true,
|
257
|
+
after: true
|
258
|
+
}],
|
259
|
+
"block-spacing": ["warn", "always"],
|
260
|
+
"brace-style": ["warn", "stroustrup"],
|
261
|
+
"comma-dangle": ["warn", "never"],
|
262
|
+
"comma-spacing": ["warn", {
|
263
|
+
before: false,
|
264
|
+
after: true
|
265
|
+
}],
|
266
|
+
"comma-style": ["warn", "last"],
|
267
|
+
"computed-property-spacing": ["warn", "never"],
|
268
|
+
"dot-location": ["warn", "property"],
|
269
|
+
"eol-last": ["warn", "never"],
|
270
|
+
"function-call-argument-newline": ["warn", "consistent"],
|
271
|
+
"function-call-spacing": ["warn", "never"],
|
272
|
+
"function-paren-newline": ["warn", "consistent"],
|
273
|
+
"implicit-arrow-linebreak": ["warn", "beside"],
|
274
|
+
"indent": "off",
|
275
|
+
"indent-binary-ops": "off",
|
276
|
+
"generator-star-spacing": ["warn", {
|
277
|
+
named: {
|
278
|
+
before: false,
|
279
|
+
after: true
|
280
|
+
},
|
281
|
+
anonymous: {
|
282
|
+
before: true,
|
283
|
+
after: false
|
284
|
+
},
|
285
|
+
method: {
|
286
|
+
before: true,
|
287
|
+
after: true
|
288
|
+
}
|
289
|
+
}],
|
290
|
+
"jsx-quotes": ["warn", "prefer-double"],
|
291
|
+
"key-spacing": ["warn", {
|
292
|
+
beforeColon: false,
|
293
|
+
afterColon: true,
|
294
|
+
mode: "strict"
|
295
|
+
}],
|
296
|
+
"keyword-spacing": ["warn", {
|
297
|
+
before: true,
|
298
|
+
after: true
|
299
|
+
}],
|
300
|
+
"linebreak-style": ["warn", "unix"],
|
301
|
+
"lines-between-class-members": ["warn", "always", {
|
302
|
+
exceptAfterSingleLine: true
|
303
|
+
}],
|
304
|
+
"member-delimiter-style": ["warn", {
|
305
|
+
multiline: {
|
306
|
+
delimiter: "semi",
|
307
|
+
requireLast: true
|
308
|
+
}
|
309
|
+
}],
|
310
|
+
"multiline-ternary": "off",
|
311
|
+
"new-parens": "warn",
|
312
|
+
"no-confusing-arrow": "warn",
|
313
|
+
"no-extra-parens": ["warn", "functions"],
|
314
|
+
"no-extra-semi": "warn",
|
315
|
+
"no-floating-decimal": "warn",
|
316
|
+
"no-mixed-operators": "off",
|
317
|
+
"no-mixed-spaces-and-tabs": "warn",
|
318
|
+
"no-multi-spaces": ["warn", {
|
319
|
+
ignoreEOLComments: true
|
320
|
+
}],
|
321
|
+
"no-multiple-empty-lines": ["warn", {
|
322
|
+
max: 1
|
323
|
+
}],
|
324
|
+
"no-tabs": "warn",
|
325
|
+
"no-trailing-spaces": "warn",
|
326
|
+
"no-whitespace-before-property": "warn",
|
327
|
+
"nonblock-statement-body-position": ["warn", "beside"],
|
328
|
+
"object-curly-newline": "warn",
|
329
|
+
"object-curly-spacing": ["warn", "always"],
|
330
|
+
"object-property-newline": ["warn", {
|
331
|
+
allowAllPropertiesOnSameLine: true
|
332
|
+
}],
|
333
|
+
"operator-linebreak": "off",
|
334
|
+
"padded-blocks": ["warn", "never"],
|
335
|
+
"quote-props": ["warn", "as-needed"],
|
336
|
+
"quotes": ["warn", "double", {
|
337
|
+
allowTemplateLiterals: true
|
338
|
+
}],
|
339
|
+
"rest-spread-spacing": ["warn", "never"],
|
340
|
+
"semi": ["warn", "always"],
|
341
|
+
"semi-spacing": ["warn", {
|
342
|
+
before: false,
|
343
|
+
after: true
|
344
|
+
}],
|
345
|
+
"semi-style": ["warn", "last"],
|
346
|
+
"space-before-blocks": ["warn", "always"],
|
347
|
+
"space-before-function-paren": ["warn", {
|
348
|
+
named: "never",
|
349
|
+
anonymous: "never",
|
350
|
+
asyncArrow: "always"
|
351
|
+
}],
|
352
|
+
"space-in-parens": ["warn", "never"],
|
353
|
+
"space-infix-ops": "warn",
|
354
|
+
"space-unary-ops": "warn",
|
355
|
+
"spaced-comment": "off",
|
356
|
+
"switch-colon-spacing": ["warn", {
|
357
|
+
before: false,
|
358
|
+
after: true
|
359
|
+
}],
|
360
|
+
"template-curly-spacing": ["warn", "never"],
|
361
|
+
"template-tag-spacing": ["warn", "never"],
|
362
|
+
"type-annotation-spacing": ["warn", {
|
363
|
+
before: false,
|
364
|
+
after: true,
|
365
|
+
overrides: {
|
366
|
+
arrow: {
|
367
|
+
before: true
|
368
|
+
}
|
369
|
+
}
|
370
|
+
}],
|
371
|
+
"type-generic-spacing": "warn",
|
372
|
+
"type-named-tuple-spacing": "warn",
|
373
|
+
"wrap-iife": ["warn", "inside", {
|
374
|
+
functionPrototypeMethods: true
|
375
|
+
}],
|
376
|
+
"yield-star-spacing": ["warn", "after"]
|
377
|
+
});
|
378
|
+
|
379
|
+
// src/lib/vue.ts
|
380
|
+
var vue_default = prefixary("vue", {
|
381
|
+
"attribute-hyphenation": "warn",
|
382
|
+
"attributes-order": ["warn", {
|
383
|
+
order: [
|
384
|
+
"LIST_RENDERING",
|
385
|
+
"CONDITIONALS",
|
386
|
+
"RENDER_MODIFIERS",
|
387
|
+
"OTHER_DIRECTIVES",
|
388
|
+
"SLOT",
|
389
|
+
"DEFINITION",
|
390
|
+
"UNIQUE",
|
391
|
+
"GLOBAL",
|
392
|
+
["ATTR_DYNAMIC", "ATTR_STATIC", "ATTR_SHORTHAND_BOOL"],
|
393
|
+
"TWO_WAY_BINDING",
|
394
|
+
"EVENTS",
|
395
|
+
"CONTENT"
|
396
|
+
]
|
397
|
+
}],
|
398
|
+
"comma-dangle": ["warn", "never"],
|
399
|
+
"component-definition-name-casing": ["warn", "kebab-case"],
|
400
|
+
"component-name-in-template-casing": ["warn", "kebab-case"],
|
401
|
+
"first-attribute-linebreak": ["warn", {
|
402
|
+
singleline: "beside",
|
403
|
+
multiline: "below"
|
404
|
+
}],
|
405
|
+
"html-closing-bracket-newline": ["warn", {
|
406
|
+
singleline: "never",
|
407
|
+
multiline: "always"
|
408
|
+
}],
|
409
|
+
"html-closing-bracket-spacing": "off",
|
410
|
+
"html-indent": "off",
|
411
|
+
"html-quotes": ["warn", "double"],
|
412
|
+
"html-self-closing": ["warn", {
|
413
|
+
html: {
|
414
|
+
void: "always",
|
415
|
+
normal: "never",
|
416
|
+
component: "always"
|
417
|
+
},
|
418
|
+
svg: "always",
|
419
|
+
math: "always"
|
420
|
+
}],
|
421
|
+
"multiline-html-element-content-newline": "off",
|
422
|
+
"mustache-interpolation-spacing": ["warn", "always"],
|
423
|
+
"no-dupe-keys": "warn",
|
424
|
+
"no-dupe-v-else-if": "warn",
|
425
|
+
"no-duplicate-attributes": "warn",
|
426
|
+
"no-export-in-script-setup": "warn",
|
427
|
+
"no-expose-after-await": "warn",
|
428
|
+
"no-lifecycle-after-await": "warn",
|
429
|
+
"no-lone-template": "warn",
|
430
|
+
"no-mutating-props": "warn",
|
431
|
+
"no-multiple-slot-args": "warn",
|
432
|
+
"no-multi-spaces": "warn",
|
433
|
+
"no-ref-as-operand": "warn",
|
434
|
+
"no-reserved-component-names": "warn",
|
435
|
+
"no-reserved-keys": "warn",
|
436
|
+
"no-reserved-props": "warn",
|
437
|
+
"no-side-effects-in-computed-properties": "warn",
|
438
|
+
"no-spaces-around-equal-signs-in-attribute": "warn",
|
439
|
+
"no-template-key": "warn",
|
440
|
+
"no-template-shadow": "warn",
|
441
|
+
"no-textarea-mustache": "warn",
|
442
|
+
"no-unused-vars": "warn",
|
443
|
+
"no-use-computed-property-like-method": "warn",
|
444
|
+
"no-use-v-if-with-v-for": "warn",
|
445
|
+
"no-useless-template-attributes": "warn",
|
446
|
+
"no-v-for-template-key-on-child": "warn",
|
447
|
+
"no-v-text-v-html-on-component": "warn",
|
448
|
+
"no-watch-after-await": "warn",
|
449
|
+
"one-component-per-file": "warn",
|
450
|
+
"operator-linebreak": "off",
|
451
|
+
"prefer-import-from-vue": "warn",
|
452
|
+
"prefer-template": "warn",
|
453
|
+
"prop-name-casing": ["warn", "camelCase"],
|
454
|
+
"require-component-is": "warn",
|
455
|
+
"require-explicit-emits": "warn",
|
456
|
+
"require-prop-type-constructor": "warn",
|
457
|
+
"require-render-return": "warn",
|
458
|
+
"require-slots-as-functions": "warn",
|
459
|
+
"require-toggle-inside-transition": "warn",
|
460
|
+
"require-valid-default-prop": "warn",
|
461
|
+
"require-v-for-key": "off",
|
462
|
+
"return-in-computed-property": "warn",
|
463
|
+
"return-in-emits-validator": "warn",
|
464
|
+
"singleline-html-element-content-newline": "off",
|
465
|
+
"this-in-template": ["warn", "never"],
|
466
|
+
"use-v-on-exact": "warn",
|
467
|
+
"valid-attribute-name": "warn",
|
468
|
+
"valid-define-emits": "warn",
|
469
|
+
"valid-define-props": "warn",
|
470
|
+
"valid-next-tick": "warn",
|
471
|
+
"valid-template-root": "off",
|
472
|
+
"valid-v-bind": "warn",
|
473
|
+
"valid-v-cloak": "warn",
|
474
|
+
"valid-v-else-if": "warn",
|
475
|
+
"valid-v-else": "warn",
|
476
|
+
"valid-v-for": "off",
|
477
|
+
"valid-v-html": "warn",
|
478
|
+
"valid-v-if": "warn",
|
479
|
+
"valid-v-memo": "warn",
|
480
|
+
"valid-v-model": "warn",
|
481
|
+
"valid-v-on": "warn",
|
482
|
+
"valid-v-once": "warn",
|
483
|
+
"valid-v-pre": "warn",
|
484
|
+
"valid-v-show": "warn",
|
485
|
+
"valid-v-slot": "warn",
|
486
|
+
"valid-v-text": "warn",
|
487
|
+
"v-bind-style": ["warn", "shorthand"],
|
488
|
+
"v-on-style": ["warn", "shorthand"]
|
489
|
+
});
|
490
|
+
|
491
|
+
// src/index.ts
|
492
|
+
var src_default = {
|
493
|
+
patch: patch_default,
|
494
|
+
recommended: recommended_default,
|
495
|
+
standard: standard_default,
|
496
|
+
stylistic: stylistic_default,
|
497
|
+
vue: vue_default
|
498
|
+
};
|
499
|
+
export {
|
500
|
+
src_default as default
|
501
|
+
};
|
package/package.json
CHANGED
@@ -1,12 +1,32 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zinkawaii/eslint-config",
|
3
|
-
"version": "0.
|
4
|
-
"main": "index.js",
|
3
|
+
"version": "0.1.1",
|
5
4
|
"author": "KazariEX",
|
6
5
|
"license": "MIT",
|
7
6
|
"repository": {
|
8
7
|
"type": "git",
|
9
8
|
"url": "https://github.com/KazariEX/eslint-config.git"
|
10
9
|
},
|
11
|
-
"type": "module"
|
10
|
+
"type": "module",
|
11
|
+
"files": [
|
12
|
+
"dist",
|
13
|
+
"LICENSE"
|
14
|
+
],
|
15
|
+
"main": "./dist/index.js",
|
16
|
+
"types": "./index.d.ts",
|
17
|
+
"exports": {
|
18
|
+
".": {
|
19
|
+
"import": "./dist/index.js",
|
20
|
+
"require": "./dist/index.cjs",
|
21
|
+
"types": "./index.d.ts"
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"scripts": {
|
25
|
+
"build": "tsup",
|
26
|
+
"watch": "tsup --watch"
|
27
|
+
},
|
28
|
+
"devDependencies": {
|
29
|
+
"@antfu/eslint-config": "^2.19.2",
|
30
|
+
"tsup": "^8.0.2"
|
31
|
+
}
|
12
32
|
}
|
package/index.js
DELETED
package/lib/recommended.js
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
export default {
|
2
|
-
"constructor-super": "warn",
|
3
|
-
"for-direction": "warn",
|
4
|
-
"getter-return": "warn",
|
5
|
-
"no-async-promise-executor": "warn",
|
6
|
-
"no-class-assign": "warn",
|
7
|
-
"no-compare-neg-zero": "warn",
|
8
|
-
"no-const-assign": "warn",
|
9
|
-
"no-constant-condition": ["warn", {
|
10
|
-
checkLoops: false
|
11
|
-
}],
|
12
|
-
"no-control-regex": "warn",
|
13
|
-
"no-debugger": "warn",
|
14
|
-
"no-dupe-args": "warn",
|
15
|
-
"no-dupe-class-members": "warn",
|
16
|
-
"no-dupe-else-if": "warn",
|
17
|
-
"no-dupe-keys": "warn",
|
18
|
-
"no-duplicate-case": "warn",
|
19
|
-
"no-empty-character-class": "warn",
|
20
|
-
"no-empty-pattern": "warn",
|
21
|
-
"no-ex-assign": "warn",
|
22
|
-
"no-func-assign": "warn",
|
23
|
-
"no-import-assign": "warn",
|
24
|
-
"no-invalid-regexp": "warn",
|
25
|
-
"no-irregular-whitespace": "warn",
|
26
|
-
"no-loss-of-precision": "warn",
|
27
|
-
"no-misleading-character-class": "warn",
|
28
|
-
"no-new-symbol": "warn",
|
29
|
-
"no-obj-calls": "warn",
|
30
|
-
"no-prototype-builtins": "warn",
|
31
|
-
"no-self-assign": "warn",
|
32
|
-
"no-setter-return": "warn",
|
33
|
-
"no-sparse-arrays": "warn",
|
34
|
-
"no-this-before-super": "warn",
|
35
|
-
"no-unexpected-multiline": "warn",
|
36
|
-
"no-unreachable": "warn",
|
37
|
-
"no-unsafe-finally": "warn",
|
38
|
-
"no-unsafe-negation": ["warn", {
|
39
|
-
enforceForOrderingRelations: true
|
40
|
-
}],
|
41
|
-
"no-unsafe-optional-chaining": "warn",
|
42
|
-
"no-useless-backreference": "warn",
|
43
|
-
"use-isnan": ["warn", {
|
44
|
-
enforceForIndexOf: true
|
45
|
-
}],
|
46
|
-
"valid-typeof": "warn"
|
47
|
-
};
|
package/lib/standard.js
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
export default {
|
2
|
-
"array-callback-return": "warn",
|
3
|
-
"dot-notation": ["warn", {
|
4
|
-
allowPattern: "^[a-z]+(_[a-z]+)+$"
|
5
|
-
}],
|
6
|
-
"eqeqeq": ["warn", "smart"],
|
7
|
-
"no-constant-binary-expression": "warn",
|
8
|
-
"no-constructor-return": "warn",
|
9
|
-
"no-duplicate-imports": "warn",
|
10
|
-
"no-promise-executor-return": "warn",
|
11
|
-
"no-self-compare": "warn",
|
12
|
-
"no-unreachable-loop": "warn",
|
13
|
-
"no-unused-private-class-members": "warn",
|
14
|
-
"no-useless-concat": "warn",
|
15
|
-
"no-useless-rename": "warn",
|
16
|
-
"no-useless-return": "warn",
|
17
|
-
"no-var": "warn",
|
18
|
-
"object-shorthand": ["warn", "methods"],
|
19
|
-
"operator-assignment": ["warn", "always"],
|
20
|
-
"prefer-const": ["warn", {
|
21
|
-
destructuring: "all",
|
22
|
-
ignoreReadBeforeAssign: false
|
23
|
-
}],
|
24
|
-
"prefer-rest-params": "warn",
|
25
|
-
"prefer-spread": "warn",
|
26
|
-
"yoda": ["warn", "never", {
|
27
|
-
exceptRange: true
|
28
|
-
}]
|
29
|
-
};
|
package/lib/stylistic.js
DELETED
@@ -1,96 +0,0 @@
|
|
1
|
-
import { withPrefix } from "../utils/index.js";
|
2
|
-
|
3
|
-
export default withPrefix("stylistic", {
|
4
|
-
"array-bracket-newline": ["warn", "consistent"],
|
5
|
-
"array-bracket-spacing": ["warn", "never"],
|
6
|
-
"arrow-parens": ["warn", "always"],
|
7
|
-
"arrow-spacing": ["warn", {
|
8
|
-
before: true,
|
9
|
-
after: true
|
10
|
-
}],
|
11
|
-
"block-spacing": ["warn", "always"],
|
12
|
-
"brace-style": ["warn", "stroustrup"],
|
13
|
-
"comma-dangle": ["warn", "never"],
|
14
|
-
"comma-spacing": ["warn", {
|
15
|
-
before: false,
|
16
|
-
after: true
|
17
|
-
}],
|
18
|
-
"comma-style": ["warn", "last"],
|
19
|
-
"computed-property-spacing": ["warn", "never"],
|
20
|
-
"dot-location": ["warn", "property"],
|
21
|
-
"eol-last": ["warn", "never"],
|
22
|
-
"function-call-argument-newline": ["warn", "consistent"],
|
23
|
-
"function-call-spacing": ["warn", "never"],
|
24
|
-
"function-paren-newline": ["warn", "consistent"],
|
25
|
-
"implicit-arrow-linebreak": ["warn", "beside"],
|
26
|
-
"jsx-quotes": ["warn", "prefer-double"],
|
27
|
-
"generator-star-spacing": ["warn", {
|
28
|
-
named: {
|
29
|
-
before: false,
|
30
|
-
after: true
|
31
|
-
},
|
32
|
-
anonymous: {
|
33
|
-
before: true,
|
34
|
-
after: false
|
35
|
-
},
|
36
|
-
method: {
|
37
|
-
before: true,
|
38
|
-
after: true
|
39
|
-
}
|
40
|
-
}],
|
41
|
-
"key-spacing": ["warn", {
|
42
|
-
beforeColon: false,
|
43
|
-
afterColon: true,
|
44
|
-
mode: "strict"
|
45
|
-
}],
|
46
|
-
"keyword-spacing": ["warn", {
|
47
|
-
before: true,
|
48
|
-
after: true
|
49
|
-
}],
|
50
|
-
"linebreak-style": ["warn", "unix"],
|
51
|
-
"lines-between-class-members": ["warn", "always", {
|
52
|
-
exceptAfterSingleLine: true
|
53
|
-
}],
|
54
|
-
"no-confusing-arrow": "warn",
|
55
|
-
"no-floating-decimal": "warn",
|
56
|
-
"no-extra-parens": ["warn", "functions"],
|
57
|
-
"no-extra-semi": "warn",
|
58
|
-
"no-mixed-spaces-and-tabs": "warn",
|
59
|
-
"no-tabs": "warn",
|
60
|
-
"no-trailing-spaces": "warn",
|
61
|
-
"no-whitespace-before-property": "warn",
|
62
|
-
"nonblock-statement-body-position": ["warn", "beside"],
|
63
|
-
"object-curly-newline": "warn",
|
64
|
-
"object-curly-spacing": ["warn", "always"],
|
65
|
-
"object-property-newline": ["warn", {
|
66
|
-
allowAllPropertiesOnSameLine: true
|
67
|
-
}],
|
68
|
-
"quotes": ["warn", "double", {
|
69
|
-
allowTemplateLiterals: true
|
70
|
-
}],
|
71
|
-
"rest-spread-spacing": ["warn", "never"],
|
72
|
-
"semi": ["warn", "always"],
|
73
|
-
"semi-spacing": ["warn", {
|
74
|
-
before: false,
|
75
|
-
after: true
|
76
|
-
}],
|
77
|
-
"semi-style": ["warn", "last"],
|
78
|
-
"space-before-blocks": ["warn", "always"],
|
79
|
-
"space-before-function-paren": ["warn", {
|
80
|
-
named: "never",
|
81
|
-
anonymous: "never",
|
82
|
-
asyncArrow: "always"
|
83
|
-
}],
|
84
|
-
"space-in-parens": ["warn", "never"],
|
85
|
-
"space-infix-ops": "warn",
|
86
|
-
"switch-colon-spacing": ["warn", {
|
87
|
-
before: false,
|
88
|
-
after: true
|
89
|
-
}],
|
90
|
-
"template-curly-spacing": ["warn", "never"],
|
91
|
-
"template-tag-spacing": ["warn", "never"],
|
92
|
-
"wrap-iife": ["warn", "inside", {
|
93
|
-
functionPrototypeMethods: true
|
94
|
-
}],
|
95
|
-
"yield-star-spacing": ["warn", "after"]
|
96
|
-
});
|
package/lib/vue.js
DELETED
@@ -1,101 +0,0 @@
|
|
1
|
-
import { withPrefix } from "../utils/index.js";
|
2
|
-
|
3
|
-
export default withPrefix("vue", {
|
4
|
-
"attribute-hyphenation": "warn",
|
5
|
-
"attributes-order": ["warn", {
|
6
|
-
order: [
|
7
|
-
"LIST_RENDERING",
|
8
|
-
"CONDITIONALS",
|
9
|
-
"RENDER_MODIFIERS",
|
10
|
-
"OTHER_DIRECTIVES",
|
11
|
-
"SLOT",
|
12
|
-
"DEFINITION",
|
13
|
-
"UNIQUE",
|
14
|
-
"GLOBAL",
|
15
|
-
["ATTR_DYNAMIC", "ATTR_STATIC", "ATTR_SHORTHAND_BOOL"],
|
16
|
-
"TWO_WAY_BINDING",
|
17
|
-
"EVENTS",
|
18
|
-
"CONTENT"
|
19
|
-
]
|
20
|
-
}],
|
21
|
-
"component-definition-name-casing": ["warn", "kebab-case"],
|
22
|
-
"first-attribute-linebreak": ["warn", {
|
23
|
-
singleline: "beside",
|
24
|
-
multiline: "below"
|
25
|
-
}],
|
26
|
-
"html-closing-bracket-newline": ["warn", {
|
27
|
-
singleline: "never",
|
28
|
-
multiline: "always"
|
29
|
-
}],
|
30
|
-
"html-quotes": ["warn", "double"],
|
31
|
-
"html-self-closing": ["warn", {
|
32
|
-
html: {
|
33
|
-
void: "always",
|
34
|
-
normal: "never",
|
35
|
-
component: "always"
|
36
|
-
},
|
37
|
-
svg: "always",
|
38
|
-
math: "always"
|
39
|
-
}],
|
40
|
-
"mustache-interpolation-spacing": ["warn", "always"],
|
41
|
-
"no-dupe-keys": "warn",
|
42
|
-
"no-dupe-v-else-if": "warn",
|
43
|
-
"no-duplicate-attributes": "warn",
|
44
|
-
"no-export-in-script-setup": "warn",
|
45
|
-
"no-expose-after-await": "warn",
|
46
|
-
"no-lifecycle-after-await": "warn",
|
47
|
-
"no-lone-template": "warn",
|
48
|
-
"no-mutating-props": "warn",
|
49
|
-
"no-multiple-slot-args": "warn",
|
50
|
-
"no-multi-spaces": "warn",
|
51
|
-
"no-ref-as-operand": "warn",
|
52
|
-
"no-reserved-component-names": "warn",
|
53
|
-
"no-reserved-keys": "warn",
|
54
|
-
"no-reserved-props": "warn",
|
55
|
-
"no-side-effects-in-computed-properties": "warn",
|
56
|
-
"no-spaces-around-equal-signs-in-attribute": "warn",
|
57
|
-
"no-template-key": "warn",
|
58
|
-
"no-template-shadow": "warn",
|
59
|
-
"no-textarea-mustache": "warn",
|
60
|
-
"no-unused-vars": "warn",
|
61
|
-
"no-use-computed-property-like-method": "warn",
|
62
|
-
"no-use-v-if-with-v-for": "warn",
|
63
|
-
"no-useless-template-attributes": "warn",
|
64
|
-
"no-v-for-template-key-on-child": "warn",
|
65
|
-
"no-v-text-v-html-on-component": "warn",
|
66
|
-
"no-watch-after-await": "warn",
|
67
|
-
"one-component-per-file": "warn",
|
68
|
-
"prefer-import-from-vue": "warn",
|
69
|
-
"prop-name-casing": ["warn", "camelCase"],
|
70
|
-
"require-component-is": "warn",
|
71
|
-
"require-explicit-emits": "warn",
|
72
|
-
"require-prop-type-constructor": "warn",
|
73
|
-
"require-render-return": "warn",
|
74
|
-
"require-slots-as-functions": "warn",
|
75
|
-
"require-toggle-inside-transition": "warn",
|
76
|
-
"require-valid-default-prop": "warn",
|
77
|
-
"return-in-computed-property": "warn",
|
78
|
-
"return-in-emits-validator": "warn",
|
79
|
-
"this-in-template": ["warn", "never"],
|
80
|
-
"use-v-on-exact": "warn",
|
81
|
-
"valid-attribute-name": "warn",
|
82
|
-
"valid-define-emits": "warn",
|
83
|
-
"valid-define-props": "warn",
|
84
|
-
"valid-next-tick": "warn",
|
85
|
-
"valid-v-bind": "warn",
|
86
|
-
"valid-v-cloak": "warn",
|
87
|
-
"valid-v-else-if": "warn",
|
88
|
-
"valid-v-else": "warn",
|
89
|
-
"valid-v-html": "warn",
|
90
|
-
"valid-v-if": "warn",
|
91
|
-
"valid-v-memo": "warn",
|
92
|
-
"valid-v-model": "warn",
|
93
|
-
"valid-v-on": "warn",
|
94
|
-
"valid-v-once": "warn",
|
95
|
-
"valid-v-pre": "warn",
|
96
|
-
"valid-v-show": "warn",
|
97
|
-
"valid-v-slot": "warn",
|
98
|
-
"valid-v-text": "warn",
|
99
|
-
"v-bind-style": ["warn", "shorthand"],
|
100
|
-
"v-on-style": ["warn", "shorthand"]
|
101
|
-
});
|