Skip to content

Commit

Permalink
ci(e2e): support ESLint v9 in E2E ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
k1tikurisu committed Oct 5, 2024
1 parent 80052a0 commit 772e164
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/e2e-eslint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
yarn init -p
yarn add eslint
echo '{"rules": {"semi": ["error", "always"]}}' > .eslintrc
echo 'export default {rules:{semi:["error", "always"]}};' > eslint.config.mjs
echo '42;' | tee ok.js
yarn eslint ok.js
Expand All @@ -41,9 +41,25 @@ jobs:
source scripts/e2e-setup-ci.sh
yarn init -p
yarn add eslint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
yarn add eslint typescript typescript-eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser @typescript-eslint/utils
echo '{"parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint"], "rules": {"@typescript-eslint/explicit-function-return-type": "error"}}' > .eslintrc
cat > eslint.config.mjs <<EOF
import tseslint from "typescript-eslint";
export default [
{
files: ["ok.ts", "ko.ts"],
plugins: {
"@typescript-eslint": tseslint.plugin
},
languageOptions: {
parser: tseslint.parser,
},
rules: {
"@typescript-eslint/explicit-function-return-type": ["error"],
}
}
]
EOF
echo 'const f = (): number => 42;' | tee ok.ts
yarn eslint ok.ts
Expand Down

0 comments on commit 772e164

Please sign in to comment.