Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(e2e): fix E2E ESLint #6542

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

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
Loading