Skip to content

Commit

Permalink
e2e: fix migrate eslint config
Browse files Browse the repository at this point in the history
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
  • Loading branch information
BacLuc committed Aug 13, 2024
1 parent b870e0a commit c923265
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions e2e/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export default [
'plugin:cypress/recommended',
'plugin:prettier/recommended'
),
{
ignores: ['data/'],
},

includeIgnoreFile(gitignorePath),

Expand All @@ -29,6 +32,12 @@ export default [
...globals.node,
...globals.mocha,
},

ecmaVersion: 2022,

parserOptions: {
parser: '@babel/eslint-parser',
},
},

rules: {
Expand Down
5 changes: 3 additions & 2 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lint:eslint": "eslint --fix",
"lint:eslint": "eslint --fix .",
"lint:prettier": "prettier --write --ignore-path .gitignore **/*.{js,mjs,json,md}",
"lint:check": "npm run lint:check:eslint && npm run lint:check:prettier",
"lint:check:eslint": "eslint",
"lint:check:eslint": "eslint .",
"lint:check:prettier": "prettier --check --ignore-path .gitignore **/*.{js,mjs,json,md}"
},
"devDependencies": {
"@babel/eslint-parser": "7.25.1",
"@eslint/compat": "1.1.1",
"@eslint/eslintrc": "3.1.0",
"@eslint/js": "9.9.0",
Expand Down

0 comments on commit c923265

Please sign in to comment.