@ntnyq/eslint-config 2.7.2 → 2.8.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/dist/index.cjs +3 -145
- package/dist/index.d.cts +8403 -11117
- package/dist/index.d.ts +8403 -11117
- package/dist/index.js +3 -145
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -374,10 +374,6 @@ var javascript = defineConfig([
|
|
|
374
374
|
rules: {
|
|
375
375
|
// standard v17.0.0
|
|
376
376
|
"accessor-pairs": ["error", { setWithoutGet: true, enforceForClassMembers: true }],
|
|
377
|
-
"array-bracket-spacing": ["error", "never"],
|
|
378
|
-
"arrow-spacing": ["error", { before: true, after: true }],
|
|
379
|
-
"block-spacing": ["error", "always"],
|
|
380
|
-
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
381
377
|
camelcase: [
|
|
382
378
|
"error",
|
|
383
379
|
{
|
|
@@ -386,60 +382,11 @@ var javascript = defineConfig([
|
|
|
386
382
|
ignoreGlobals: true
|
|
387
383
|
}
|
|
388
384
|
],
|
|
389
|
-
"comma-spacing": ["error", { before: false, after: true }],
|
|
390
|
-
"comma-style": ["error", "last"],
|
|
391
|
-
"computed-property-spacing": ["error", "never", { enforceForClassMembers: true }],
|
|
392
385
|
"constructor-super": "error",
|
|
393
386
|
curly: ["error", "multi-line"],
|
|
394
387
|
"default-case-last": "error",
|
|
395
|
-
"dot-location": ["error", "property"],
|
|
396
388
|
"dot-notation": ["error", { allowKeywords: true }],
|
|
397
|
-
"eol-last": "error",
|
|
398
|
-
"func-call-spacing": ["error", "never"],
|
|
399
|
-
indent: [
|
|
400
|
-
"error",
|
|
401
|
-
2,
|
|
402
|
-
{
|
|
403
|
-
SwitchCase: 1,
|
|
404
|
-
VariableDeclarator: 1,
|
|
405
|
-
outerIIFEBody: 1,
|
|
406
|
-
MemberExpression: 1,
|
|
407
|
-
FunctionDeclaration: { parameters: 1, body: 1 },
|
|
408
|
-
FunctionExpression: { parameters: 1, body: 1 },
|
|
409
|
-
CallExpression: { arguments: 1 },
|
|
410
|
-
ArrayExpression: 1,
|
|
411
|
-
ObjectExpression: 1,
|
|
412
|
-
ImportDeclaration: 1,
|
|
413
|
-
flatTernaryExpressions: false,
|
|
414
|
-
ignoreComments: false,
|
|
415
|
-
ignoredNodes: [
|
|
416
|
-
"TemplateLiteral *",
|
|
417
|
-
"JSXElement",
|
|
418
|
-
"JSXElement > *",
|
|
419
|
-
"JSXAttribute",
|
|
420
|
-
"JSXIdentifier",
|
|
421
|
-
"JSXNamespacedName",
|
|
422
|
-
"JSXMemberExpression",
|
|
423
|
-
"JSXSpreadAttribute",
|
|
424
|
-
"JSXExpressionContainer",
|
|
425
|
-
"JSXOpeningElement",
|
|
426
|
-
"JSXClosingElement",
|
|
427
|
-
"JSXFragment",
|
|
428
|
-
"JSXOpeningFragment",
|
|
429
|
-
"JSXClosingFragment",
|
|
430
|
-
"JSXText",
|
|
431
|
-
"JSXEmptyExpression",
|
|
432
|
-
"JSXSpreadChild"
|
|
433
|
-
],
|
|
434
|
-
offsetTernaryExpressions: true
|
|
435
|
-
}
|
|
436
|
-
],
|
|
437
|
-
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
438
|
-
"keyword-spacing": ["error", { before: true, after: true }],
|
|
439
|
-
"lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
|
|
440
|
-
"multiline-ternary": ["error", "always-multiline"],
|
|
441
389
|
"new-cap": ["error", { newIsCap: true, capIsNew: false, properties: true }],
|
|
442
|
-
"new-parens": "error",
|
|
443
390
|
"no-array-constructor": "error",
|
|
444
391
|
"no-async-promise-executor": "error",
|
|
445
392
|
"no-caller": "error",
|
|
@@ -464,9 +411,7 @@ var javascript = defineConfig([
|
|
|
464
411
|
"no-extend-native": "error",
|
|
465
412
|
"no-extra-bind": "error",
|
|
466
413
|
"no-extra-boolean-cast": "error",
|
|
467
|
-
"no-extra-parens": ["error", "functions"],
|
|
468
414
|
"no-fallthrough": "error",
|
|
469
|
-
"no-floating-decimal": "error",
|
|
470
415
|
"no-func-assign": "error",
|
|
471
416
|
"no-global-assign": "error",
|
|
472
417
|
"no-implied-eval": "error",
|
|
@@ -480,23 +425,8 @@ var javascript = defineConfig([
|
|
|
480
425
|
"no-misleading-character-class": "error",
|
|
481
426
|
"no-prototype-builtins": "error",
|
|
482
427
|
"no-useless-catch": "error",
|
|
483
|
-
"no-mixed-operators": [
|
|
484
|
-
"error",
|
|
485
|
-
{
|
|
486
|
-
groups: [
|
|
487
|
-
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
|
488
|
-
["&&", "||"],
|
|
489
|
-
["in", "instanceof"]
|
|
490
|
-
],
|
|
491
|
-
allowSamePrecedence: true
|
|
492
|
-
}
|
|
493
|
-
],
|
|
494
|
-
"no-mixed-spaces-and-tabs": "error",
|
|
495
|
-
"no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
496
428
|
"no-new": "error",
|
|
497
429
|
"no-new-func": "error",
|
|
498
|
-
"no-new-object": "error",
|
|
499
|
-
"no-new-symbol": "error",
|
|
500
430
|
"no-new-wrappers": "error",
|
|
501
431
|
"no-obj-calls": "error",
|
|
502
432
|
"no-octal": "error",
|
|
@@ -509,11 +439,9 @@ var javascript = defineConfig([
|
|
|
509
439
|
"no-sequences": "error",
|
|
510
440
|
"no-shadow-restricted-names": "error",
|
|
511
441
|
"no-sparse-arrays": "error",
|
|
512
|
-
"no-tabs": "error",
|
|
513
442
|
"no-template-curly-in-string": "error",
|
|
514
443
|
"no-this-before-super": "error",
|
|
515
444
|
"no-throw-literal": "error",
|
|
516
|
-
"no-trailing-spaces": "error",
|
|
517
445
|
"no-undef": "error",
|
|
518
446
|
"no-undef-init": "error",
|
|
519
447
|
"no-unexpected-multiline": "error",
|
|
@@ -545,23 +473,9 @@ var javascript = defineConfig([
|
|
|
545
473
|
"no-useless-constructor": "error",
|
|
546
474
|
"no-useless-rename": "error",
|
|
547
475
|
"no-useless-return": "error",
|
|
548
|
-
"no-whitespace-before-property": "error",
|
|
549
|
-
"object-curly-newline": ["error", { multiline: true, consistent: true }],
|
|
550
|
-
"object-curly-spacing": ["error", "always"],
|
|
551
|
-
"object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
|
|
552
|
-
"padded-blocks": ["error", { blocks: "never", switches: "never", classes: "never" }],
|
|
553
476
|
"prefer-promise-reject-errors": "error",
|
|
554
477
|
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
|
|
555
|
-
"quote-props": ["error", "as-needed"],
|
|
556
|
-
"rest-spread-spacing": ["error", "never"],
|
|
557
|
-
semi: ["error", "never"],
|
|
558
|
-
"semi-spacing": ["error", { before: false, after: true }],
|
|
559
|
-
"space-before-blocks": ["error", "always"],
|
|
560
|
-
"space-in-parens": ["error", "never"],
|
|
561
|
-
"space-infix-ops": "error",
|
|
562
|
-
"space-unary-ops": ["error", { words: true, nonwords: false }],
|
|
563
478
|
"symbol-description": "error",
|
|
564
|
-
"template-tag-spacing": ["error", "never"],
|
|
565
479
|
"unicode-bom": ["error", "never"],
|
|
566
480
|
"use-isnan": [
|
|
567
481
|
"error",
|
|
@@ -571,32 +485,14 @@ var javascript = defineConfig([
|
|
|
571
485
|
}
|
|
572
486
|
],
|
|
573
487
|
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
574
|
-
"wrap-iife": ["error", "any", { functionPrototypeMethods: true }],
|
|
575
488
|
yoda: ["error", "never"],
|
|
576
489
|
// es6+
|
|
577
490
|
"no-var": "error",
|
|
578
491
|
"prefer-rest-params": "error",
|
|
579
492
|
"prefer-spread": "error",
|
|
580
493
|
"prefer-template": "error",
|
|
581
|
-
"template-curly-spacing": "error",
|
|
582
|
-
"generator-star-spacing": "off",
|
|
583
494
|
"no-empty-static-block": "error",
|
|
584
495
|
"no-new-native-nonconstructor": "error",
|
|
585
|
-
"arrow-parens": [
|
|
586
|
-
"error",
|
|
587
|
-
"as-needed",
|
|
588
|
-
{
|
|
589
|
-
requireForBlockBody: false
|
|
590
|
-
}
|
|
591
|
-
],
|
|
592
|
-
quotes: [
|
|
593
|
-
"error",
|
|
594
|
-
"single",
|
|
595
|
-
{
|
|
596
|
-
avoidEscape: true,
|
|
597
|
-
allowTemplateLiterals: false
|
|
598
|
-
}
|
|
599
|
-
],
|
|
600
496
|
"prefer-const": [
|
|
601
497
|
"error",
|
|
602
498
|
{
|
|
@@ -619,21 +515,6 @@ var javascript = defineConfig([
|
|
|
619
515
|
avoidQuotes: true
|
|
620
516
|
}
|
|
621
517
|
],
|
|
622
|
-
"spaced-comment": [
|
|
623
|
-
"error",
|
|
624
|
-
"always",
|
|
625
|
-
{
|
|
626
|
-
line: {
|
|
627
|
-
markers: ["/"],
|
|
628
|
-
exceptions: ["/", "#"]
|
|
629
|
-
},
|
|
630
|
-
block: {
|
|
631
|
-
markers: ["!"],
|
|
632
|
-
exceptions: ["*"],
|
|
633
|
-
balanced: true
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
],
|
|
637
518
|
// best-practice
|
|
638
519
|
eqeqeq: ["error", "smart"],
|
|
639
520
|
complexity: ["error", { max: 30 }],
|
|
@@ -642,7 +523,6 @@ var javascript = defineConfig([
|
|
|
642
523
|
"consistent-return": "off",
|
|
643
524
|
"no-alert": "error",
|
|
644
525
|
"no-case-declarations": "error",
|
|
645
|
-
"no-multi-spaces": "error",
|
|
646
526
|
"no-multi-str": "error",
|
|
647
527
|
"no-with": "error",
|
|
648
528
|
"no-void": "error",
|
|
@@ -651,12 +531,9 @@ var javascript = defineConfig([
|
|
|
651
531
|
"require-await": "off",
|
|
652
532
|
"no-return-assign": "off",
|
|
653
533
|
"one-var": ["error", "never"],
|
|
654
|
-
"operator-linebreak": ["error", "before"],
|
|
655
|
-
"comma-dangle": ["error", "always-multiline"],
|
|
656
534
|
"max-params": ["error", { max: 5 }],
|
|
657
535
|
"max-depth": ["error", { max: 5 }],
|
|
658
536
|
"max-nested-callbacks": ["error", { max: 10 }],
|
|
659
|
-
"max-statements-per-line": ["error", { max: 2 }],
|
|
660
537
|
"max-lines": [
|
|
661
538
|
"error",
|
|
662
539
|
{
|
|
@@ -681,19 +558,6 @@ var javascript = defineConfig([
|
|
|
681
558
|
variables: true
|
|
682
559
|
}
|
|
683
560
|
],
|
|
684
|
-
"max-len": [
|
|
685
|
-
"error",
|
|
686
|
-
{
|
|
687
|
-
code: 200,
|
|
688
|
-
tabWidth: 2,
|
|
689
|
-
comments: 200,
|
|
690
|
-
ignoreUrls: true,
|
|
691
|
-
ignoreStrings: true,
|
|
692
|
-
ignoreRegExpLiterals: true,
|
|
693
|
-
ignoreTemplateLiterals: true,
|
|
694
|
-
ignoreTrailingComments: true
|
|
695
|
-
}
|
|
696
|
-
],
|
|
697
561
|
"sort-imports": [
|
|
698
562
|
"error",
|
|
699
563
|
{
|
|
@@ -751,7 +615,8 @@ var typescriptCore = tseslint.config({
|
|
|
751
615
|
"@typescript-eslint/no-unused-vars": [
|
|
752
616
|
"error",
|
|
753
617
|
{
|
|
754
|
-
|
|
618
|
+
// Args after the last used will be reported
|
|
619
|
+
args: "after-used",
|
|
755
620
|
argsIgnorePattern: "^_",
|
|
756
621
|
caughtErrors: "all",
|
|
757
622
|
caughtErrorsIgnorePattern: "^_",
|
|
@@ -824,9 +689,7 @@ var typescript = defineConfig([
|
|
|
824
689
|
{
|
|
825
690
|
name: "ntnyq/ts/cjs",
|
|
826
691
|
files: [GLOB_JS],
|
|
827
|
-
rules: {
|
|
828
|
-
"@typescript-eslint/no-var-requires": "off"
|
|
829
|
-
}
|
|
692
|
+
rules: {}
|
|
830
693
|
}
|
|
831
694
|
]);
|
|
832
695
|
|
|
@@ -895,8 +758,6 @@ var yml = defineConfig([
|
|
|
895
758
|
yml: default4
|
|
896
759
|
},
|
|
897
760
|
rules: {
|
|
898
|
-
// Avoid conflicts with js comment
|
|
899
|
-
"spaced-comment": "off",
|
|
900
761
|
...default4.configs.standard.rules,
|
|
901
762
|
...default4.configs.prettier.rules,
|
|
902
763
|
"yml/no-empty-mapping-value": "off",
|
|
@@ -917,8 +778,6 @@ var toml = defineConfig([
|
|
|
917
778
|
toml: default5
|
|
918
779
|
},
|
|
919
780
|
rules: {
|
|
920
|
-
// Avoid conflicts with js comment
|
|
921
|
-
"spaced-comment": "off",
|
|
922
781
|
"toml/comma-style": "error",
|
|
923
782
|
"toml/keys-order": "error",
|
|
924
783
|
"toml/no-space-dots": "error",
|
|
@@ -1224,7 +1083,6 @@ var markdown = defineConfig([
|
|
|
1224
1083
|
"@typescript-eslint/no-redeclare": "off",
|
|
1225
1084
|
"@typescript-eslint/no-namespace": "off",
|
|
1226
1085
|
"@typescript-eslint/no-unused-vars": "off",
|
|
1227
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
1228
1086
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
1229
1087
|
"@typescript-eslint/no-use-before-define": "off"
|
|
1230
1088
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.8.0",
|
|
5
5
|
"packageManager": "pnpm@9.6.0",
|
|
6
6
|
"description": "ESLint flat config of ntnyq",
|
|
7
7
|
"keywords": [
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@antfu/eslint-plugin-unused-imports": "^4.0.0",
|
|
59
59
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
|
|
60
|
-
"@eslint/js": "^9.
|
|
60
|
+
"@eslint/js": "^9.8.0",
|
|
61
61
|
"@types/eslint": "^9.6.0",
|
|
62
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
62
|
+
"@unocss/eslint-plugin": "^0.61.9",
|
|
63
63
|
"eslint-config-prettier": "^9.1.0",
|
|
64
|
-
"eslint-flat-config-utils": "^0.
|
|
64
|
+
"eslint-flat-config-utils": "^0.3.0",
|
|
65
65
|
"eslint-plugin-command": "^0.2.3",
|
|
66
66
|
"eslint-plugin-import-x": "^3.1.0",
|
|
67
|
-
"eslint-plugin-jsdoc": "^48.
|
|
67
|
+
"eslint-plugin-jsdoc": "^48.11.0",
|
|
68
68
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
69
69
|
"eslint-plugin-markdown": "^5.1.0",
|
|
70
70
|
"eslint-plugin-n": "^17.10.1",
|
|
@@ -74,27 +74,27 @@
|
|
|
74
74
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
75
75
|
"eslint-plugin-vue": "^9.27.0",
|
|
76
76
|
"eslint-plugin-yml": "^1.14.0",
|
|
77
|
-
"globals": "^15.
|
|
77
|
+
"globals": "^15.9.0",
|
|
78
78
|
"jsonc-eslint-parser": "^2.4.0",
|
|
79
79
|
"local-pkg": "^0.5.0",
|
|
80
80
|
"prettier": "^3.3.3",
|
|
81
81
|
"toml-eslint-parser": "^0.10.0",
|
|
82
|
-
"typescript-eslint": "^8.0.0
|
|
82
|
+
"typescript-eslint": "^8.0.0",
|
|
83
83
|
"vue-eslint-parser": "^9.4.3",
|
|
84
84
|
"yaml-eslint-parser": "^1.2.3"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@ntnyq/prettier-config": "^1.21.2",
|
|
88
|
-
"@types/node": "^20.14.
|
|
89
|
-
"bumpp": "^9.4.
|
|
90
|
-
"eslint": "^9.
|
|
91
|
-
"eslint-typegen": "^0.
|
|
92
|
-
"husky": "^9.1.
|
|
88
|
+
"@types/node": "^20.14.14",
|
|
89
|
+
"bumpp": "^9.4.2",
|
|
90
|
+
"eslint": "^9.8.0",
|
|
91
|
+
"eslint-typegen": "^0.3.0",
|
|
92
|
+
"husky": "^9.1.4",
|
|
93
93
|
"nano-staged": "^0.8.0",
|
|
94
94
|
"npm-run-all2": "^6.2.2",
|
|
95
95
|
"rimraf": "^6.0.1",
|
|
96
|
-
"tsup": "^8.2.
|
|
97
|
-
"tsx": "^4.16.
|
|
96
|
+
"tsup": "^8.2.4",
|
|
97
|
+
"tsx": "^4.16.5",
|
|
98
98
|
"typescript": "^5.5.4",
|
|
99
99
|
"zx": "^8.1.4"
|
|
100
100
|
},
|