@forsakringskassan/eslint-config-cypress 12.0.2 → 12.2.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/flat.mjs +52 -14
- package/index.cjs +1 -0
- package/package.json +2 -3
package/flat.mjs
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { FlatCompat } from "@eslint/eslintrc";
|
|
4
|
-
import legacyConfig from "./index.cjs";
|
|
1
|
+
import cypressPlugin from "eslint-plugin-cypress";
|
|
2
|
+
import mochaPlugin from "eslint-plugin-mocha";
|
|
5
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import("eslint").Linter.Config} Config
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param {Config} config
|
|
10
|
+
* @returns {Config}
|
|
11
|
+
*/
|
|
12
|
+
function defineConfig(config) {
|
|
13
|
+
return config;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @param {Config} result
|
|
18
|
+
* @param {Config} it
|
|
19
|
+
* @returns {Config}
|
|
20
|
+
*/
|
|
6
21
|
function merge(result, it) {
|
|
7
22
|
return {
|
|
8
23
|
...result,
|
|
@@ -13,17 +28,40 @@ function merge(result, it) {
|
|
|
13
28
|
};
|
|
14
29
|
}
|
|
15
30
|
|
|
16
|
-
const
|
|
17
|
-
const __dirname = path.dirname(__filename);
|
|
31
|
+
const recommended = cypressPlugin.configs.recommended;
|
|
18
32
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
33
|
+
const config = defineConfig({
|
|
34
|
+
name: "@forsakringskassan/eslint-config-cypress",
|
|
35
|
+
files: ["**/*.cy.[jt]s", "cypress/support/**/*.[jt]s"],
|
|
23
36
|
|
|
24
|
-
|
|
37
|
+
languageOptions: {
|
|
38
|
+
ecmaVersion: 2019,
|
|
39
|
+
sourceType: "module",
|
|
40
|
+
globals: {
|
|
41
|
+
/* the environment is named "globals" */
|
|
42
|
+
...cypressPlugin.environments.globals.globals,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
25
45
|
|
|
26
|
-
|
|
27
|
-
|
|
46
|
+
plugins: {
|
|
47
|
+
cypress: cypressPlugin,
|
|
48
|
+
mocha: mochaPlugin,
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
rules: {
|
|
52
|
+
...recommended.rules,
|
|
53
|
+
|
|
54
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
55
|
+
"@typescript-eslint/triple-slash-reference": "off",
|
|
56
|
+
"mocha/no-exclusive-tests": "warn",
|
|
57
|
+
"mocha/no-identical-title": "error",
|
|
58
|
+
"mocha/no-pending-tests": "warn",
|
|
59
|
+
"mocha/no-skipped-tests": "warn",
|
|
60
|
+
},
|
|
61
|
+
});
|
|
28
62
|
|
|
29
|
-
|
|
63
|
+
/**
|
|
64
|
+
* @param {Config} [override]
|
|
65
|
+
* @returns {Config}
|
|
66
|
+
*/
|
|
67
|
+
export default (override) => merge(config, override ?? {});
|
package/index.cjs
CHANGED
|
@@ -5,6 +5,7 @@ module.exports = {
|
|
|
5
5
|
plugins: ["cypress", "mocha"],
|
|
6
6
|
extends: ["plugin:cypress/recommended"],
|
|
7
7
|
rules: {
|
|
8
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
8
9
|
"@typescript-eslint/triple-slash-reference": "off",
|
|
9
10
|
"mocha/no-exclusive-tests": "warn",
|
|
10
11
|
"mocha/no-identical-title": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/eslint-config-cypress",
|
|
3
|
-
"version": "12.0
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "Försäkringskassans eslint shareable cypress config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint"
|
|
@@ -20,12 +20,11 @@
|
|
|
20
20
|
"index.cjs"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@eslint/eslintrc": "3.3.1",
|
|
24
23
|
"eslint-plugin-cypress": "3.6.0",
|
|
25
24
|
"eslint-plugin-mocha": "10.5.0"
|
|
26
25
|
},
|
|
27
26
|
"engines": {
|
|
28
27
|
"node": ">= 20.19"
|
|
29
28
|
},
|
|
30
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "e134180ff6dad9c342175a1ebc774f105a63c5dd"
|
|
31
30
|
}
|