eslint-config-heck 1.6.2 → 1.9.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 +40 -3
- package/package.json +6 -3
package/node.js
CHANGED
|
@@ -20,7 +20,7 @@ const env = {
|
|
|
20
20
|
|
|
21
21
|
const globals = {};
|
|
22
22
|
|
|
23
|
-
const plugins = ["react", "unicorn"];
|
|
23
|
+
const plugins = ["react", "react-hooks", "unicorn"];
|
|
24
24
|
const settings = {
|
|
25
25
|
react: {
|
|
26
26
|
version: "detect",
|
|
@@ -641,7 +641,12 @@ const rules = {
|
|
|
641
641
|
allowGlobals: false,
|
|
642
642
|
},
|
|
643
643
|
],
|
|
644
|
-
"react/jsx-no-useless-fragment":
|
|
644
|
+
"react/jsx-no-useless-fragment": [
|
|
645
|
+
"error",
|
|
646
|
+
{
|
|
647
|
+
allowExpressions: true,
|
|
648
|
+
},
|
|
649
|
+
],
|
|
645
650
|
"react/jsx-one-expression-per-line": "error",
|
|
646
651
|
"react/jsx-pascal-case": "error",
|
|
647
652
|
"react/jsx-props-no-multi-spaces": "error",
|
|
@@ -666,6 +671,10 @@ const rules = {
|
|
|
666
671
|
},
|
|
667
672
|
],
|
|
668
673
|
|
|
674
|
+
// eslint-plugin-react-hooks
|
|
675
|
+
"react-hooks/rules-of-hooks": "error",
|
|
676
|
+
"react-hooks/exhaustive-deps": "error",
|
|
677
|
+
|
|
669
678
|
// eslint-plugin-unicorn
|
|
670
679
|
"unicorn/better-regex": "error",
|
|
671
680
|
"unicorn/catch-error-name": [
|
|
@@ -1155,7 +1164,7 @@ const overrides = [
|
|
|
1155
1164
|
},
|
|
1156
1165
|
{
|
|
1157
1166
|
files: ["*.spec.ts", "*.spec.tsx", "*.test.ts", "*.test.tsx", "*.spec.js", "*.spec.jsx", "*.test.js", "*.test.jsx"],
|
|
1158
|
-
plugins: ["jest"],
|
|
1167
|
+
plugins: ["jest", "testing-library"],
|
|
1159
1168
|
rules: {
|
|
1160
1169
|
// eslint-plugin-jest
|
|
1161
1170
|
"jest/consistent-test-it": "error",
|
|
@@ -1213,6 +1222,34 @@ const overrides = [
|
|
|
1213
1222
|
"jest/valid-title": "error",
|
|
1214
1223
|
"@typescript-eslint/unbound-method": "off",
|
|
1215
1224
|
"jest/unbound-method": "error",
|
|
1225
|
+
|
|
1226
|
+
// plugin-testing-library
|
|
1227
|
+
"testing-library/await-async-query": "error",
|
|
1228
|
+
"testing-library/await-async-utils": "error",
|
|
1229
|
+
"testing-library/consistent-data-testid": "off",
|
|
1230
|
+
"testing-library/no-await-sync-events": "off",
|
|
1231
|
+
"testing-library/no-await-sync-query": "off",
|
|
1232
|
+
"testing-library/no-container": "error",
|
|
1233
|
+
"testing-library/no-debugging-utils": "error",
|
|
1234
|
+
"testing-library/no-dom-import": ["error", "react"],
|
|
1235
|
+
"testing-library/no-global-regexp-flag-in-query": "error",
|
|
1236
|
+
"testing-library/no-manual-cleanup": "error",
|
|
1237
|
+
"testing-library/no-node-access": "error",
|
|
1238
|
+
"testing-library/no-promise-in-fire-event": "off",
|
|
1239
|
+
"testing-library/no-render-in-setup": "error",
|
|
1240
|
+
"testing-library/no-unnecessary-act": "error",
|
|
1241
|
+
"testing-library/no-wait-for-empty-callback": "error",
|
|
1242
|
+
"testing-library/no-wait-for-multiple-assertions": "error",
|
|
1243
|
+
"testing-library/no-wait-for-side-effects": "error",
|
|
1244
|
+
"testing-library/no-wait-for-snapshot": "error",
|
|
1245
|
+
"testing-library/prefer-explicit-assert": "error",
|
|
1246
|
+
"testing-library/prefer-find-by": "error",
|
|
1247
|
+
"testing-library/prefer-presence-queries": "error",
|
|
1248
|
+
"testing-library/prefer-query-by-disappearance": "error",
|
|
1249
|
+
"testing-library/prefer-screen-queries": "error",
|
|
1250
|
+
"testing-library/prefer-user-event": "error",
|
|
1251
|
+
"testing-library/prefer-wait-for": "error",
|
|
1252
|
+
"testing-library/render-result-naming-convention": "off",
|
|
1216
1253
|
},
|
|
1217
1254
|
},
|
|
1218
1255
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-heck",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,16 +18,19 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@delagen/eslint-plugin-deprecation": "1.3.2",
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
22
|
-
"@typescript-eslint/parser": "5.
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "5.19.0",
|
|
22
|
+
"@typescript-eslint/parser": "5.19.0",
|
|
23
23
|
"eslint": "8.13.0",
|
|
24
24
|
"eslint-plugin-jest": "26.1.4",
|
|
25
25
|
"eslint-plugin-react": "7.29.4",
|
|
26
|
+
"eslint-plugin-react-hooks": "4.4.0",
|
|
27
|
+
"eslint-plugin-testing-library": "5.3.1",
|
|
26
28
|
"eslint-plugin-typescript-heck": "1.2.1",
|
|
27
29
|
"eslint-plugin-unicorn": "42.0.0",
|
|
28
30
|
"typescript": "4.6.3"
|
|
29
31
|
},
|
|
30
32
|
"devDependencies": {
|
|
33
|
+
"@testing-library/react": "13.0.1",
|
|
31
34
|
"@types/jest": "27.4.1",
|
|
32
35
|
"@types/react": "17.0.43",
|
|
33
36
|
"jest": "27.5.1",
|