eslint-config-heck 1.6.0 → 1.7.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 +30 -2
  2. package/package.json +3 -1
package/node.js CHANGED
@@ -732,7 +732,7 @@ const rules = {
732
732
  "unicorn/no-useless-length-check": "error",
733
733
  "unicorn/no-useless-promise-resolve-reject": "error",
734
734
  "unicorn/no-useless-spread": "error",
735
- "unicorn/no-useless-switch-case:": "error",
735
+ "unicorn/no-useless-switch-case": "error",
736
736
  "unicorn/no-useless-undefined": "error",
737
737
  "unicorn/no-zero-fractions": "error",
738
738
  "unicorn/number-literal-case": "error",
@@ -1155,7 +1155,7 @@ const overrides = [
1155
1155
  },
1156
1156
  {
1157
1157
  files: ["*.spec.ts", "*.spec.tsx", "*.test.ts", "*.test.tsx", "*.spec.js", "*.spec.jsx", "*.test.js", "*.test.jsx"],
1158
- plugins: ["jest"],
1158
+ plugins: ["jest", "testing-library"],
1159
1159
  rules: {
1160
1160
  // eslint-plugin-jest
1161
1161
  "jest/consistent-test-it": "error",
@@ -1213,6 +1213,34 @@ const overrides = [
1213
1213
  "jest/valid-title": "error",
1214
1214
  "@typescript-eslint/unbound-method": "off",
1215
1215
  "jest/unbound-method": "error",
1216
+
1217
+ // plugin-testing-library
1218
+ "testing-library/await-async-query": "error",
1219
+ "testing-library/await-async-utils": "error",
1220
+ "testing-library/consistent-data-testid": "off",
1221
+ "testing-library/no-await-sync-events": "off",
1222
+ "testing-library/no-await-sync-query": "off",
1223
+ "testing-library/no-container": "error",
1224
+ "testing-library/no-debugging-utils": "error",
1225
+ "testing-library/no-dom-import": ["error", "react"],
1226
+ "testing-library/no-global-regexp-flag-in-query": "error",
1227
+ "testing-library/no-manual-cleanup": "error",
1228
+ "testing-library/no-node-access": "error",
1229
+ "testing-library/no-promise-in-fire-event": "off",
1230
+ "testing-library/no-render-in-setup": "error",
1231
+ "testing-library/no-unnecessary-act": "error",
1232
+ "testing-library/no-wait-for-empty-callback": "error",
1233
+ "testing-library/no-wait-for-multiple-assertions": "error",
1234
+ "testing-library/no-wait-for-side-effects": "error",
1235
+ "testing-library/no-wait-for-snapshot": "error",
1236
+ "testing-library/prefer-explicit-assert": "error",
1237
+ "testing-library/prefer-find-by": "error",
1238
+ "testing-library/prefer-presence-queries": "error",
1239
+ "testing-library/prefer-query-by-disappearance": "error",
1240
+ "testing-library/prefer-screen-queries": "error",
1241
+ "testing-library/prefer-user-event": "error",
1242
+ "testing-library/prefer-wait-for": "error",
1243
+ "testing-library/render-result-naming-convention": "off",
1216
1244
  },
1217
1245
  },
1218
1246
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-heck",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,11 +23,13 @@
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-testing-library": "5.3.0",
26
27
  "eslint-plugin-typescript-heck": "1.2.1",
27
28
  "eslint-plugin-unicorn": "42.0.0",
28
29
  "typescript": "4.6.3"
29
30
  },
30
31
  "devDependencies": {
32
+ "@testing-library/react": "13.0.1",
31
33
  "@types/jest": "27.4.1",
32
34
  "@types/react": "17.0.43",
33
35
  "jest": "27.5.1",