eslint-config-heck 2.2.1 → 2.4.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/biomeLinting.json CHANGED
@@ -37,6 +37,7 @@
37
37
  },
38
38
  "complexity": {
39
39
  "noBannedTypes": "error",
40
+ "noEmptyTypeParameters": "error",
40
41
  "noExcessiveCognitiveComplexity": "warn",
41
42
  "noExtraBooleanCast": "error",
42
43
  "noForEach": "error",
@@ -48,6 +49,7 @@
48
49
  "noUselessEmptyExport": "error",
49
50
  "noUselessFragments": "error",
50
51
  "noUselessLabel": "error",
52
+ "noUselessLoneBlockStatements": "error",
51
53
  "noUselessRename": "error",
52
54
  "noUselessSwitchCase": "error",
53
55
  "noUselessThisAlias": "error",
@@ -73,6 +75,7 @@
73
75
  "noInnerDeclarations": "error",
74
76
  "noInvalidConstructorSuper": "error",
75
77
  "noInvalidNewBuiltin": "error",
78
+ "noInvalidUseBeforeDeclaration": "off",
76
79
  "noNewSymbol": "off",
77
80
  "noNonoctalDecimalEscape": "error",
78
81
  "noPrecisionLoss": "error",
@@ -87,7 +90,9 @@
87
90
  "noUnreachableSuper": "error",
88
91
  "noUnsafeFinally": "error",
89
92
  "noUnsafeOptionalChaining": "error",
93
+ "noUnusedImports": "error",
90
94
  "noUnusedLabels": "error",
95
+ "noUnusedPrivateClassMembers": "error",
91
96
  "noUnusedVariables": "error",
92
97
  "noVoidElementsWithChildren": "error",
93
98
  "noVoidTypeReturn": "error",
@@ -103,7 +108,8 @@
103
108
  },
104
109
  "security": {
105
110
  "noDangerouslySetInnerHtml": "error",
106
- "noDangerouslySetInnerHtmlWithChildren": "error"
111
+ "noDangerouslySetInnerHtmlWithChildren": "error",
112
+ "noGlobalEval": "error"
107
113
  },
108
114
  "style": {
109
115
  "noArguments": "error",
@@ -124,17 +130,34 @@
124
130
  "useAsConstAssertion": "error",
125
131
  "useBlockStatements": "error",
126
132
  "useCollapsedElseIf": "error",
133
+ "useConsistentArrayType": "error",
127
134
  "useConst": "error",
128
135
  "useDefaultParameterLast": "error",
129
136
  "useEnumInitializers": "error",
130
137
  "useExponentiationOperator": "error",
138
+ "useExportType": "error",
139
+ "useFilenamingConvention": {
140
+ "level": "error",
141
+ "options": {
142
+ "strictCase": true,
143
+ "filenameCases": [
144
+ "camelCase",
145
+ "PascalCase"
146
+ ]
147
+ }
148
+ },
149
+ "useForOf": "error",
131
150
  "useFragmentSyntax": "off",
151
+ "useImportType": "error",
132
152
  "useLiteralEnumMembers": "error",
133
153
  "useNamingConvention": "off",
154
+ "useNodejsImportProtocol": "error",
155
+ "useNumberNamespace": "error",
134
156
  "useNumericLiterals": "error",
135
157
  "useSelfClosingElements": "error",
136
158
  "useShorthandArrayType": "error",
137
159
  "useShorthandAssign": "error",
160
+ "useShorthandFunctionType": "error",
138
161
  "useSingleCaseStatement": "error",
139
162
  "useSingleVarDeclarator": "error",
140
163
  "useTemplate": "error",
@@ -161,16 +184,19 @@
161
184
  "noDuplicateJsxProps": "error",
162
185
  "noDuplicateObjectKeys": "error",
163
186
  "noDuplicateParameters": "error",
187
+ "noEmptyBlockStatements": "error",
164
188
  "noEmptyInterface": "off",
165
189
  "noExplicitAny": "error",
166
190
  "noExtraNonNullAssertion": "error",
167
191
  "noFallthroughSwitchClause": "error",
168
192
  "noFunctionAssign": "error",
193
+ "noGlobalAssign": "error",
169
194
  "noGlobalIsFinite": "error",
170
195
  "noGlobalIsNan": "error",
171
196
  "noImplicitAnyLet": "error",
172
197
  "noImportAssign": "error",
173
198
  "noLabelVar": "error",
199
+ "noMisleadingCharacterClass": "error",
174
200
  "noMisleadingInstantiator": "error",
175
201
  "noMisrefactoredShorthandAssign": "error",
176
202
  "noPrototypeBuiltins": "error",
@@ -179,8 +205,10 @@
179
205
  "noSelfCompare": "error",
180
206
  "noShadowRestrictedNames": "error",
181
207
  "noSparseArray": "error",
208
+ "noThenProperty": "error",
182
209
  "noUnsafeDeclarationMerging": "error",
183
210
  "noUnsafeNegation": "error",
211
+ "useAwait": "off",
184
212
  "useDefaultSwitchClauseLast": "error",
185
213
  "useGetterReturn": "error",
186
214
  "useIsArray": "error",
@@ -188,39 +216,25 @@
188
216
  "useValidTypeof": "error"
189
217
  },
190
218
  "nursery": {
219
+ "noBarrelFile": "error",
220
+ "noConsole": "error",
191
221
  "noDuplicateJsonKeys": "error",
192
- "noEmptyBlockStatements": "error",
193
- "noEmptyTypeParameters": "error",
194
- "noGlobalAssign": "error",
195
- "noGlobalEval": "error",
196
- "noInvalidUseBeforeDeclaration": "off",
197
- "noMisleadingCharacterClass": "error",
222
+ "noDuplicateTestHooks": "error",
223
+ "noExcessiveNestedTestSuites": "error",
224
+ "noExportsInTest": "error",
225
+ "noFocusedTests": "warn",
226
+ "noNamespaceImport": "error",
198
227
  "noNodejsModules": "off",
199
- "noThenProperty": "error",
200
- "noUnusedImports": "error",
201
- "noUnusedPrivateClassMembers": "error",
202
- "noUselessLoneBlockStatements": "error",
228
+ "noReExportAll": "error",
229
+ "noRestrictedImports": "off",
230
+ "noSemicolonInJsx": "error",
231
+ "noSkippedTests": "warn",
232
+ "noUndeclaredDependencies": "error",
203
233
  "noUselessTernary": "error",
204
- "useAwait": "off",
205
- "useConsistentArrayType": "error",
206
- "useExportType": "error",
207
- "useFilenamingConvention": {
208
- "level": "error",
209
- "options": {
210
- "strictCase": true,
211
- "filenameCases": [
212
- "camelCase",
213
- "PascalCase"
214
- ]
215
- }
216
- },
217
- "useForOf": "error",
218
- "useGroupedTypeImport": "error",
219
234
  "useImportRestrictions": "error",
220
- "useImportType": "error",
221
- "useNodejsImportProtocol": "error",
222
- "useNumberNamespace": "error",
223
- "useShorthandFunctionType": "error"
235
+ "useJsxKeyInIterable": "error",
236
+ "useNodeAssertStrict": "error",
237
+ "useSortedClasses": "off"
224
238
  }
225
239
  }
226
240
  }
package/node.js CHANGED
@@ -527,6 +527,7 @@ const rules = {
527
527
  // eslint-plugin-react
528
528
  "react/boolean-prop-naming": "off",
529
529
  "react/button-has-type": "error",
530
+ "react/checked-requires-onchange-or-readonly": "error",
530
531
  "react/default-props-match-prop-types": "off",
531
532
  "react/destructuring-assignment": [
532
533
  "error",
@@ -1034,6 +1035,7 @@ const overrides = [
1034
1035
  format: null,
1035
1036
  },
1036
1037
  ],
1038
+ "@typescript-eslint/no-array-delete": "error",
1037
1039
  "@typescript-eslint/no-base-to-string": "error",
1038
1040
  "@typescript-eslint/no-confusing-non-null-assertion": "error",
1039
1041
  "@typescript-eslint/no-confusing-void-expression": "off",
@@ -1091,6 +1093,8 @@ const overrides = [
1091
1093
  "@typescript-eslint/parameter-properties": "off",
1092
1094
  "@typescript-eslint/prefer-as-const": "error",
1093
1095
  "@typescript-eslint/prefer-enum-initializers": "error",
1096
+ // unicorns prefer-array-find is more powerful
1097
+ "@typescript-eslint/prefer-find": "off",
1094
1098
  "@typescript-eslint/prefer-for-of": "error",
1095
1099
  "@typescript-eslint/prefer-function-type": "off",
1096
1100
  "@typescript-eslint/prefer-includes": "error",
@@ -1236,20 +1240,6 @@ const overrides = [
1236
1240
  "@typescript-eslint/no-use-before-define": "off",
1237
1241
  "no-useless-constructor": "off",
1238
1242
  "@typescript-eslint/no-useless-constructor": "error",
1239
- "prefer-destructuring": "off",
1240
- "@typescript-eslint/prefer-destructuring": [
1241
- "error",
1242
- {
1243
- VariableDeclarator: {
1244
- array: false,
1245
- object: true,
1246
- },
1247
- AssignmentExpression: {
1248
- array: false,
1249
- object: false,
1250
- },
1251
- },
1252
- ],
1253
1243
  "object-curly-spacing": "off",
1254
1244
  "@typescript-eslint/object-curly-spacing": ["error", "always"],
1255
1245
  "padding-line-between-statements": "off",
@@ -1328,6 +1318,22 @@ const overrides = [
1328
1318
  next: "type",
1329
1319
  },
1330
1320
  ],
1321
+ "prefer-destructuring": "off",
1322
+ "@typescript-eslint/prefer-destructuring": [
1323
+ "error",
1324
+ {
1325
+ VariableDeclarator: {
1326
+ array: false,
1327
+ object: true,
1328
+ },
1329
+ AssignmentExpression: {
1330
+ array: false,
1331
+ object: false,
1332
+ },
1333
+ },
1334
+ ],
1335
+ "prefer-promise-reject-errors": "off",
1336
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
1331
1337
  quotes: "off",
1332
1338
  "@typescript-eslint/quotes": ["error", "double", { avoidEscape: true }],
1333
1339
  "require-await": "off",
@@ -1353,6 +1359,7 @@ const overrides = [
1353
1359
 
1354
1360
  // Typescript handles itself
1355
1361
  "consistent-return": "off",
1362
+ "@typescript-eslint/consistent-return": "off",
1356
1363
  "constructor-super": "off",
1357
1364
  "getter-return": "off",
1358
1365
  "no-class-assign": "off",
package/nodeWithBiome.js CHANGED
@@ -35,7 +35,7 @@ const rules = {
35
35
  "no-await-in-loop": "warn",
36
36
  "no-compare-neg-zero": "off",
37
37
  "no-cond-assign": "off",
38
- "no-console": "error",
38
+ "no-console": "off",
39
39
  "no-constant-binary-expression": "error",
40
40
  "no-constant-condition": "off",
41
41
  "no-control-regex": "off",
@@ -428,6 +428,7 @@ const rules = {
428
428
  // eslint-plugin-react
429
429
  "react/boolean-prop-naming": "off",
430
430
  "react/button-has-type": "off",
431
+ "react/checked-requires-onchange-or-readonly": "error",
431
432
  "react/default-props-match-prop-types": "off",
432
433
  "react/destructuring-assignment": [
433
434
  "error",
@@ -473,13 +474,7 @@ const rules = {
473
474
  "react/jsx-handler-names": "error",
474
475
  "react/jsx-indent": "off",
475
476
  "react/jsx-indent-props": "off",
476
- "react/jsx-key": [
477
- "error",
478
- {
479
- checkFragmentShorthand: true,
480
- checkKeyMustBeforeSpread: true,
481
- },
482
- ],
477
+ "react/jsx-key": "off",
483
478
  "react/jsx-max-depth": "off",
484
479
  "react/jsx-max-props-per-line": "off",
485
480
  "react/jsx-newline": "off",
@@ -858,6 +853,7 @@ const overrides = [
858
853
  format: null,
859
854
  },
860
855
  ],
856
+ "@typescript-eslint/no-array-delete": "off",
861
857
  "@typescript-eslint/no-base-to-string": "error",
862
858
  "@typescript-eslint/no-confusing-non-null-assertion": "error",
863
859
  "@typescript-eslint/no-confusing-void-expression": "off",
@@ -910,6 +906,8 @@ const overrides = [
910
906
  "@typescript-eslint/parameter-properties": "off",
911
907
  "@typescript-eslint/prefer-as-const": "off",
912
908
  "@typescript-eslint/prefer-enum-initializers": "off",
909
+ // unicorns prefer-array-find is more powerful
910
+ "@typescript-eslint/prefer-find": "off",
913
911
  "@typescript-eslint/prefer-for-of": "off",
914
912
  "@typescript-eslint/prefer-function-type": "off",
915
913
  "@typescript-eslint/prefer-includes": "error",
@@ -1027,20 +1025,6 @@ const overrides = [
1027
1025
  "@typescript-eslint/no-use-before-define": "off",
1028
1026
  "no-useless-constructor": "off",
1029
1027
  "@typescript-eslint/no-useless-constructor": "off",
1030
- "prefer-destructuring": "off",
1031
- "@typescript-eslint/prefer-destructuring": [
1032
- "error",
1033
- {
1034
- VariableDeclarator: {
1035
- array: false,
1036
- object: true,
1037
- },
1038
- AssignmentExpression: {
1039
- array: false,
1040
- object: false,
1041
- },
1042
- },
1043
- ],
1044
1028
  "object-curly-spacing": "off",
1045
1029
  "@typescript-eslint/object-curly-spacing": "off",
1046
1030
  "padding-line-between-statements": "off",
@@ -1119,6 +1103,22 @@ const overrides = [
1119
1103
  next: "type",
1120
1104
  },
1121
1105
  ],
1106
+ "prefer-destructuring": "off",
1107
+ "@typescript-eslint/prefer-destructuring": [
1108
+ "error",
1109
+ {
1110
+ VariableDeclarator: {
1111
+ array: false,
1112
+ object: true,
1113
+ },
1114
+ AssignmentExpression: {
1115
+ array: false,
1116
+ object: false,
1117
+ },
1118
+ },
1119
+ ],
1120
+ "prefer-promise-reject-errors": "off",
1121
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
1122
1122
  quotes: "off",
1123
1123
  "@typescript-eslint/quotes": "off",
1124
1124
  "require-await": "off",
@@ -1138,6 +1138,7 @@ const overrides = [
1138
1138
 
1139
1139
  // Typescript handles itself
1140
1140
  "consistent-return": "off",
1141
+ "@typescript-eslint/consistent-return": "off",
1141
1142
  "constructor-super": "off",
1142
1143
  "getter-return": "off",
1143
1144
  "no-class-assign": "off",
@@ -1194,11 +1195,11 @@ const overrides = [
1194
1195
  "jest/no-conditional-in-test": "error",
1195
1196
  "jest/no-confusing-set-timeout": "error",
1196
1197
  "jest/no-deprecated-functions": "error",
1197
- "jest/no-disabled-tests": "warn",
1198
+ "jest/no-disabled-tests": "off",
1198
1199
  "jest/no-done-callback": "error",
1199
- "jest/no-duplicate-hooks": "error",
1200
- "jest/no-export": "error",
1201
- "jest/no-focused-tests": "warn",
1200
+ "jest/no-duplicate-hooks": "off",
1201
+ "jest/no-export": "off",
1202
+ "jest/no-focused-tests": "off",
1202
1203
  "jest/no-hooks": "off",
1203
1204
  "jest/no-identical-title": "error",
1204
1205
  "jest/no-interpolation-in-snapshots": "error",
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "eslint-config-heck",
3
- "version": "2.2.1",
3
+ "version": "2.4.0",
4
4
  "description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
5
+ "type": "module",
5
6
  "main": "index.js",
7
+ "exports": {
8
+ "./biome": "./biomeLinting.json"
9
+ },
6
10
  "scripts": {
7
11
  "update": "npx -y npm-check-updates -i --install always",
8
12
  "lint": "eslint --ext '.ts,.tsx' .",
@@ -17,29 +21,29 @@
17
21
  "author": "atheck",
18
22
  "license": "MIT",
19
23
  "dependencies": {
20
- "@typescript-eslint/eslint-plugin": "6.18.1",
21
- "@typescript-eslint/parser": "6.18.1",
22
- "eslint": "8.56.0",
24
+ "@typescript-eslint/eslint-plugin": "7.1.1",
25
+ "@typescript-eslint/parser": "7.1.1",
26
+ "eslint": "8.57.0",
23
27
  "eslint-import-resolver-typescript": "3.6.1",
24
28
  "eslint-plugin-deprecation": "2.0.0",
25
29
  "eslint-plugin-import": "2.29.1",
26
- "eslint-plugin-jest": "27.6.2",
27
- "eslint-plugin-react": "7.33.2",
30
+ "eslint-plugin-jest": "27.9.0",
31
+ "eslint-plugin-react": "7.34.0",
28
32
  "eslint-plugin-react-hooks": "4.6.0",
29
33
  "eslint-plugin-react-native": "4.1.0",
30
34
  "eslint-plugin-testing-library": "6.2.0",
31
35
  "eslint-plugin-typescript-heck": "1.3.1",
32
- "eslint-plugin-unicorn": "50.0.1",
33
- "typescript": "5.3.3"
36
+ "eslint-plugin-unicorn": "51.0.1",
37
+ "typescript": "5.4.2"
34
38
  },
35
39
  "devDependencies": {
36
- "@biomejs/biome": "1.5.1",
37
- "@testing-library/react": "14.1.2",
38
- "@types/jest": "29.5.11",
39
- "@types/react": "18.2.47",
40
+ "@biomejs/biome": "1.6.0",
41
+ "@testing-library/react": "14.2.1",
42
+ "@types/jest": "29.5.12",
43
+ "@types/react": "18.2.64",
40
44
  "jest": "29.7.0",
41
45
  "react": "18.2.0",
42
- "semantic-release": "22.0.12"
46
+ "semantic-release": "23.0.2"
43
47
  },
44
48
  "repository": {
45
49
  "type": "git",
package/readme.md CHANGED
@@ -85,6 +85,6 @@ If you are using Biome you can also extend your Biome config with the "biomeLint
85
85
  ~~~json
86
86
  {
87
87
  "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
88
- "extends": ["./node_modules/eslint-config-heck/biomeLinting.json"]
88
+ "extends": ["eslint-config-heck/biome"]
89
89
  }
90
90
  ~~~