@html-validate/eslint-config-jest 5.27.0 → 5.28.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/index.mjs ADDED
@@ -0,0 +1,21 @@
1
+ import { fileURLToPath } from "node:url";
2
+ import path from "node:path";
3
+ import { FlatCompat } from "@eslint/eslintrc";
4
+ import legacyConfig from "./legacy.cjs";
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = path.dirname(__filename);
8
+
9
+ const compat = new FlatCompat({
10
+ baseDirectory: __dirname,
11
+ resolvePluginsRelativeTo: __dirname,
12
+ });
13
+
14
+ const migrated = compat.config(legacyConfig);
15
+
16
+ for (const ruleset of migrated) {
17
+ ruleset.files = ["**/*.spec.[jt]s"];
18
+ ruleset.ignores = ["cypress/**", "tests/e2e/**"];
19
+ }
20
+
21
+ export default migrated;
@@ -29,6 +29,9 @@ module.exports = {
29
29
  /* common in testcases, kind of useless */
30
30
  "sonarjs/no-duplicate-string": "off",
31
31
 
32
+ /* yields error way to early (considering jest is full of describe with it and this rule considers even arrow functions) */
33
+ "sonarjs/no-nested-functions": "off",
34
+
32
35
  /* jest uses @jest-* tags for per-file configuration */
33
36
  "tsdoc/syntax": "off",
34
37
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-validate/eslint-config-jest",
3
- "version": "5.27.0",
3
+ "version": "5.28.0",
4
4
  "description": "Eslint sharable config used by the various HTML-validate packages",
5
5
  "keywords": [
6
6
  "eslint",
@@ -17,9 +17,10 @@
17
17
  },
18
18
  "license": "MIT",
19
19
  "author": "David Sveningsson <ext@sidvind.com>",
20
- "main": "index.js",
20
+ "main": "index.mjs",
21
21
  "files": [
22
- "*.js"
22
+ "*.cjs",
23
+ "*.mjs"
23
24
  ],
24
25
  "scripts": {
25
26
  "prepack": "release-prepack --retain-scripts",
@@ -27,6 +28,7 @@
27
28
  "prepublishOnly": "release-prepublish --retain-scripts"
28
29
  },
29
30
  "dependencies": {
31
+ "@eslint/eslintrc": "3.3.0",
30
32
  "eslint-plugin-jest": "28.11.0"
31
33
  },
32
34
  "peerDependencies": {
@@ -39,5 +41,5 @@
39
41
  "publishConfig": {
40
42
  "access": "public"
41
43
  },
42
- "gitHead": "25203ddadbb314ab3d584080fb8022af039ebafd"
44
+ "gitHead": "943b446e6793777ceb880c87aed74551789b2c4a"
43
45
  }