-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add typescript-eslint rules with type informations to e2e tests #48267
Conversation
Size Change: +1.01 kB (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
Flaky tests detected in 5cebb3a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4229560930
|
a12672a
to
7e13955
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I confirmed that each rule works correctly in the local environment.
What?
Enable the following three rules to Playwright e2e tests:
@typescript-eslint/await-thenable
@typescript-eslint/no-floating-promises
@typescript-eslint/no-misused-promises
And also fixes the reported errors.
Why?
Playwright is well-typed, we can enable some additional eslint rules to help us catch some bugs.
How?
I originally tried enabling the rule for the whole project, but it's taking too long to process the monorepo. I think it's related to this documented known issue on the website.
I also tried extending
plugin:@typescript-eslint/recommended-requiring-type-checking
, but some rules don't work great with pure js files.Testing Instructions
npm run lint:js # or npm run lint:js -- test/e2e
CI should pass.
Screenshots