eslint-config-heck 0.1.0 → 0.1.4
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/node.js +45 -56
- package/package.json +1 -1
package/node.js
CHANGED
|
@@ -148,7 +148,7 @@ const rules = {
|
|
|
148
148
|
"no-floating-decimal": "error",
|
|
149
149
|
"no-global-assign": "error",
|
|
150
150
|
"no-implicit-coercion": "error",
|
|
151
|
-
"no-implicit-globals": "
|
|
151
|
+
"no-implicit-globals": "off",
|
|
152
152
|
"no-implied-eval": "error",
|
|
153
153
|
"no-invalid-this": "error",
|
|
154
154
|
"no-iterator": "error",
|
|
@@ -244,7 +244,7 @@ const rules = {
|
|
|
244
244
|
caughtErrors: "all",
|
|
245
245
|
},
|
|
246
246
|
],
|
|
247
|
-
"no-use-before-define": "error",
|
|
247
|
+
"no-use-before-define": ["error", "nofunc"],
|
|
248
248
|
|
|
249
249
|
// Stylistic issues
|
|
250
250
|
"array-bracket-newline": [
|
|
@@ -268,7 +268,7 @@ const rules = {
|
|
|
268
268
|
"func-call-spacing": "error",
|
|
269
269
|
"func-name-matching": "off",
|
|
270
270
|
"func-names": "off",
|
|
271
|
-
"func-style": "error",
|
|
271
|
+
"func-style": ["error", "declaration", { allowArrowFunctions: true }],
|
|
272
272
|
"function-call-argument-newline": ["error", "consistent"],
|
|
273
273
|
"function-paren-newline": ["error", "multiline-arguments"],
|
|
274
274
|
"id-denylist": "off",
|
|
@@ -292,22 +292,7 @@ const rules = {
|
|
|
292
292
|
"keyword-spacing": "error",
|
|
293
293
|
"line-comment-position": "error",
|
|
294
294
|
"linebreak-style": ["error"],
|
|
295
|
-
"lines-around-comment":
|
|
296
|
-
"error",
|
|
297
|
-
{
|
|
298
|
-
beforeBlockComment: true,
|
|
299
|
-
beforeLineComment: true,
|
|
300
|
-
allowBlockStart: true,
|
|
301
|
-
allowBlockEnd: false,
|
|
302
|
-
allowObjectStart: true,
|
|
303
|
-
allowObjectEnd: false,
|
|
304
|
-
allowArrayStart: true,
|
|
305
|
-
allowArrayEnd: false,
|
|
306
|
-
allowClassStart: true,
|
|
307
|
-
allowClassEnd: false,
|
|
308
|
-
applyDefaultIgnorePatterns: true,
|
|
309
|
-
},
|
|
310
|
-
],
|
|
295
|
+
"lines-around-comment": "off",
|
|
311
296
|
"lines-between-class-members": [
|
|
312
297
|
"error",
|
|
313
298
|
"always",
|
|
@@ -351,8 +336,7 @@ const rules = {
|
|
|
351
336
|
],
|
|
352
337
|
"no-negated-condition": "off",
|
|
353
338
|
|
|
354
|
-
|
|
355
|
-
"no-nested-ternary": "off",
|
|
339
|
+
"no-nested-ternary": "error",
|
|
356
340
|
"no-new-object": "error",
|
|
357
341
|
"no-plusplus": "off",
|
|
358
342
|
"no-restricted-syntax": "off",
|
|
@@ -374,14 +358,7 @@ const rules = {
|
|
|
374
358
|
consistent: true,
|
|
375
359
|
},
|
|
376
360
|
],
|
|
377
|
-
"object-curly-spacing": [
|
|
378
|
-
"error",
|
|
379
|
-
"always",
|
|
380
|
-
{
|
|
381
|
-
arraysInObjects: false,
|
|
382
|
-
objectsInObjects: false,
|
|
383
|
-
},
|
|
384
|
-
],
|
|
361
|
+
"object-curly-spacing": ["error", "always"],
|
|
385
362
|
"object-property-newline": [
|
|
386
363
|
"error",
|
|
387
364
|
{
|
|
@@ -413,14 +390,7 @@ const rules = {
|
|
|
413
390
|
],
|
|
414
391
|
"prefer-exponentiation-operator": "error",
|
|
415
392
|
"prefer-object-spread": "error",
|
|
416
|
-
"quote-props": [
|
|
417
|
-
"error",
|
|
418
|
-
"as-needed",
|
|
419
|
-
{
|
|
420
|
-
keywords: true,
|
|
421
|
-
numbers: true,
|
|
422
|
-
},
|
|
423
|
-
],
|
|
393
|
+
"quote-props": ["error", "as-needed"],
|
|
424
394
|
quotes: ["error", "double"],
|
|
425
395
|
semi: [
|
|
426
396
|
"error",
|
|
@@ -491,8 +461,14 @@ const rules = {
|
|
|
491
461
|
"prefer-destructuring": [
|
|
492
462
|
"error",
|
|
493
463
|
{
|
|
494
|
-
|
|
495
|
-
|
|
464
|
+
VariableDeclarator: {
|
|
465
|
+
array: false,
|
|
466
|
+
object: true,
|
|
467
|
+
},
|
|
468
|
+
AssignmentExpression: {
|
|
469
|
+
array: false,
|
|
470
|
+
object: false,
|
|
471
|
+
},
|
|
496
472
|
},
|
|
497
473
|
],
|
|
498
474
|
"prefer-numeric-literals": "error",
|
|
@@ -525,8 +501,8 @@ const rules = {
|
|
|
525
501
|
"react/function-component-definition": [
|
|
526
502
|
"error",
|
|
527
503
|
{
|
|
528
|
-
namedComponents: "function-
|
|
529
|
-
unnamedComponents: "function
|
|
504
|
+
namedComponents: "function-declaration",
|
|
505
|
+
unnamedComponents: "arrow-function",
|
|
530
506
|
},
|
|
531
507
|
],
|
|
532
508
|
"react/no-access-state-in-setstate": "error",
|
|
@@ -574,7 +550,7 @@ const rules = {
|
|
|
574
550
|
"error",
|
|
575
551
|
{
|
|
576
552
|
groups: {
|
|
577
|
-
|
|
553
|
+
render: ["render", "/^render.+$/"],
|
|
578
554
|
},
|
|
579
555
|
},
|
|
580
556
|
],
|
|
@@ -634,7 +610,7 @@ const rules = {
|
|
|
634
610
|
"react/jsx-max-depth": "off",
|
|
635
611
|
"react/jsx-max-props-per-line": "error",
|
|
636
612
|
"react/jsx-newline": "off",
|
|
637
|
-
"react/jsx-no-bind": "error",
|
|
613
|
+
"react/jsx-no-bind": ["error", { allowArrowFunctions: true }],
|
|
638
614
|
"react/jsx-no-comment-textnodes": "error",
|
|
639
615
|
"react/jsx-no-constructed-context-values": "error",
|
|
640
616
|
"react/jsx-no-duplicate-props": "error",
|
|
@@ -688,7 +664,11 @@ const rules = {
|
|
|
688
664
|
},
|
|
689
665
|
],
|
|
690
666
|
"unicorn/consistent-destructuring": "error",
|
|
691
|
-
"unicorn/consistent-function-scoping":
|
|
667
|
+
"unicorn/consistent-function-scoping": [
|
|
668
|
+
"error", {
|
|
669
|
+
checkArrowFunctions: false,
|
|
670
|
+
},
|
|
671
|
+
],
|
|
692
672
|
"unicorn/custom-error-definition": "off",
|
|
693
673
|
"unicorn/empty-brace-spaces": "off",
|
|
694
674
|
"unicorn/error-message": "error",
|
|
@@ -721,9 +701,9 @@ const rules = {
|
|
|
721
701
|
"unicorn/no-hex-escape": "error",
|
|
722
702
|
"unicorn/no-instanceof-array": "error",
|
|
723
703
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
724
|
-
"unicorn/no-keyword-prefix": "
|
|
704
|
+
"unicorn/no-keyword-prefix": "off",
|
|
725
705
|
"unicorn/no-lonely-if": "error",
|
|
726
|
-
"unicorn/no-nested-ternary": "
|
|
706
|
+
"unicorn/no-nested-ternary": "off",
|
|
727
707
|
"unicorn/no-new-array": "error",
|
|
728
708
|
"unicorn/no-new-buffer": "error",
|
|
729
709
|
"unicorn/no-null": "off",
|
|
@@ -763,7 +743,7 @@ const rules = {
|
|
|
763
743
|
"unicorn/prefer-keyboard-event-key": "error",
|
|
764
744
|
"unicorn/prefer-math-trunc": "error",
|
|
765
745
|
"unicorn/prefer-modern-dom-apis": "error",
|
|
766
|
-
"unicorn/prefer-module": "
|
|
746
|
+
"unicorn/prefer-module": "off",
|
|
767
747
|
"unicorn/prefer-negative-index": "error",
|
|
768
748
|
"unicorn/prefer-node-protocol": "error",
|
|
769
749
|
"unicorn/prefer-number-properties": "error",
|
|
@@ -835,7 +815,7 @@ const overrides = [
|
|
|
835
815
|
"@typescript-eslint/class-literal-property-style": "error",
|
|
836
816
|
"@typescript-eslint/consistent-indexed-object-style": "error",
|
|
837
817
|
"@typescript-eslint/consistent-type-assertions": "error",
|
|
838
|
-
"@typescript-eslint/consistent-type-definitions": "
|
|
818
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
839
819
|
"@typescript-eslint/consistent-type-imports": [
|
|
840
820
|
"error",
|
|
841
821
|
{
|
|
@@ -880,6 +860,12 @@ const overrides = [
|
|
|
880
860
|
regex: "^__html$", match: false,
|
|
881
861
|
},
|
|
882
862
|
},
|
|
863
|
+
{
|
|
864
|
+
selector: ["parameter"],
|
|
865
|
+
modifiers: ["unused"],
|
|
866
|
+
format: ["strictCamelCase"],
|
|
867
|
+
leadingUnderscore: "require",
|
|
868
|
+
},
|
|
883
869
|
{
|
|
884
870
|
selector: ["typeLike"],
|
|
885
871
|
format: ["StrictPascalCase"],
|
|
@@ -906,7 +892,11 @@ const overrides = [
|
|
|
906
892
|
"@typescript-eslint/no-for-in-array": "error",
|
|
907
893
|
"@typescript-eslint/no-implicit-any-catch": "error",
|
|
908
894
|
"@typescript-eslint/no-inferrable-types": "error",
|
|
909
|
-
"@typescript-eslint/no-invalid-void-type":
|
|
895
|
+
"@typescript-eslint/no-invalid-void-type": [
|
|
896
|
+
"error", {
|
|
897
|
+
allowAsThisParameter: true,
|
|
898
|
+
},
|
|
899
|
+
],
|
|
910
900
|
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
911
901
|
"@typescript-eslint/no-misused-new": "error",
|
|
912
902
|
"@typescript-eslint/no-misused-promises": "error",
|
|
@@ -1079,12 +1069,7 @@ const overrides = [
|
|
|
1079
1069
|
"no-useless-constructor": "off",
|
|
1080
1070
|
"@typescript-eslint/no-useless-constructor": "error",
|
|
1081
1071
|
"object-curly-spacing": "off",
|
|
1082
|
-
"@typescript-eslint/object-curly-spacing": [
|
|
1083
|
-
"error", "always", {
|
|
1084
|
-
arraysInObjects: false,
|
|
1085
|
-
objectsInObjects: false,
|
|
1086
|
-
},
|
|
1087
|
-
],
|
|
1072
|
+
"@typescript-eslint/object-curly-spacing": ["error", "always"],
|
|
1088
1073
|
"padding-line-between-statements": "off",
|
|
1089
1074
|
"@typescript-eslint/padding-line-between-statements": [
|
|
1090
1075
|
"error",
|
|
@@ -1153,7 +1138,11 @@ const overrides = [
|
|
|
1153
1138
|
rules: {
|
|
1154
1139
|
// eslint-plugin-jest
|
|
1155
1140
|
"jest/consistent-test-it": "error",
|
|
1156
|
-
"jest/expect-expect":
|
|
1141
|
+
"jest/expect-expect": [
|
|
1142
|
+
"error", {
|
|
1143
|
+
assertFunctionNames: ["expect*"],
|
|
1144
|
+
},
|
|
1145
|
+
],
|
|
1157
1146
|
"jest/max-nested-describe": "off",
|
|
1158
1147
|
"jest/no-alias-methods": "error",
|
|
1159
1148
|
"jest/no-commented-out-tests": "error",
|