eslint-config-heck 0.1.1 → 1.0.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.
Files changed (2) hide show
  1. package/node.js +25 -29
  2. package/package.json +8 -7
package/node.js CHANGED
@@ -358,14 +358,7 @@ const rules = {
358
358
  consistent: true,
359
359
  },
360
360
  ],
361
- "object-curly-spacing": [
362
- "error",
363
- "always",
364
- {
365
- arraysInObjects: false,
366
- objectsInObjects: false,
367
- },
368
- ],
361
+ "object-curly-spacing": ["error", "always"],
369
362
  "object-property-newline": [
370
363
  "error",
371
364
  {
@@ -397,14 +390,7 @@ const rules = {
397
390
  ],
398
391
  "prefer-exponentiation-operator": "error",
399
392
  "prefer-object-spread": "error",
400
- "quote-props": [
401
- "error",
402
- "as-needed",
403
- {
404
- keywords: true,
405
- numbers: true,
406
- },
407
- ],
393
+ "quote-props": ["error", "as-needed"],
408
394
  quotes: ["error", "double"],
409
395
  semi: [
410
396
  "error",
@@ -475,8 +461,14 @@ const rules = {
475
461
  "prefer-destructuring": [
476
462
  "error",
477
463
  {
478
- object: true,
479
- array: false,
464
+ VariableDeclarator: {
465
+ array: false,
466
+ object: true,
467
+ },
468
+ AssignmentExpression: {
469
+ array: false,
470
+ object: false,
471
+ },
480
472
  },
481
473
  ],
482
474
  "prefer-numeric-literals": "error",
@@ -558,7 +550,7 @@ const rules = {
558
550
  "error",
559
551
  {
560
552
  groups: {
561
- rendering: ["/^render.+$/", "render"],
553
+ render: ["render", "/^render.+$/"],
562
554
  },
563
555
  },
564
556
  ],
@@ -658,7 +650,7 @@ const rules = {
658
650
  {
659
651
  declaration: "parens-new-line",
660
652
  assignment: "parens-new-line",
661
- "return": "parens-new-line",
653
+ return: "parens-new-line",
662
654
  arrow: "parens-new-line",
663
655
  },
664
656
  ],
@@ -702,6 +694,7 @@ const rules = {
702
694
  "unicorn/no-array-method-this-argument": "error",
703
695
  "unicorn/no-array-push-push": "error",
704
696
  "unicorn/no-array-reduce": "off",
697
+ "unicorn/no-await-expression-member": "error",
705
698
  "unicorn/no-console-spaces": "error",
706
699
  "unicorn/no-document-cookie": "error",
707
700
  "unicorn/no-empty-file": "error",
@@ -740,6 +733,7 @@ const rules = {
740
733
  "unicorn/prefer-array-index-of": "error",
741
734
  "unicorn/prefer-array-some": "error",
742
735
  "unicorn/prefer-at": "error",
736
+ "unicorn/prefer-code-point": "error",
743
737
  "unicorn/prefer-date-now": "error",
744
738
  "unicorn/prefer-default-parameters": "error",
745
739
  "unicorn/prefer-dom-node-append": "error",
@@ -798,14 +792,14 @@ const overrides = [
798
792
  ...globals,
799
793
  NodeJS: true,
800
794
  },
801
- plugins: [...plugins, "@typescript-eslint"/* , "deprecation" */],
795
+ plugins: [...plugins, "@typescript-eslint", "typescript-heck",/* , "deprecation" */],
802
796
  rules: {
803
797
  // Typescript
804
798
  "@typescript-eslint/adjacent-overload-signatures": "error",
805
799
  "@typescript-eslint/array-type": [
806
800
  "error",
807
801
  {
808
- "default": "array",
802
+ default: "array",
809
803
  },
810
804
  ],
811
805
  "@typescript-eslint/await-thenable": "error",
@@ -900,7 +894,11 @@ const overrides = [
900
894
  "@typescript-eslint/no-for-in-array": "error",
901
895
  "@typescript-eslint/no-implicit-any-catch": "error",
902
896
  "@typescript-eslint/no-inferrable-types": "error",
903
- "@typescript-eslint/no-invalid-void-type": "error",
897
+ "@typescript-eslint/no-invalid-void-type": [
898
+ "error", {
899
+ allowAsThisParameter: true,
900
+ },
901
+ ],
904
902
  "@typescript-eslint/no-meaningless-void-operator": "error",
905
903
  "@typescript-eslint/no-misused-new": "error",
906
904
  "@typescript-eslint/no-misused-promises": "error",
@@ -1073,12 +1071,7 @@ const overrides = [
1073
1071
  "no-useless-constructor": "off",
1074
1072
  "@typescript-eslint/no-useless-constructor": "error",
1075
1073
  "object-curly-spacing": "off",
1076
- "@typescript-eslint/object-curly-spacing": [
1077
- "error", "always", {
1078
- arraysInObjects: false,
1079
- objectsInObjects: false,
1080
- },
1081
- ],
1074
+ "@typescript-eslint/object-curly-spacing": ["error", "always"],
1082
1075
  "padding-line-between-statements": "off",
1083
1076
  "@typescript-eslint/padding-line-between-statements": [
1084
1077
  "error",
@@ -1139,6 +1132,9 @@ const overrides = [
1139
1132
  "no-unexpected-multiline": "off",
1140
1133
  "no-unsafe-negation": "off",
1141
1134
  "valid-typeof": "off",
1135
+
1136
+ // typescript-heck
1137
+ "typescript-heck/array-type-spacing": ["error", "always"],
1142
1138
  },
1143
1139
  },
1144
1140
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-heck",
3
- "version": "0.1.1",
3
+ "version": "1.0.0",
4
4
  "description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,17 +17,18 @@
17
17
  "dependencies": {
18
18
  "@typescript-eslint/eslint-plugin": "5.4.0",
19
19
  "@typescript-eslint/parser": "5.4.0",
20
- "eslint": "8.2.0",
20
+ "eslint": "8.3.0",
21
21
  "eslint-plugin-deprecation": "1.2.1",
22
- "eslint-plugin-jest": "25.2.4",
23
- "eslint-plugin-react": "7.27.0",
24
- "eslint-plugin-unicorn": "38.0.1",
22
+ "eslint-plugin-jest": "25.3.0",
23
+ "eslint-plugin-react": "7.27.1",
24
+ "eslint-plugin-typescript-heck": "1.0.0",
25
+ "eslint-plugin-unicorn": "39.0.0",
25
26
  "react": "17.0.2",
26
27
  "typescript": "4.5.2"
27
28
  },
28
29
  "devDependencies": {
29
- "@types/jest": "27.0.2",
30
- "@types/react": "17.0.35",
30
+ "@types/jest": "27.0.3",
31
+ "@types/react": "17.0.37",
31
32
  "jest": "27.3.1"
32
33
  }
33
34
  }