@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.cjs
CHANGED
|
@@ -482,10 +482,6 @@ var javascript = defineConfig([
|
|
|
482
482
|
rules: {
|
|
483
483
|
// standard v17.0.0
|
|
484
484
|
"accessor-pairs": ["error", { setWithoutGet: true, enforceForClassMembers: true }],
|
|
485
|
-
"array-bracket-spacing": ["error", "never"],
|
|
486
|
-
"arrow-spacing": ["error", { before: true, after: true }],
|
|
487
|
-
"block-spacing": ["error", "always"],
|
|
488
|
-
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
489
485
|
camelcase: [
|
|
490
486
|
"error",
|
|
491
487
|
{
|
|
@@ -494,60 +490,11 @@ var javascript = defineConfig([
|
|
|
494
490
|
ignoreGlobals: true
|
|
495
491
|
}
|
|
496
492
|
],
|
|
497
|
-
"comma-spacing": ["error", { before: false, after: true }],
|
|
498
|
-
"comma-style": ["error", "last"],
|
|
499
|
-
"computed-property-spacing": ["error", "never", { enforceForClassMembers: true }],
|
|
500
493
|
"constructor-super": "error",
|
|
501
494
|
curly: ["error", "multi-line"],
|
|
502
495
|
"default-case-last": "error",
|
|
503
|
-
"dot-location": ["error", "property"],
|
|
504
496
|
"dot-notation": ["error", { allowKeywords: true }],
|
|
505
|
-
"eol-last": "error",
|
|
506
|
-
"func-call-spacing": ["error", "never"],
|
|
507
|
-
indent: [
|
|
508
|
-
"error",
|
|
509
|
-
2,
|
|
510
|
-
{
|
|
511
|
-
SwitchCase: 1,
|
|
512
|
-
VariableDeclarator: 1,
|
|
513
|
-
outerIIFEBody: 1,
|
|
514
|
-
MemberExpression: 1,
|
|
515
|
-
FunctionDeclaration: { parameters: 1, body: 1 },
|
|
516
|
-
FunctionExpression: { parameters: 1, body: 1 },
|
|
517
|
-
CallExpression: { arguments: 1 },
|
|
518
|
-
ArrayExpression: 1,
|
|
519
|
-
ObjectExpression: 1,
|
|
520
|
-
ImportDeclaration: 1,
|
|
521
|
-
flatTernaryExpressions: false,
|
|
522
|
-
ignoreComments: false,
|
|
523
|
-
ignoredNodes: [
|
|
524
|
-
"TemplateLiteral *",
|
|
525
|
-
"JSXElement",
|
|
526
|
-
"JSXElement > *",
|
|
527
|
-
"JSXAttribute",
|
|
528
|
-
"JSXIdentifier",
|
|
529
|
-
"JSXNamespacedName",
|
|
530
|
-
"JSXMemberExpression",
|
|
531
|
-
"JSXSpreadAttribute",
|
|
532
|
-
"JSXExpressionContainer",
|
|
533
|
-
"JSXOpeningElement",
|
|
534
|
-
"JSXClosingElement",
|
|
535
|
-
"JSXFragment",
|
|
536
|
-
"JSXOpeningFragment",
|
|
537
|
-
"JSXClosingFragment",
|
|
538
|
-
"JSXText",
|
|
539
|
-
"JSXEmptyExpression",
|
|
540
|
-
"JSXSpreadChild"
|
|
541
|
-
],
|
|
542
|
-
offsetTernaryExpressions: true
|
|
543
|
-
}
|
|
544
|
-
],
|
|
545
|
-
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
546
|
-
"keyword-spacing": ["error", { before: true, after: true }],
|
|
547
|
-
"lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
|
|
548
|
-
"multiline-ternary": ["error", "always-multiline"],
|
|
549
497
|
"new-cap": ["error", { newIsCap: true, capIsNew: false, properties: true }],
|
|
550
|
-
"new-parens": "error",
|
|
551
498
|
"no-array-constructor": "error",
|
|
552
499
|
"no-async-promise-executor": "error",
|
|
553
500
|
"no-caller": "error",
|
|
@@ -572,9 +519,7 @@ var javascript = defineConfig([
|
|
|
572
519
|
"no-extend-native": "error",
|
|
573
520
|
"no-extra-bind": "error",
|
|
574
521
|
"no-extra-boolean-cast": "error",
|
|
575
|
-
"no-extra-parens": ["error", "functions"],
|
|
576
522
|
"no-fallthrough": "error",
|
|
577
|
-
"no-floating-decimal": "error",
|
|
578
523
|
"no-func-assign": "error",
|
|
579
524
|
"no-global-assign": "error",
|
|
580
525
|
"no-implied-eval": "error",
|
|
@@ -588,23 +533,8 @@ var javascript = defineConfig([
|
|
|
588
533
|
"no-misleading-character-class": "error",
|
|
589
534
|
"no-prototype-builtins": "error",
|
|
590
535
|
"no-useless-catch": "error",
|
|
591
|
-
"no-mixed-operators": [
|
|
592
|
-
"error",
|
|
593
|
-
{
|
|
594
|
-
groups: [
|
|
595
|
-
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
|
596
|
-
["&&", "||"],
|
|
597
|
-
["in", "instanceof"]
|
|
598
|
-
],
|
|
599
|
-
allowSamePrecedence: true
|
|
600
|
-
}
|
|
601
|
-
],
|
|
602
|
-
"no-mixed-spaces-and-tabs": "error",
|
|
603
|
-
"no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
604
536
|
"no-new": "error",
|
|
605
537
|
"no-new-func": "error",
|
|
606
|
-
"no-new-object": "error",
|
|
607
|
-
"no-new-symbol": "error",
|
|
608
538
|
"no-new-wrappers": "error",
|
|
609
539
|
"no-obj-calls": "error",
|
|
610
540
|
"no-octal": "error",
|
|
@@ -617,11 +547,9 @@ var javascript = defineConfig([
|
|
|
617
547
|
"no-sequences": "error",
|
|
618
548
|
"no-shadow-restricted-names": "error",
|
|
619
549
|
"no-sparse-arrays": "error",
|
|
620
|
-
"no-tabs": "error",
|
|
621
550
|
"no-template-curly-in-string": "error",
|
|
622
551
|
"no-this-before-super": "error",
|
|
623
552
|
"no-throw-literal": "error",
|
|
624
|
-
"no-trailing-spaces": "error",
|
|
625
553
|
"no-undef": "error",
|
|
626
554
|
"no-undef-init": "error",
|
|
627
555
|
"no-unexpected-multiline": "error",
|
|
@@ -653,23 +581,9 @@ var javascript = defineConfig([
|
|
|
653
581
|
"no-useless-constructor": "error",
|
|
654
582
|
"no-useless-rename": "error",
|
|
655
583
|
"no-useless-return": "error",
|
|
656
|
-
"no-whitespace-before-property": "error",
|
|
657
|
-
"object-curly-newline": ["error", { multiline: true, consistent: true }],
|
|
658
|
-
"object-curly-spacing": ["error", "always"],
|
|
659
|
-
"object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
|
|
660
|
-
"padded-blocks": ["error", { blocks: "never", switches: "never", classes: "never" }],
|
|
661
584
|
"prefer-promise-reject-errors": "error",
|
|
662
585
|
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
|
|
663
|
-
"quote-props": ["error", "as-needed"],
|
|
664
|
-
"rest-spread-spacing": ["error", "never"],
|
|
665
|
-
semi: ["error", "never"],
|
|
666
|
-
"semi-spacing": ["error", { before: false, after: true }],
|
|
667
|
-
"space-before-blocks": ["error", "always"],
|
|
668
|
-
"space-in-parens": ["error", "never"],
|
|
669
|
-
"space-infix-ops": "error",
|
|
670
|
-
"space-unary-ops": ["error", { words: true, nonwords: false }],
|
|
671
586
|
"symbol-description": "error",
|
|
672
|
-
"template-tag-spacing": ["error", "never"],
|
|
673
587
|
"unicode-bom": ["error", "never"],
|
|
674
588
|
"use-isnan": [
|
|
675
589
|
"error",
|
|
@@ -679,32 +593,14 @@ var javascript = defineConfig([
|
|
|
679
593
|
}
|
|
680
594
|
],
|
|
681
595
|
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
682
|
-
"wrap-iife": ["error", "any", { functionPrototypeMethods: true }],
|
|
683
596
|
yoda: ["error", "never"],
|
|
684
597
|
// es6+
|
|
685
598
|
"no-var": "error",
|
|
686
599
|
"prefer-rest-params": "error",
|
|
687
600
|
"prefer-spread": "error",
|
|
688
601
|
"prefer-template": "error",
|
|
689
|
-
"template-curly-spacing": "error",
|
|
690
|
-
"generator-star-spacing": "off",
|
|
691
602
|
"no-empty-static-block": "error",
|
|
692
603
|
"no-new-native-nonconstructor": "error",
|
|
693
|
-
"arrow-parens": [
|
|
694
|
-
"error",
|
|
695
|
-
"as-needed",
|
|
696
|
-
{
|
|
697
|
-
requireForBlockBody: false
|
|
698
|
-
}
|
|
699
|
-
],
|
|
700
|
-
quotes: [
|
|
701
|
-
"error",
|
|
702
|
-
"single",
|
|
703
|
-
{
|
|
704
|
-
avoidEscape: true,
|
|
705
|
-
allowTemplateLiterals: false
|
|
706
|
-
}
|
|
707
|
-
],
|
|
708
604
|
"prefer-const": [
|
|
709
605
|
"error",
|
|
710
606
|
{
|
|
@@ -727,21 +623,6 @@ var javascript = defineConfig([
|
|
|
727
623
|
avoidQuotes: true
|
|
728
624
|
}
|
|
729
625
|
],
|
|
730
|
-
"spaced-comment": [
|
|
731
|
-
"error",
|
|
732
|
-
"always",
|
|
733
|
-
{
|
|
734
|
-
line: {
|
|
735
|
-
markers: ["/"],
|
|
736
|
-
exceptions: ["/", "#"]
|
|
737
|
-
},
|
|
738
|
-
block: {
|
|
739
|
-
markers: ["!"],
|
|
740
|
-
exceptions: ["*"],
|
|
741
|
-
balanced: true
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
],
|
|
745
626
|
// best-practice
|
|
746
627
|
eqeqeq: ["error", "smart"],
|
|
747
628
|
complexity: ["error", { max: 30 }],
|
|
@@ -750,7 +631,6 @@ var javascript = defineConfig([
|
|
|
750
631
|
"consistent-return": "off",
|
|
751
632
|
"no-alert": "error",
|
|
752
633
|
"no-case-declarations": "error",
|
|
753
|
-
"no-multi-spaces": "error",
|
|
754
634
|
"no-multi-str": "error",
|
|
755
635
|
"no-with": "error",
|
|
756
636
|
"no-void": "error",
|
|
@@ -759,12 +639,9 @@ var javascript = defineConfig([
|
|
|
759
639
|
"require-await": "off",
|
|
760
640
|
"no-return-assign": "off",
|
|
761
641
|
"one-var": ["error", "never"],
|
|
762
|
-
"operator-linebreak": ["error", "before"],
|
|
763
|
-
"comma-dangle": ["error", "always-multiline"],
|
|
764
642
|
"max-params": ["error", { max: 5 }],
|
|
765
643
|
"max-depth": ["error", { max: 5 }],
|
|
766
644
|
"max-nested-callbacks": ["error", { max: 10 }],
|
|
767
|
-
"max-statements-per-line": ["error", { max: 2 }],
|
|
768
645
|
"max-lines": [
|
|
769
646
|
"error",
|
|
770
647
|
{
|
|
@@ -789,19 +666,6 @@ var javascript = defineConfig([
|
|
|
789
666
|
variables: true
|
|
790
667
|
}
|
|
791
668
|
],
|
|
792
|
-
"max-len": [
|
|
793
|
-
"error",
|
|
794
|
-
{
|
|
795
|
-
code: 200,
|
|
796
|
-
tabWidth: 2,
|
|
797
|
-
comments: 200,
|
|
798
|
-
ignoreUrls: true,
|
|
799
|
-
ignoreStrings: true,
|
|
800
|
-
ignoreRegExpLiterals: true,
|
|
801
|
-
ignoreTemplateLiterals: true,
|
|
802
|
-
ignoreTrailingComments: true
|
|
803
|
-
}
|
|
804
|
-
],
|
|
805
669
|
"sort-imports": [
|
|
806
670
|
"error",
|
|
807
671
|
{
|
|
@@ -859,7 +723,8 @@ var typescriptCore = import_typescript_eslint.default.config({
|
|
|
859
723
|
"@typescript-eslint/no-unused-vars": [
|
|
860
724
|
"error",
|
|
861
725
|
{
|
|
862
|
-
|
|
726
|
+
// Args after the last used will be reported
|
|
727
|
+
args: "after-used",
|
|
863
728
|
argsIgnorePattern: "^_",
|
|
864
729
|
caughtErrors: "all",
|
|
865
730
|
caughtErrorsIgnorePattern: "^_",
|
|
@@ -932,9 +797,7 @@ var typescript = defineConfig([
|
|
|
932
797
|
{
|
|
933
798
|
name: "ntnyq/ts/cjs",
|
|
934
799
|
files: [GLOB_JS],
|
|
935
|
-
rules: {
|
|
936
|
-
"@typescript-eslint/no-var-requires": "off"
|
|
937
|
-
}
|
|
800
|
+
rules: {}
|
|
938
801
|
}
|
|
939
802
|
]);
|
|
940
803
|
|
|
@@ -1003,8 +866,6 @@ var yml = defineConfig([
|
|
|
1003
866
|
yml: import_eslint_plugin_yml.default
|
|
1004
867
|
},
|
|
1005
868
|
rules: {
|
|
1006
|
-
// Avoid conflicts with js comment
|
|
1007
|
-
"spaced-comment": "off",
|
|
1008
869
|
...import_eslint_plugin_yml.default.configs.standard.rules,
|
|
1009
870
|
...import_eslint_plugin_yml.default.configs.prettier.rules,
|
|
1010
871
|
"yml/no-empty-mapping-value": "off",
|
|
@@ -1025,8 +886,6 @@ var toml = defineConfig([
|
|
|
1025
886
|
toml: import_eslint_plugin_toml.default
|
|
1026
887
|
},
|
|
1027
888
|
rules: {
|
|
1028
|
-
// Avoid conflicts with js comment
|
|
1029
|
-
"spaced-comment": "off",
|
|
1030
889
|
"toml/comma-style": "error",
|
|
1031
890
|
"toml/keys-order": "error",
|
|
1032
891
|
"toml/no-space-dots": "error",
|
|
@@ -1332,7 +1191,6 @@ var markdown = defineConfig([
|
|
|
1332
1191
|
"@typescript-eslint/no-redeclare": "off",
|
|
1333
1192
|
"@typescript-eslint/no-namespace": "off",
|
|
1334
1193
|
"@typescript-eslint/no-unused-vars": "off",
|
|
1335
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
1336
1194
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
1337
1195
|
"@typescript-eslint/no-use-before-define": "off"
|
|
1338
1196
|
}
|