Skip to content

Commit c923265

Browse files
committed
e2e: fix migrate eslint config
The . after the eslint command is important, else it lints nothing. Ignore the data directory explicitly. Add eslint-parser and set languageOptions.ecmaVersion to 2022, else the import.meta above leads to a lint error. Issue: ecamp#5282
1 parent b870e0a commit c923265

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

e2e/eslint.config.mjs

+9
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export default [
2020
'plugin:cypress/recommended',
2121
'plugin:prettier/recommended'
2222
),
23+
{
24+
ignores: ['data/'],
25+
},
2326

2427
includeIgnoreFile(gitignorePath),
2528

@@ -29,6 +32,12 @@ export default [
2932
...globals.node,
3033
...globals.mocha,
3134
},
35+
36+
ecmaVersion: 2022,
37+
38+
parserOptions: {
39+
parser: '@babel/eslint-parser',
40+
},
3241
},
3342

3443
rules: {

e2e/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"cypress:open": "cypress open",
66
"cypress:run": "cypress run",
77
"lint": "npm run lint:eslint && npm run lint:prettier",
8-
"lint:eslint": "eslint --fix",
8+
"lint:eslint": "eslint --fix .",
99
"lint:prettier": "prettier --write --ignore-path .gitignore **/*.{js,mjs,json,md}",
1010
"lint:check": "npm run lint:check:eslint && npm run lint:check:prettier",
11-
"lint:check:eslint": "eslint",
11+
"lint:check:eslint": "eslint .",
1212
"lint:check:prettier": "prettier --check --ignore-path .gitignore **/*.{js,mjs,json,md}"
1313
},
1414
"devDependencies": {
15+
"@babel/eslint-parser": "7.25.1",
1516
"@eslint/compat": "1.1.1",
1617
"@eslint/eslintrc": "3.1.0",
1718
"@eslint/js": "9.9.0",

0 commit comments

Comments
 (0)