@html-validate/eslint-config-cypress 9.17.6 → 9.18.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/index.mjs +18 -0
  2. package/package.json +4 -3
package/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import eslintPluginCypress from "eslint-plugin-cypress";
2
+ import mochaPlugin from "eslint-plugin-mocha";
2
3
 
3
4
  /**
4
5
  * @typedef {import("eslint").Linter.Config} Config
@@ -37,11 +38,19 @@ const defaultConfig = defineConfig({
37
38
 
38
39
  plugins: {
39
40
  cypress: eslintPluginCypress,
41
+ mocha: mochaPlugin,
40
42
  },
41
43
 
42
44
  rules: {
43
45
  ...recommended.rules,
44
46
 
47
+ "mocha/consistent-spacing-between-blocks": "warn",
48
+ "mocha/no-conditional-tests": "error",
49
+ "mocha/no-exclusive-tests": "warn",
50
+ "mocha/no-exports": "error",
51
+ "mocha/no-identical-title": "error",
52
+ "mocha/no-pending-tests": "warn",
53
+
45
54
  /* allow ! assertions in testcases */
46
55
  "@typescript-eslint/no-non-null-assertion": "off",
47
56
 
@@ -50,6 +59,15 @@ const defaultConfig = defineConfig({
50
59
 
51
60
  /* this rule triggers on basically every should(..) */
52
61
  "sonarjs/no-duplicate-string": "off",
62
+
63
+ /* covered by cypress/no-unnecessary-waiting */
64
+ "sonarjs/no-fixed-wait-in-tests": "off",
65
+
66
+ /* handled by mocha/no-exclusive-tests */
67
+ "sonarjs/no-exclusive-tests": "off",
68
+
69
+ /* flags cypress "promises" which cannot be awaited */
70
+ "unicorn/prefer-await": "off",
53
71
  },
54
72
  });
55
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-validate/eslint-config-cypress",
3
- "version": "9.17.6",
3
+ "version": "9.18.0",
4
4
  "description": "Eslint sharable config used by the various HTML-validate packages",
5
5
  "keywords": [
6
6
  "eslint",
@@ -29,7 +29,8 @@
29
29
  "prepublishOnly": "release-prepublish --retain-scripts"
30
30
  },
31
31
  "dependencies": {
32
- "eslint-plugin-cypress": "7.0.0"
32
+ "eslint-plugin-cypress": "7.0.0",
33
+ "eslint-plugin-mocha": "12.0.2"
33
34
  },
34
35
  "peerDependencies": {
35
36
  "eslint": "^10.0.0"
@@ -41,5 +42,5 @@
41
42
  "publishConfig": {
42
43
  "access": "public"
43
44
  },
44
- "gitHead": "f6e1e4f1cfc9cd44f4ddf2f3fb83db94f2befc05"
45
+ "gitHead": "e40cbf0a22a7b1243c860e9111cc6760f0a59aee"
45
46
  }