eslint-config-heck 1.1.0 → 1.3.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 +26 -6
  2. package/package.json +12 -12
package/node.js CHANGED
@@ -202,6 +202,7 @@ const rules = {
202
202
  "no-warning-comments": "warn",
203
203
  "no-with": "error",
204
204
  "prefer-named-capture-group": "error",
205
+ "prefer-object-has-own": "error",
205
206
  "prefer-promise-reject-errors": "error",
206
207
  "prefer-regex-literals": "error",
207
208
  radix: ["error", "always"],
@@ -391,7 +392,7 @@ const rules = {
391
392
  "prefer-exponentiation-operator": "error",
392
393
  "prefer-object-spread": "error",
393
394
  "quote-props": ["error", "as-needed"],
394
- quotes: ["error", "double"],
395
+ quotes: ["error", "double", { avoidEscape: true }],
395
396
  semi: [
396
397
  "error",
397
398
  "always",
@@ -549,6 +550,14 @@ const rules = {
549
550
  "react/sort-comp": [
550
551
  "error",
551
552
  {
553
+ order: [
554
+ "static-variables",
555
+ "instance-variables",
556
+ "static-methods",
557
+ "lifecycle",
558
+ "render",
559
+ "everything-else",
560
+ ],
552
561
  groups: {
553
562
  render: ["render", "/^render.+$/"],
554
563
  },
@@ -711,12 +720,14 @@ const rules = {
711
720
  "unicorn/no-object-as-default-parameter": "error",
712
721
  "unicorn/no-process-exit": "error",
713
722
  "unicorn/no-static-only-class": "error",
723
+ "unicorn/no-thenable": "error",
714
724
  "unicorn/no-this-assignment": "error",
715
725
  "unicorn/no-unreadable-array-destructuring": "error",
716
726
  "unicorn/no-unsafe-regex": "off",
717
727
  "unicorn/no-unused-properties": "error",
718
728
  "unicorn/no-useless-fallback-in-spread": "error",
719
729
  "unicorn/no-useless-length-check": "error",
730
+ "unicorn/no-useless-promise-resolve-reject": "error",
720
731
  "unicorn/no-useless-spread": "error",
721
732
  "unicorn/no-useless-undefined": "error",
722
733
  "unicorn/no-zero-fractions": "error",
@@ -742,6 +753,7 @@ const rules = {
742
753
  "unicorn/prefer-dom-node-text-content": "error",
743
754
  "unicorn/prefer-export-from": "off",
744
755
  "unicorn/prefer-includes": "error",
756
+ "unicorn/prefer-json-parse-buffer": "error",
745
757
  "unicorn/prefer-keyboard-event-key": "error",
746
758
  "unicorn/prefer-math-trunc": "error",
747
759
  "unicorn/prefer-modern-dom-apis": "error",
@@ -750,7 +762,6 @@ const rules = {
750
762
  "unicorn/prefer-node-protocol": "error",
751
763
  "unicorn/prefer-number-properties": "error",
752
764
  "unicorn/prefer-object-from-entries": "error",
753
- "unicorn/prefer-object-has-own": "error",
754
765
  "unicorn/prefer-optional-catch-binding": "error",
755
766
  "unicorn/prefer-prototype-methods": "error",
756
767
  "unicorn/prefer-query-selector": "off",
@@ -771,6 +782,7 @@ const rules = {
771
782
  "unicorn/prefer-top-level-await": "off",
772
783
  "unicorn/prefer-type-error": "error",
773
784
  "unicorn/prevent-abbreviations": "off",
785
+ "unicorn/relative-url-style": "error",
774
786
  "unicorn/require-array-join-separator": "error",
775
787
  "unicorn/require-number-to-fixed-digits-argument": "error",
776
788
  "unicorn/require-post-message-target-origin": "error",
@@ -792,7 +804,7 @@ const overrides = [
792
804
  ...globals,
793
805
  NodeJS: true,
794
806
  },
795
- plugins: [...plugins, "@typescript-eslint", "typescript-heck",/* , "deprecation" */],
807
+ plugins: [...plugins, "@typescript-eslint", "typescript-heck", "@delagen/deprecation"],
796
808
  rules: {
797
809
  // Typescript
798
810
  "@typescript-eslint/adjacent-overload-signatures": "error",
@@ -1056,7 +1068,13 @@ const overrides = [
1056
1068
  "no-shadow": "off",
1057
1069
  "@typescript-eslint/no-shadow": "error",
1058
1070
  "no-throw-literal": "off",
1059
- "@typescript-eslint/no-throw-literal": "error",
1071
+ "@typescript-eslint/no-throw-literal": [
1072
+ "error",
1073
+ {
1074
+ allowThrowingAny: false,
1075
+ allowThrowingUnknown: false,
1076
+ },
1077
+ ],
1060
1078
  "no-unused-expressions": "off",
1061
1079
  "@typescript-eslint/no-unused-expressions": "error",
1062
1080
  "no-unused-vars": "off",
@@ -1092,7 +1110,7 @@ const overrides = [
1092
1110
  },
1093
1111
  ],
1094
1112
  quotes: "off",
1095
- "@typescript-eslint/quotes": ["error", "double"],
1113
+ "@typescript-eslint/quotes": ["error", "double", { avoidEscape: true }],
1096
1114
  "require-await": "off",
1097
1115
  "@typescript-eslint/require-await": "off",
1098
1116
  "no-return-await": "off",
@@ -1109,7 +1127,7 @@ const overrides = [
1109
1127
  "@typescript-eslint/space-infix-ops": "error",
1110
1128
 
1111
1129
  // Deprecation
1112
- // "deprecation/deprecation": "error",
1130
+ "@delagen/deprecation/deprecation": "error",
1113
1131
 
1114
1132
  // Typescript handles itself
1115
1133
  "consistent-return": "off",
@@ -1171,6 +1189,8 @@ const overrides = [
1171
1189
  "jest/no-test-prefixes": "error",
1172
1190
  "jest/no-test-return-statement": "error",
1173
1191
  "jest/prefer-called-with": "error",
1192
+ "jest/prefer-comparison-matcher": "error",
1193
+ "jest/prefer-equality-matcher": "error",
1174
1194
  "jest/prefer-expect-assertions": "off",
1175
1195
  "jest/prefer-expect-resolves": "error",
1176
1196
  "jest/prefer-hooks-on-top": "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-heck",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,20 +15,20 @@
15
15
  "author": "atheck",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@typescript-eslint/eslint-plugin": "5.5.0",
19
- "@typescript-eslint/parser": "5.5.0",
20
- "eslint": "8.3.0",
21
- "eslint-plugin-deprecation": "1.2.1",
22
- "eslint-plugin-jest": "25.3.0",
23
- "eslint-plugin-react": "7.27.1",
18
+ "@delagen/eslint-plugin-deprecation": "1.3.2",
19
+ "@typescript-eslint/eslint-plugin": "5.10.0",
20
+ "@typescript-eslint/parser": "5.10.0",
21
+ "eslint": "8.7.0",
22
+ "eslint-plugin-jest": "25.7.0",
23
+ "eslint-plugin-react": "7.28.0",
24
24
  "eslint-plugin-typescript-heck": "1.2.0",
25
- "eslint-plugin-unicorn": "39.0.0",
25
+ "eslint-plugin-unicorn": "40.1.0",
26
26
  "react": "17.0.2",
27
- "typescript": "4.5.2"
27
+ "typescript": "4.5.4"
28
28
  },
29
29
  "devDependencies": {
30
- "@types/jest": "27.0.3",
31
- "@types/react": "17.0.37",
32
- "jest": "27.4.0"
30
+ "@types/jest": "27.4.0",
31
+ "@types/react": "17.0.38",
32
+ "jest": "27.4.7"
33
33
  }
34
34
  }