eslint-config-heck 1.2.0 → 1.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/node.js +25 -8
- package/package.json +16 -13
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"],
|
|
@@ -505,6 +506,8 @@ const rules = {
|
|
|
505
506
|
unnamedComponents: "arrow-function",
|
|
506
507
|
},
|
|
507
508
|
],
|
|
509
|
+
"react/hook-use-state": "error",
|
|
510
|
+
"react/iframe-missing-sandbox": "error",
|
|
508
511
|
"react/no-access-state-in-setstate": "error",
|
|
509
512
|
"react/no-adjacent-inline-elements": "error",
|
|
510
513
|
"react/no-array-index-key": "error",
|
|
@@ -719,12 +722,14 @@ const rules = {
|
|
|
719
722
|
"unicorn/no-object-as-default-parameter": "error",
|
|
720
723
|
"unicorn/no-process-exit": "error",
|
|
721
724
|
"unicorn/no-static-only-class": "error",
|
|
725
|
+
"unicorn/no-thenable": "error",
|
|
722
726
|
"unicorn/no-this-assignment": "error",
|
|
723
727
|
"unicorn/no-unreadable-array-destructuring": "error",
|
|
724
728
|
"unicorn/no-unsafe-regex": "off",
|
|
725
729
|
"unicorn/no-unused-properties": "error",
|
|
726
730
|
"unicorn/no-useless-fallback-in-spread": "error",
|
|
727
731
|
"unicorn/no-useless-length-check": "error",
|
|
732
|
+
"unicorn/no-useless-promise-resolve-reject": "error",
|
|
728
733
|
"unicorn/no-useless-spread": "error",
|
|
729
734
|
"unicorn/no-useless-undefined": "error",
|
|
730
735
|
"unicorn/no-zero-fractions": "error",
|
|
@@ -750,6 +755,7 @@ const rules = {
|
|
|
750
755
|
"unicorn/prefer-dom-node-text-content": "error",
|
|
751
756
|
"unicorn/prefer-export-from": "off",
|
|
752
757
|
"unicorn/prefer-includes": "error",
|
|
758
|
+
"unicorn/prefer-json-parse-buffer": "error",
|
|
753
759
|
"unicorn/prefer-keyboard-event-key": "error",
|
|
754
760
|
"unicorn/prefer-math-trunc": "error",
|
|
755
761
|
"unicorn/prefer-modern-dom-apis": "error",
|
|
@@ -758,7 +764,6 @@ const rules = {
|
|
|
758
764
|
"unicorn/prefer-node-protocol": "error",
|
|
759
765
|
"unicorn/prefer-number-properties": "error",
|
|
760
766
|
"unicorn/prefer-object-from-entries": "error",
|
|
761
|
-
"unicorn/prefer-object-has-own": "error",
|
|
762
767
|
"unicorn/prefer-optional-catch-binding": "error",
|
|
763
768
|
"unicorn/prefer-prototype-methods": "error",
|
|
764
769
|
"unicorn/prefer-query-selector": "off",
|
|
@@ -767,8 +772,7 @@ const rules = {
|
|
|
767
772
|
"unicorn/prefer-set-has": "error",
|
|
768
773
|
"unicorn/prefer-spread": "error",
|
|
769
774
|
|
|
770
|
-
|
|
771
|
-
"unicorn/prefer-string-replace-all": "off",
|
|
775
|
+
"unicorn/prefer-string-replace-all": "error",
|
|
772
776
|
"unicorn/prefer-string-slice": "error",
|
|
773
777
|
"unicorn/prefer-string-starts-ends-with": "error",
|
|
774
778
|
"unicorn/prefer-string-trim-start-end": "error",
|
|
@@ -779,11 +783,13 @@ const rules = {
|
|
|
779
783
|
"unicorn/prefer-top-level-await": "off",
|
|
780
784
|
"unicorn/prefer-type-error": "error",
|
|
781
785
|
"unicorn/prevent-abbreviations": "off",
|
|
786
|
+
"unicorn/relative-url-style": "error",
|
|
782
787
|
"unicorn/require-array-join-separator": "error",
|
|
783
788
|
"unicorn/require-number-to-fixed-digits-argument": "error",
|
|
784
789
|
"unicorn/require-post-message-target-origin": "error",
|
|
785
790
|
"unicorn/string-content": "off",
|
|
786
791
|
"unicorn/template-indent": "off",
|
|
792
|
+
"unicorn/text-encoding-identifier-case": "error",
|
|
787
793
|
"unicorn/throw-new-error": "error",
|
|
788
794
|
};
|
|
789
795
|
|
|
@@ -836,9 +842,9 @@ const overrides = [
|
|
|
836
842
|
"error",
|
|
837
843
|
{
|
|
838
844
|
allowExpressions: true,
|
|
839
|
-
allowTypedFunctionExpressions:
|
|
840
|
-
allowHigherOrderFunctions:
|
|
841
|
-
allowDirectConstAssertionInArrowFunctions:
|
|
845
|
+
allowTypedFunctionExpressions: true,
|
|
846
|
+
allowHigherOrderFunctions: true,
|
|
847
|
+
allowDirectConstAssertionInArrowFunctions: true,
|
|
842
848
|
allowConciseArrowFunctionExpressionsStartingWithVoid: false,
|
|
843
849
|
},
|
|
844
850
|
],
|
|
@@ -1064,7 +1070,13 @@ const overrides = [
|
|
|
1064
1070
|
"no-shadow": "off",
|
|
1065
1071
|
"@typescript-eslint/no-shadow": "error",
|
|
1066
1072
|
"no-throw-literal": "off",
|
|
1067
|
-
"@typescript-eslint/no-throw-literal":
|
|
1073
|
+
"@typescript-eslint/no-throw-literal": [
|
|
1074
|
+
"error",
|
|
1075
|
+
{
|
|
1076
|
+
allowThrowingAny: false,
|
|
1077
|
+
allowThrowingUnknown: false,
|
|
1078
|
+
},
|
|
1079
|
+
],
|
|
1068
1080
|
"no-unused-expressions": "off",
|
|
1069
1081
|
"@typescript-eslint/no-unused-expressions": "error",
|
|
1070
1082
|
"no-unused-vars": "off",
|
|
@@ -1160,6 +1172,7 @@ const overrides = [
|
|
|
1160
1172
|
"jest/no-alias-methods": "error",
|
|
1161
1173
|
"jest/no-commented-out-tests": "error",
|
|
1162
1174
|
"jest/no-conditional-expect": "error",
|
|
1175
|
+
"jest/no-conditional-in-test": "error",
|
|
1163
1176
|
"jest/no-deprecated-functions": "error",
|
|
1164
1177
|
"jest/no-disabled-tests": "warn",
|
|
1165
1178
|
"jest/no-done-callback": "error",
|
|
@@ -1168,7 +1181,6 @@ const overrides = [
|
|
|
1168
1181
|
"jest/no-focused-tests": "warn",
|
|
1169
1182
|
"jest/no-hooks": "off",
|
|
1170
1183
|
"jest/no-identical-title": "error",
|
|
1171
|
-
"jest/no-if": "error",
|
|
1172
1184
|
"jest/no-interpolation-in-snapshots": "error",
|
|
1173
1185
|
"jest/no-jasmine-globals": "error",
|
|
1174
1186
|
"jest/no-jest-import": "error",
|
|
@@ -1179,6 +1191,8 @@ const overrides = [
|
|
|
1179
1191
|
"jest/no-test-prefixes": "error",
|
|
1180
1192
|
"jest/no-test-return-statement": "error",
|
|
1181
1193
|
"jest/prefer-called-with": "error",
|
|
1194
|
+
"jest/prefer-comparison-matcher": "error",
|
|
1195
|
+
"jest/prefer-equality-matcher": "error",
|
|
1182
1196
|
"jest/prefer-expect-assertions": "off",
|
|
1183
1197
|
"jest/prefer-expect-resolves": "error",
|
|
1184
1198
|
"jest/prefer-hooks-on-top": "error",
|
|
@@ -1187,6 +1201,7 @@ const overrides = [
|
|
|
1187
1201
|
ignore: ["describe"],
|
|
1188
1202
|
},
|
|
1189
1203
|
],
|
|
1204
|
+
"jest/prefer-snapshot-hint": "error",
|
|
1190
1205
|
"jest/prefer-spy-on": "error",
|
|
1191
1206
|
"jest/prefer-strict-equal": "error",
|
|
1192
1207
|
"jest/prefer-to-be": "error",
|
|
@@ -1214,4 +1229,6 @@ module.exports = {
|
|
|
1214
1229
|
settings,
|
|
1215
1230
|
rules,
|
|
1216
1231
|
overrides,
|
|
1232
|
+
|
|
1233
|
+
reportUnusedDisableDirectives: true,
|
|
1217
1234
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-heck",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.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": [
|
|
@@ -15,20 +16,22 @@
|
|
|
15
16
|
"author": "atheck",
|
|
16
17
|
"license": "MIT",
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@delagen/eslint-plugin-deprecation": "1.3.
|
|
19
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
20
|
-
"@typescript-eslint/parser": "5.
|
|
21
|
-
"eslint": "8.
|
|
22
|
-
"eslint-plugin-jest": "
|
|
23
|
-
"eslint-plugin-react": "7.
|
|
19
|
+
"@delagen/eslint-plugin-deprecation": "1.3.2",
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "5.12.1",
|
|
21
|
+
"@typescript-eslint/parser": "5.12.1",
|
|
22
|
+
"eslint": "8.10.0",
|
|
23
|
+
"eslint-plugin-jest": "26.1.1",
|
|
24
|
+
"eslint-plugin-react": "7.29.2",
|
|
24
25
|
"eslint-plugin-typescript-heck": "1.2.0",
|
|
25
|
-
"eslint-plugin-unicorn": "
|
|
26
|
-
"
|
|
27
|
-
"typescript": "4.5.2"
|
|
26
|
+
"eslint-plugin-unicorn": "41.0.0",
|
|
27
|
+
"typescript": "4.5.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/jest": "27.
|
|
31
|
-
"@types/react": "17.0.
|
|
32
|
-
"jest": "27.
|
|
30
|
+
"@types/jest": "27.4.1",
|
|
31
|
+
"@types/react": "17.0.39",
|
|
32
|
+
"jest": "27.5.1"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": ">=16.8.0"
|
|
33
36
|
}
|
|
34
37
|
}
|