eslint-config-heck 2.3.0 → 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 +44 -30
- package/node.js +4 -0
- package/nodeWithBiome.js +10 -12
- package/package.json +15 -11
- package/readme.md +1 -1
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
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"noMisleadingCharacterClass": "error",
|
|
222
|
+
"noDuplicateTestHooks": "error",
|
|
223
|
+
"noExcessiveNestedTestSuites": "error",
|
|
224
|
+
"noExportsInTest": "error",
|
|
225
|
+
"noFocusedTests": "warn",
|
|
226
|
+
"noNamespaceImport": "error",
|
|
198
227
|
"noNodejsModules": "off",
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
"
|
|
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
|
-
"
|
|
221
|
-
"
|
|
222
|
-
"
|
|
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",
|
|
@@ -1092,6 +1093,8 @@ const overrides = [
|
|
|
1092
1093
|
"@typescript-eslint/parameter-properties": "off",
|
|
1093
1094
|
"@typescript-eslint/prefer-as-const": "error",
|
|
1094
1095
|
"@typescript-eslint/prefer-enum-initializers": "error",
|
|
1096
|
+
// unicorns prefer-array-find is more powerful
|
|
1097
|
+
"@typescript-eslint/prefer-find": "off",
|
|
1095
1098
|
"@typescript-eslint/prefer-for-of": "error",
|
|
1096
1099
|
"@typescript-eslint/prefer-function-type": "off",
|
|
1097
1100
|
"@typescript-eslint/prefer-includes": "error",
|
|
@@ -1356,6 +1359,7 @@ const overrides = [
|
|
|
1356
1359
|
|
|
1357
1360
|
// Typescript handles itself
|
|
1358
1361
|
"consistent-return": "off",
|
|
1362
|
+
"@typescript-eslint/consistent-return": "off",
|
|
1359
1363
|
"constructor-super": "off",
|
|
1360
1364
|
"getter-return": "off",
|
|
1361
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": "
|
|
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",
|
|
@@ -911,6 +906,8 @@ const overrides = [
|
|
|
911
906
|
"@typescript-eslint/parameter-properties": "off",
|
|
912
907
|
"@typescript-eslint/prefer-as-const": "off",
|
|
913
908
|
"@typescript-eslint/prefer-enum-initializers": "off",
|
|
909
|
+
// unicorns prefer-array-find is more powerful
|
|
910
|
+
"@typescript-eslint/prefer-find": "off",
|
|
914
911
|
"@typescript-eslint/prefer-for-of": "off",
|
|
915
912
|
"@typescript-eslint/prefer-function-type": "off",
|
|
916
913
|
"@typescript-eslint/prefer-includes": "error",
|
|
@@ -1141,6 +1138,7 @@ const overrides = [
|
|
|
1141
1138
|
|
|
1142
1139
|
// Typescript handles itself
|
|
1143
1140
|
"consistent-return": "off",
|
|
1141
|
+
"@typescript-eslint/consistent-return": "off",
|
|
1144
1142
|
"constructor-super": "off",
|
|
1145
1143
|
"getter-return": "off",
|
|
1146
1144
|
"no-class-assign": "off",
|
|
@@ -1197,11 +1195,11 @@ const overrides = [
|
|
|
1197
1195
|
"jest/no-conditional-in-test": "error",
|
|
1198
1196
|
"jest/no-confusing-set-timeout": "error",
|
|
1199
1197
|
"jest/no-deprecated-functions": "error",
|
|
1200
|
-
"jest/no-disabled-tests": "
|
|
1198
|
+
"jest/no-disabled-tests": "off",
|
|
1201
1199
|
"jest/no-done-callback": "error",
|
|
1202
|
-
"jest/no-duplicate-hooks": "
|
|
1203
|
-
"jest/no-export": "
|
|
1204
|
-
"jest/no-focused-tests": "
|
|
1200
|
+
"jest/no-duplicate-hooks": "off",
|
|
1201
|
+
"jest/no-export": "off",
|
|
1202
|
+
"jest/no-focused-tests": "off",
|
|
1205
1203
|
"jest/no-hooks": "off",
|
|
1206
1204
|
"jest/no-identical-title": "error",
|
|
1207
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.
|
|
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": "
|
|
21
|
-
"@typescript-eslint/parser": "
|
|
22
|
-
"eslint": "8.
|
|
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.
|
|
27
|
-
"eslint-plugin-react": "7.
|
|
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": "
|
|
33
|
-
"typescript": "5.
|
|
36
|
+
"eslint-plugin-unicorn": "51.0.1",
|
|
37
|
+
"typescript": "5.4.2"
|
|
34
38
|
},
|
|
35
39
|
"devDependencies": {
|
|
36
|
-
"@biomejs/biome": "1.
|
|
40
|
+
"@biomejs/biome": "1.6.0",
|
|
37
41
|
"@testing-library/react": "14.2.1",
|
|
38
42
|
"@types/jest": "29.5.12",
|
|
39
|
-
"@types/react": "18.2.
|
|
43
|
+
"@types/react": "18.2.64",
|
|
40
44
|
"jest": "29.7.0",
|
|
41
45
|
"react": "18.2.0",
|
|
42
|
-
"semantic-release": "23.0.
|
|
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": ["
|
|
88
|
+
"extends": ["eslint-config-heck/biome"]
|
|
89
89
|
}
|
|
90
90
|
~~~
|