@ntnyq/eslint-config 3.1.2 → 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 +158 -122
- package/dist/index.d.cts +70 -50
- package/dist/index.d.ts +70 -50
- package/dist/index.js +158 -122
- package/package.json +19 -20
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
|
}
|
|
@@ -690,22 +694,35 @@ var sort = (options = {}) => {
|
|
|
690
694
|
{
|
|
691
695
|
pathPattern: "^$",
|
|
692
696
|
order: [
|
|
697
|
+
/**
|
|
698
|
+
* Meta
|
|
699
|
+
*/
|
|
693
700
|
"publisher",
|
|
694
701
|
"name",
|
|
695
702
|
"displayName",
|
|
696
703
|
"preview",
|
|
697
704
|
"type",
|
|
705
|
+
"config",
|
|
698
706
|
"version",
|
|
699
707
|
"private",
|
|
700
708
|
"packageManager",
|
|
709
|
+
"workspaces",
|
|
701
710
|
"description",
|
|
702
711
|
"keywords",
|
|
703
712
|
"license",
|
|
713
|
+
"licenses",
|
|
704
714
|
"author",
|
|
715
|
+
"contributors",
|
|
716
|
+
"maintainers",
|
|
705
717
|
"homepage",
|
|
706
718
|
"repository",
|
|
719
|
+
"bugs",
|
|
707
720
|
"funding",
|
|
721
|
+
/**
|
|
722
|
+
* Publish
|
|
723
|
+
*/
|
|
708
724
|
"exports",
|
|
725
|
+
"imports",
|
|
709
726
|
"main",
|
|
710
727
|
"module",
|
|
711
728
|
"unpkg",
|
|
@@ -716,20 +733,39 @@ var sort = (options = {}) => {
|
|
|
716
733
|
"bin",
|
|
717
734
|
"icon",
|
|
718
735
|
"files",
|
|
736
|
+
"directories",
|
|
737
|
+
"publishConfig",
|
|
738
|
+
/**
|
|
739
|
+
* Misc
|
|
740
|
+
*/
|
|
719
741
|
"sideEffects",
|
|
720
742
|
"scripts",
|
|
743
|
+
/**
|
|
744
|
+
* Dependencies
|
|
745
|
+
*/
|
|
721
746
|
"peerDependencies",
|
|
722
747
|
"peerDependenciesMeta",
|
|
748
|
+
"bundledDependencies",
|
|
749
|
+
"bundleDependencies",
|
|
723
750
|
"dependencies",
|
|
724
751
|
"optionalDependencies",
|
|
725
752
|
"devDependencies",
|
|
753
|
+
/**
|
|
754
|
+
* VSCode extension
|
|
755
|
+
*/
|
|
726
756
|
"activationEvents",
|
|
727
757
|
"contributes",
|
|
728
758
|
"categories",
|
|
759
|
+
/**
|
|
760
|
+
* Package manager
|
|
761
|
+
*/
|
|
729
762
|
"engines",
|
|
730
763
|
"pnpm",
|
|
731
764
|
"overrides",
|
|
732
765
|
"resolutions",
|
|
766
|
+
/**
|
|
767
|
+
* Third party
|
|
768
|
+
*/
|
|
733
769
|
"husky",
|
|
734
770
|
"prettier",
|
|
735
771
|
"nano-staged",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.1
|
|
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": [
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
"files": [
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
38
41
|
"scripts": {
|
|
39
42
|
"build": "pnpm run generate:type && tsup",
|
|
40
43
|
"clean": "rimraf dist",
|
|
@@ -48,28 +51,24 @@
|
|
|
48
51
|
"release:version": "bumpp && npm publish",
|
|
49
52
|
"typecheck": "tsc --noEmit"
|
|
50
53
|
},
|
|
51
|
-
"publishConfig": {
|
|
52
|
-
"access": "public"
|
|
53
|
-
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"eslint": "^9.0.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
59
|
-
"@eslint/js": "^9.
|
|
59
|
+
"@eslint/js": "^9.14.0",
|
|
60
60
|
"@eslint/markdown": "^6.2.1",
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@vitest/eslint-plugin": "^1.1.7",
|
|
61
|
+
"@unocss/eslint-plugin": "^0.64.0",
|
|
62
|
+
"@vitest/eslint-plugin": "^1.1.8",
|
|
64
63
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
65
64
|
"eslint-flat-config-utils": "^0.4.0",
|
|
66
65
|
"eslint-merge-processors": "^0.1.0",
|
|
67
66
|
"eslint-plugin-antfu": "^2.7.0",
|
|
68
67
|
"eslint-plugin-command": "^0.2.6",
|
|
69
|
-
"eslint-plugin-import-x": "^4.4.
|
|
70
|
-
"eslint-plugin-jsdoc": "^50.
|
|
71
|
-
"eslint-plugin-jsonc": "^2.
|
|
72
|
-
"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",
|
|
73
72
|
"eslint-plugin-ntnyq": "^0.5.0",
|
|
74
73
|
"eslint-plugin-perfectionist": "^3.9.1",
|
|
75
74
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -77,32 +76,32 @@
|
|
|
77
76
|
"eslint-plugin-toml": "^0.11.1",
|
|
78
77
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
79
78
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
80
|
-
"eslint-plugin-vue": "^9.
|
|
79
|
+
"eslint-plugin-vue": "^9.31.0",
|
|
81
80
|
"eslint-plugin-yml": "^1.15.0",
|
|
82
|
-
"globals": "^15.
|
|
81
|
+
"globals": "^15.12.0",
|
|
83
82
|
"jsonc-eslint-parser": "^2.4.0",
|
|
84
83
|
"local-pkg": "^0.5.0",
|
|
85
84
|
"prettier": "^3.3.3",
|
|
86
85
|
"toml-eslint-parser": "^0.10.0",
|
|
87
|
-
"typescript-eslint": "^8.
|
|
86
|
+
"typescript-eslint": "^8.14.0",
|
|
88
87
|
"vue-eslint-parser": "^9.4.3",
|
|
89
88
|
"yaml-eslint-parser": "^1.2.3"
|
|
90
89
|
},
|
|
91
90
|
"devDependencies": {
|
|
92
91
|
"@ntnyq/prettier-config": "^1.21.3",
|
|
93
|
-
"@types/node": "^22.
|
|
94
|
-
"bumpp": "^9.8.
|
|
95
|
-
"eslint": "^9.
|
|
92
|
+
"@types/node": "^22.9.0",
|
|
93
|
+
"bumpp": "^9.8.1",
|
|
94
|
+
"eslint": "^9.14.0",
|
|
96
95
|
"eslint-typegen": "^0.3.2",
|
|
97
96
|
"husky": "^9.1.6",
|
|
98
|
-
"jiti": "^2.
|
|
97
|
+
"jiti": "^2.4.0",
|
|
99
98
|
"nano-staged": "^0.8.0",
|
|
100
99
|
"npm-run-all2": "^7.0.1",
|
|
101
100
|
"rimraf": "^6.0.1",
|
|
102
101
|
"tsup": "^8.3.5",
|
|
103
102
|
"tsx": "^4.19.2",
|
|
104
103
|
"typescript": "^5.6.3",
|
|
105
|
-
"zx": "^8.1
|
|
104
|
+
"zx": "^8.2.1"
|
|
106
105
|
},
|
|
107
106
|
"engines": {
|
|
108
107
|
"node": ">=18.18.0"
|