eslint-config-heck 1.3.0 → 1.5.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 +15 -6
  2. package/package.json +16 -13
package/node.js CHANGED
@@ -506,6 +506,8 @@ const rules = {
506
506
  unnamedComponents: "arrow-function",
507
507
  },
508
508
  ],
509
+ "react/hook-use-state": "error",
510
+ "react/iframe-missing-sandbox": "error",
509
511
  "react/no-access-state-in-setstate": "error",
510
512
  "react/no-adjacent-inline-elements": "error",
511
513
  "react/no-array-index-key": "error",
@@ -770,8 +772,7 @@ const rules = {
770
772
  "unicorn/prefer-set-has": "error",
771
773
  "unicorn/prefer-spread": "error",
772
774
 
773
- // TODO: only available in Node.js 15+, so enable it later
774
- "unicorn/prefer-string-replace-all": "off",
775
+ "unicorn/prefer-string-replace-all": "error",
775
776
  "unicorn/prefer-string-slice": "error",
776
777
  "unicorn/prefer-string-starts-ends-with": "error",
777
778
  "unicorn/prefer-string-trim-start-end": "error",
@@ -788,6 +789,7 @@ const rules = {
788
789
  "unicorn/require-post-message-target-origin": "error",
789
790
  "unicorn/string-content": "off",
790
791
  "unicorn/template-indent": "off",
792
+ "unicorn/text-encoding-identifier-case": "error",
791
793
  "unicorn/throw-new-error": "error",
792
794
  };
793
795
 
@@ -840,9 +842,9 @@ const overrides = [
840
842
  "error",
841
843
  {
842
844
  allowExpressions: true,
843
- allowTypedFunctionExpressions: false,
844
- allowHigherOrderFunctions: false,
845
- allowDirectConstAssertionInArrowFunctions: false,
845
+ allowTypedFunctionExpressions: true,
846
+ allowHigherOrderFunctions: true,
847
+ allowDirectConstAssertionInArrowFunctions: true,
846
848
  allowConciseArrowFunctionExpressionsStartingWithVoid: false,
847
849
  },
848
850
  ],
@@ -919,6 +921,7 @@ const overrides = [
919
921
  "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
920
922
  "@typescript-eslint/no-non-null-assertion": "error",
921
923
  "@typescript-eslint/no-parameter-properties": "off",
924
+ "@typescript-eslint/no-redundant-type-constituents": "error",
922
925
  "@typescript-eslint/no-require-imports": "error",
923
926
  "@typescript-eslint/no-this-alias": "error",
924
927
  "@typescript-eslint/no-type-alias": "off",
@@ -933,6 +936,7 @@ const overrides = [
933
936
  "@typescript-eslint/no-unsafe-call": "error",
934
937
  "@typescript-eslint/no-unsafe-member-access": "error",
935
938
  "@typescript-eslint/no-unsafe-return": "error",
939
+ "@typescript-eslint/no-useless-empty-export": "error",
936
940
  "@typescript-eslint/no-var-requires": "error",
937
941
  "@typescript-eslint/non-nullable-type-assertion-style": "off",
938
942
  "@typescript-eslint/prefer-as-const": "error",
@@ -1121,6 +1125,8 @@ const overrides = [
1121
1125
  omitLastInOneLineBlock: false,
1122
1126
  },
1123
1127
  ],
1128
+ "space-before-blocks": "off",
1129
+ "@typescript-eslint/space-before-blocks": "error",
1124
1130
  "space-before-function-paren": "off",
1125
1131
  "@typescript-eslint/space-before-function-paren": "error",
1126
1132
  "space-infix-ops": "off",
@@ -1170,6 +1176,7 @@ const overrides = [
1170
1176
  "jest/no-alias-methods": "error",
1171
1177
  "jest/no-commented-out-tests": "error",
1172
1178
  "jest/no-conditional-expect": "error",
1179
+ "jest/no-conditional-in-test": "error",
1173
1180
  "jest/no-deprecated-functions": "error",
1174
1181
  "jest/no-disabled-tests": "warn",
1175
1182
  "jest/no-done-callback": "error",
@@ -1178,7 +1185,6 @@ const overrides = [
1178
1185
  "jest/no-focused-tests": "warn",
1179
1186
  "jest/no-hooks": "off",
1180
1187
  "jest/no-identical-title": "error",
1181
- "jest/no-if": "error",
1182
1188
  "jest/no-interpolation-in-snapshots": "error",
1183
1189
  "jest/no-jasmine-globals": "error",
1184
1190
  "jest/no-jest-import": "error",
@@ -1199,6 +1205,7 @@ const overrides = [
1199
1205
  ignore: ["describe"],
1200
1206
  },
1201
1207
  ],
1208
+ "jest/prefer-snapshot-hint": "error",
1202
1209
  "jest/prefer-spy-on": "error",
1203
1210
  "jest/prefer-strict-equal": "error",
1204
1211
  "jest/prefer-to-be": "error",
@@ -1226,4 +1233,6 @@ module.exports = {
1226
1233
  settings,
1227
1234
  rules,
1228
1235
  overrides,
1236
+
1237
+ reportUnusedDisableDirectives: true,
1229
1238
  };
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "eslint-config-heck",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
+ "install-peers": "npm install --no-save react",
7
8
  "lint": "eslint --ext '.ts,.tsx' ."
8
9
  },
9
10
  "keywords": [
@@ -16,19 +17,21 @@
16
17
  "license": "MIT",
17
18
  "dependencies": {
18
19
  "@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
- "eslint-plugin-typescript-heck": "1.2.0",
25
- "eslint-plugin-unicorn": "40.1.0",
26
- "react": "17.0.2",
27
- "typescript": "4.5.4"
20
+ "@typescript-eslint/eslint-plugin": "5.16.0",
21
+ "@typescript-eslint/parser": "5.16.0",
22
+ "eslint": "8.11.0",
23
+ "eslint-plugin-jest": "26.1.3",
24
+ "eslint-plugin-react": "7.29.4",
25
+ "eslint-plugin-typescript-heck": "1.2.1",
26
+ "eslint-plugin-unicorn": "41.0.1",
27
+ "typescript": "4.6.3"
28
28
  },
29
29
  "devDependencies": {
30
- "@types/jest": "27.4.0",
31
- "@types/react": "17.0.38",
32
- "jest": "27.4.7"
30
+ "@types/jest": "27.4.1",
31
+ "@types/react": "17.0.43",
32
+ "jest": "27.5.1"
33
+ },
34
+ "peerDependencies": {
35
+ "react": ">=16.8.0"
33
36
  }
34
37
  }