@ntnyq/eslint-config 3.2.0 → 3.2.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/README.md +2 -2
- package/dist/index.cjs +126 -122
- package/dist/index.d.cts +70 -50
- package/dist/index.d.ts +70 -50
- package/dist/index.js +126 -122
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -254,6 +254,129 @@ var vue3Rules = {
|
|
|
254
254
|
...default3.configs["vue3-strongly-recommended"].rules,
|
|
255
255
|
...default3.configs["vue3-recommended"].rules
|
|
256
256
|
};
|
|
257
|
+
var disabledRules = {
|
|
258
|
+
"vue/no-v-html": "off",
|
|
259
|
+
"vue/require-prop-types": "off",
|
|
260
|
+
"vue/require-default-prop": "off",
|
|
261
|
+
"vue/multi-word-component-names": "off",
|
|
262
|
+
"vue/no-v-text-v-html-on-component": "off",
|
|
263
|
+
"vue/no-setup-props-reactivity-loss": "off"
|
|
264
|
+
};
|
|
265
|
+
var extensionRules = {
|
|
266
|
+
"vue/prefer-template": "error",
|
|
267
|
+
"vue/no-sparse-arrays": "error",
|
|
268
|
+
"vue/no-empty-pattern": "error",
|
|
269
|
+
"vue/space-infix-ops": "error",
|
|
270
|
+
"vue/no-loss-of-precision": "error",
|
|
271
|
+
"vue/no-constant-condition": "error",
|
|
272
|
+
"vue/template-curly-spacing": "error",
|
|
273
|
+
"vue/eqeqeq": ["error", "smart"],
|
|
274
|
+
"vue/comma-style": ["error", "last"],
|
|
275
|
+
"vue/block-spacing": ["error", "always"],
|
|
276
|
+
"vue/dot-location": ["error", "property"],
|
|
277
|
+
"vue/space-in-parens": ["error", "never"],
|
|
278
|
+
"vue/operator-linebreak": ["error", "before"],
|
|
279
|
+
"vue/no-extra-parens": ["error", "functions"],
|
|
280
|
+
"vue/array-bracket-spacing": ["error", "never"],
|
|
281
|
+
"vue/object-curly-spacing": ["error", "always"],
|
|
282
|
+
"vue/comma-dangle": ["error", "always-multiline"],
|
|
283
|
+
"vue/quote-props": ["error", "consistent-as-needed"],
|
|
284
|
+
"vue/arrow-spacing": ["error", { before: true, after: true }],
|
|
285
|
+
"vue/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
|
|
286
|
+
"vue/comma-spacing": ["error", { before: false, after: true }],
|
|
287
|
+
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
288
|
+
"vue/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
289
|
+
"vue/keyword-spacing": ["error", { before: true, after: true }],
|
|
290
|
+
"vue/no-restricted-syntax": ["error", "DebuggerStatement", "LabeledStatement", "WithStatement"],
|
|
291
|
+
"vue/space-unary-ops": [
|
|
292
|
+
"error",
|
|
293
|
+
{
|
|
294
|
+
words: true,
|
|
295
|
+
nonwords: false
|
|
296
|
+
}
|
|
297
|
+
],
|
|
298
|
+
"vue/object-curly-newline": [
|
|
299
|
+
"error",
|
|
300
|
+
{
|
|
301
|
+
multiline: true,
|
|
302
|
+
consistent: true
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"vue/object-property-newline": [
|
|
306
|
+
"error",
|
|
307
|
+
{
|
|
308
|
+
allowMultiplePropertiesPerLine: true
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"vue/object-shorthand": [
|
|
312
|
+
"error",
|
|
313
|
+
"always",
|
|
314
|
+
{
|
|
315
|
+
ignoreConstructors: false,
|
|
316
|
+
avoidQuotes: true
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
};
|
|
320
|
+
var unCategorizedRules = {
|
|
321
|
+
"vue/no-useless-v-bind": "error",
|
|
322
|
+
"vue/valid-define-options": "error",
|
|
323
|
+
"vue/prefer-define-options": "error",
|
|
324
|
+
"vue/no-irregular-whitespace": "error",
|
|
325
|
+
"vue/no-use-v-else-with-v-for": "error",
|
|
326
|
+
"vue/no-deprecated-delete-set": "error",
|
|
327
|
+
"vue/require-typed-object-prop": "error",
|
|
328
|
+
"vue/no-unused-emit-declarations": "error",
|
|
329
|
+
"vue/padding-line-between-blocks": "error",
|
|
330
|
+
"vue/no-ref-object-reactivity-loss": "error",
|
|
331
|
+
"vue/prefer-separate-static-class": "error",
|
|
332
|
+
"vue/next-tick-style": ["error", "promise"],
|
|
333
|
+
"vue/no-restricted-v-bind": ["error", "/^v-/"],
|
|
334
|
+
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
335
|
+
"vue/define-emits-declaration": ["error", "type-literal"],
|
|
336
|
+
"vue/prefer-true-attribute-shorthand": ["error", "always"],
|
|
337
|
+
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
338
|
+
"vue/block-order": [
|
|
339
|
+
"error",
|
|
340
|
+
{
|
|
341
|
+
order: ["script", "template", "style"]
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
"vue/no-static-inline-styles": [
|
|
345
|
+
"error",
|
|
346
|
+
{
|
|
347
|
+
allowBinding: true
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"vue/no-deprecated-model-definition": [
|
|
351
|
+
"error",
|
|
352
|
+
{
|
|
353
|
+
allowVue3Compat: true
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"vue/component-name-in-template-casing": [
|
|
357
|
+
"error",
|
|
358
|
+
"PascalCase",
|
|
359
|
+
{
|
|
360
|
+
// Force auto-import components to be PascalCase
|
|
361
|
+
registeredComponentsOnly: false,
|
|
362
|
+
ignores: ["slot", "component"]
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
"vue/define-macros-order": [
|
|
366
|
+
"error",
|
|
367
|
+
{
|
|
368
|
+
order: ["defineProps", "defineEmits", "defineOptions", "defineSlots", "defineModel"],
|
|
369
|
+
defineExposeLast: true
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
"vue/html-comment-content-spacing": [
|
|
373
|
+
"error",
|
|
374
|
+
"always",
|
|
375
|
+
{
|
|
376
|
+
exceptions: ["-"]
|
|
377
|
+
}
|
|
378
|
+
]
|
|
379
|
+
};
|
|
257
380
|
var vue = (options = {}) => {
|
|
258
381
|
const isVue3 = options.vueVersion !== 2;
|
|
259
382
|
return [
|
|
@@ -283,13 +406,6 @@ var vue = (options = {}) => {
|
|
|
283
406
|
processor: default3.processors[".vue"],
|
|
284
407
|
rules: {
|
|
285
408
|
...isVue3 ? vue3Rules : vue2Rules,
|
|
286
|
-
// OFF
|
|
287
|
-
"vue/no-v-html": "off",
|
|
288
|
-
"vue/require-prop-types": "off",
|
|
289
|
-
"vue/require-default-prop": "off",
|
|
290
|
-
"vue/multi-word-component-names": "off",
|
|
291
|
-
"vue/no-v-text-v-html-on-component": "off",
|
|
292
|
-
"vue/no-setup-props-reactivity-loss": "off",
|
|
293
409
|
"vue/html-self-closing": [
|
|
294
410
|
"error",
|
|
295
411
|
{
|
|
@@ -309,123 +425,8 @@ var vue = (options = {}) => {
|
|
|
309
425
|
multiline: "always"
|
|
310
426
|
}
|
|
311
427
|
],
|
|
312
|
-
"vue/component-name-in-template-casing": [
|
|
313
|
-
"error",
|
|
314
|
-
"PascalCase",
|
|
315
|
-
{
|
|
316
|
-
// Force auto-import components to be PascalCase
|
|
317
|
-
registeredComponentsOnly: false,
|
|
318
|
-
ignores: ["slot", "component"]
|
|
319
|
-
}
|
|
320
|
-
],
|
|
321
|
-
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
322
|
-
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
323
|
-
"vue/define-macros-order": [
|
|
324
|
-
"error",
|
|
325
|
-
{
|
|
326
|
-
order: ["defineProps", "defineEmits", "defineOptions", "defineSlots"]
|
|
327
|
-
}
|
|
328
|
-
],
|
|
329
|
-
"vue/html-comment-content-spacing": [
|
|
330
|
-
"error",
|
|
331
|
-
"always",
|
|
332
|
-
{
|
|
333
|
-
exceptions: ["-"]
|
|
334
|
-
}
|
|
335
|
-
],
|
|
336
|
-
"vue/no-restricted-v-bind": ["error", "/^v-/"],
|
|
337
|
-
"vue/no-useless-v-bind": "error",
|
|
338
|
-
"vue/padding-line-between-blocks": "error",
|
|
339
|
-
"vue/next-tick-style": ["error", "promise"],
|
|
340
|
-
"vue/array-bracket-spacing": ["error", "never"],
|
|
341
|
-
"vue/prefer-separate-static-class": "error",
|
|
342
|
-
"vue/no-constant-condition": "error",
|
|
343
|
-
"vue/prefer-true-attribute-shorthand": ["error", "always"],
|
|
344
|
-
"vue/prefer-define-options": "error",
|
|
345
|
-
"vue/valid-define-options": "error",
|
|
346
|
-
// TypeScript enhancements
|
|
347
|
-
"vue/define-emits-declaration": ["error", "type-literal"],
|
|
348
|
-
"vue/no-unused-emit-declarations": "error",
|
|
349
428
|
"vue/this-in-template": ["error", "never"],
|
|
350
|
-
"vue/arrow-spacing": ["error", { before: true, after: true }],
|
|
351
|
-
"vue/block-spacing": ["error", "always"],
|
|
352
|
-
"vue/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
|
|
353
|
-
"vue/comma-dangle": ["error", "always-multiline"],
|
|
354
|
-
"vue/comma-spacing": ["error", { before: false, after: true }],
|
|
355
|
-
"vue/comma-style": ["error", "last"],
|
|
356
|
-
"vue/dot-location": ["error", "property"],
|
|
357
|
-
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
358
|
-
"vue/eqeqeq": ["error", "smart"],
|
|
359
|
-
"vue/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
360
|
-
"vue/keyword-spacing": ["error", { before: true, after: true }],
|
|
361
|
-
"vue/no-empty-pattern": "error",
|
|
362
|
-
"vue/no-loss-of-precision": "error",
|
|
363
|
-
"vue/no-irregular-whitespace": "error",
|
|
364
|
-
"vue/no-use-v-else-with-v-for": "error",
|
|
365
|
-
"vue/require-typed-object-prop": "error",
|
|
366
|
-
"vue/no-deprecated-delete-set": "error",
|
|
367
|
-
"vue/no-extra-parens": ["error", "functions"],
|
|
368
|
-
"vue/no-restricted-syntax": [
|
|
369
|
-
"error",
|
|
370
|
-
"DebuggerStatement",
|
|
371
|
-
"LabeledStatement",
|
|
372
|
-
"WithStatement"
|
|
373
|
-
],
|
|
374
|
-
"vue/no-sparse-arrays": "error",
|
|
375
|
-
"vue/no-deprecated-model-definition": [
|
|
376
|
-
"error",
|
|
377
|
-
{
|
|
378
|
-
allowVue3Compat: true
|
|
379
|
-
}
|
|
380
|
-
],
|
|
381
|
-
"vue/object-curly-newline": [
|
|
382
|
-
"error",
|
|
383
|
-
{
|
|
384
|
-
multiline: true,
|
|
385
|
-
consistent: true
|
|
386
|
-
}
|
|
387
|
-
],
|
|
388
|
-
"vue/no-static-inline-styles": [
|
|
389
|
-
"error",
|
|
390
|
-
{
|
|
391
|
-
allowBinding: true
|
|
392
|
-
}
|
|
393
|
-
],
|
|
394
|
-
"vue/object-curly-spacing": ["error", "always"],
|
|
395
|
-
"vue/object-property-newline": [
|
|
396
|
-
"error",
|
|
397
|
-
{
|
|
398
|
-
allowMultiplePropertiesPerLine: true
|
|
399
|
-
}
|
|
400
|
-
],
|
|
401
|
-
"vue/object-shorthand": [
|
|
402
|
-
"error",
|
|
403
|
-
"always",
|
|
404
|
-
{
|
|
405
|
-
ignoreConstructors: false,
|
|
406
|
-
avoidQuotes: true
|
|
407
|
-
}
|
|
408
|
-
],
|
|
409
|
-
"vue/operator-linebreak": ["error", "before"],
|
|
410
|
-
"vue/prefer-template": "error",
|
|
411
429
|
"vue/prop-name-casing": ["error", "camelCase"],
|
|
412
|
-
"vue/quote-props": ["error", "consistent-as-needed"],
|
|
413
|
-
"vue/space-in-parens": ["error", "never"],
|
|
414
|
-
"vue/space-infix-ops": "error",
|
|
415
|
-
"vue/space-unary-ops": [
|
|
416
|
-
"error",
|
|
417
|
-
{
|
|
418
|
-
words: true,
|
|
419
|
-
nonwords: false
|
|
420
|
-
}
|
|
421
|
-
],
|
|
422
|
-
"vue/template-curly-spacing": "error",
|
|
423
|
-
"vue/block-order": [
|
|
424
|
-
"error",
|
|
425
|
-
{
|
|
426
|
-
order: ["script", "template", "style"]
|
|
427
|
-
}
|
|
428
|
-
],
|
|
429
430
|
"vue/attributes-order": [
|
|
430
431
|
"error",
|
|
431
432
|
{
|
|
@@ -510,6 +511,9 @@ var vue = (options = {}) => {
|
|
|
510
511
|
multiline: 1
|
|
511
512
|
}
|
|
512
513
|
],
|
|
514
|
+
...disabledRules,
|
|
515
|
+
...extensionRules,
|
|
516
|
+
...unCategorizedRules,
|
|
513
517
|
// Overrides rules
|
|
514
518
|
...options.overrides
|
|
515
519
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.1",
|
|
5
5
|
"packageManager": "pnpm@9.12.3",
|
|
6
6
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
7
7
|
"keywords": [
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
59
59
|
"@eslint/js": "^9.14.0",
|
|
60
60
|
"@eslint/markdown": "^6.2.1",
|
|
61
|
-
"@unocss/eslint-plugin": "^0.
|
|
62
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
61
|
+
"@unocss/eslint-plugin": "^0.64.0",
|
|
62
|
+
"@vitest/eslint-plugin": "^1.1.8",
|
|
63
63
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
64
64
|
"eslint-flat-config-utils": "^0.4.0",
|
|
65
65
|
"eslint-merge-processors": "^0.1.0",
|
|
66
66
|
"eslint-plugin-antfu": "^2.7.0",
|
|
67
67
|
"eslint-plugin-command": "^0.2.6",
|
|
68
|
-
"eslint-plugin-import-x": "^4.4.
|
|
69
|
-
"eslint-plugin-jsdoc": "^50.
|
|
70
|
-
"eslint-plugin-jsonc": "^2.
|
|
71
|
-
"eslint-plugin-n": "^17.
|
|
68
|
+
"eslint-plugin-import-x": "^4.4.2",
|
|
69
|
+
"eslint-plugin-jsdoc": "^50.5.0",
|
|
70
|
+
"eslint-plugin-jsonc": "^2.18.1",
|
|
71
|
+
"eslint-plugin-n": "^17.13.1",
|
|
72
72
|
"eslint-plugin-ntnyq": "^0.5.0",
|
|
73
73
|
"eslint-plugin-perfectionist": "^3.9.1",
|
|
74
74
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -76,21 +76,21 @@
|
|
|
76
76
|
"eslint-plugin-toml": "^0.11.1",
|
|
77
77
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
78
78
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
79
|
-
"eslint-plugin-vue": "^9.
|
|
79
|
+
"eslint-plugin-vue": "^9.31.0",
|
|
80
80
|
"eslint-plugin-yml": "^1.15.0",
|
|
81
|
-
"globals": "^15.
|
|
81
|
+
"globals": "^15.12.0",
|
|
82
82
|
"jsonc-eslint-parser": "^2.4.0",
|
|
83
83
|
"local-pkg": "^0.5.0",
|
|
84
84
|
"prettier": "^3.3.3",
|
|
85
85
|
"toml-eslint-parser": "^0.10.0",
|
|
86
|
-
"typescript-eslint": "^8.
|
|
86
|
+
"typescript-eslint": "^8.14.0",
|
|
87
87
|
"vue-eslint-parser": "^9.4.3",
|
|
88
88
|
"yaml-eslint-parser": "^1.2.3"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@ntnyq/prettier-config": "^1.21.3",
|
|
92
|
-
"@types/node": "^22.
|
|
93
|
-
"bumpp": "^9.8.
|
|
92
|
+
"@types/node": "^22.9.0",
|
|
93
|
+
"bumpp": "^9.8.1",
|
|
94
94
|
"eslint": "^9.14.0",
|
|
95
95
|
"eslint-typegen": "^0.3.2",
|
|
96
96
|
"husky": "^9.1.6",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"tsup": "^8.3.5",
|
|
102
102
|
"tsx": "^4.19.2",
|
|
103
103
|
"typescript": "^5.6.3",
|
|
104
|
-
"zx": "^8.2.
|
|
104
|
+
"zx": "^8.2.1"
|
|
105
105
|
},
|
|
106
106
|
"engines": {
|
|
107
107
|
"node": ">=18.18.0"
|