Skip to content

Commit 5b8d772

Browse files
committed
Fix eslint config
1 parent f2e7e0b commit 5b8d772

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

eslint.config.mjs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
import { defineConfig } from "eslint/config";
2+
import js from "@eslint/js";
13
import { FlatCompat } from '@eslint/eslintrc';
24
import mochaPlugin from 'eslint-plugin-mocha';
5+
import cypressPlugin from 'eslint-plugin-cypress';
36
import globals from 'globals';
47
import babelParser from "@babel/eslint-parser";
58

69
const compat = new FlatCompat();
710

11+
812
export default [
913
{
1014
languageOptions: {
@@ -22,18 +26,27 @@ export default [
2226
},
2327
},
2428
},
25-
mochaPlugin.configs.flat.recommended,
2629
{
30+
plugins: {
31+
mocha: mochaPlugin,
32+
},
2733
rules: {
2834
'mocha/no-exclusive-tests': 'error',
29-
'mocha/no-skipped-tests': 'error',
35+
'mocha/no-pending-tests': 'error',
3036
'mocha/no-mocha-arrows': 'off',
3137
},
3238
},
33-
...compat.config({
34-
extends: ['plugin:cypress/recommended'],
39+
{
40+
plugins: {
41+
cypress: cypressPlugin,
42+
},
3543
rules: {
3644
'cypress/no-unnecessary-waiting': 'off',
3745
},
38-
}),
46+
languageOptions: {
47+
globals: {
48+
...cypressPlugin.configs.globals?.globals || {},
49+
},
50+
},
51+
},
3952
];

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)