-
-
Notifications
You must be signed in to change notification settings - Fork 961
feat(lint): migrate first batch of Playwright rules from eslint-plugin-playwright #7775
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
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
375870d
feat(biome_js_analyze): add 13 Playwright lint rules to nursery
voxxit a275448
Update crates/biome_analyze/src/rule.rs
voxxit a0737d6
Update crates/biome_js_analyze/src/lint/nursery/missing_playwright_aw…
voxxit c353d56
refactor(biome_js_analyze): enhance missingPlaywrightAwait rule and a…
voxxit 9051d4a
feat(biome_js_analyze): enhance missingPlaywrightAwait rule to check …
voxxit 8873983
fix(biome_js_analyze): refine missingPlaywrightAwait rule logic and u…
voxxit 8e425da
refactor(biome_js_analyze): remove describe-like callee check from mi…
voxxit f0f6348
refactor(biome_js_analyze): remove "describe" call checks from missin…
voxxit a02098d
refactor(biome_js_analyze): remove invalid and valid describe test ca…
voxxit 388330e
refactor(biome_js_analyze): enhance missingPlaywrightAwait rule to ch…
voxxit 99e2e59
chore: add changeset for the Playwright additions
voxxit c05d8db
[autofix.ci] apply automated fixes
autofix-ci[bot] cef341d
feat(biome_js_analyze): add Playwright lint rules and remove focused …
voxxit 7194c72
feat(biome_js_analyze): add 13 new Playwright lint rules to nursery
voxxit 5cc62d5
refactor(biome_js_analyze): enhance missingPlaywrightAwait rule and u…
voxxit 69e6acf
fix(biome_configuration): correct rule indices in linter rules
voxxit 55697e8
refactor(biome_jsonrpc): remove noPlaywrightFocusedTest rule and upda…
voxxit 95b7c54
refactor(biome_js_analyze): update Playwright lint rules to use Token…
voxxit 59d18c5
refactor(biome_js_analyze): clean up imports in no_playwright_useless…
voxxit 9911849
refactor(biome_js_analyze): simplify logic in missingPlaywrightAwait …
voxxit d84f9c8
Merge upstream/main into pr-7775
josh-ninjatrader 95487c4
feat(lint): enhance Playwright linting rules and add new tests (pr fe…
josh-ninjatrader 533ed8d
refactor(lint): simplify diagnostic messages for missing awaits and u…
josh-ninjatrader b6cdc5d
refactor(lint): update diagnostic examples for Playwright await rules
josh-ninjatrader ae23713
refactor(lint): ensure dynamic caller is supported
josh-ninjatrader File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Added 11 new Playwright lint rules to the nursery (from eslint-plugin-playwright). | ||
|
|
||
| The following rules are now available: | ||
|
|
||
| - [`noPlaywrightMissingAwait`](https://biomejs.dev/linter/rules/no-playwright-missing-await/): Enforce awaiting async Playwright APIs. | ||
| - [`noPlaywrightElementHandle`](https://biomejs.dev/linter/rules/no-playwright-element-handle/): Prefer locators over element handles (`page.$()` and `page.$$()`). | ||
| - [`noPlaywrightEval`](https://biomejs.dev/linter/rules/no-playwright-eval/): Disallow `page.$eval()` and `page.$$eval()` methods. | ||
| - [`noPlaywrightForceOption`](https://biomejs.dev/linter/rules/no-playwright-force-option/): Disallow the `force` option on user interactions. | ||
| - [`noPlaywrightNetworkidle`](https://biomejs.dev/linter/rules/no-playwright-networkidle/): Disallow deprecated `networkidle` wait option. | ||
| - [`noPlaywrightPagePause`](https://biomejs.dev/linter/rules/no-playwright-page-pause/): Disallow `page.pause()` debugging calls in committed code. | ||
| - [`noPlaywrightUselessAwait`](https://biomejs.dev/linter/rules/no-playwright-useless-await/): Disallow unnecessary `await` on synchronous Playwright methods. | ||
| - [`usePlaywrightValidDescribeCallback`](https://biomejs.dev/linter/rules/use-playwright-valid-describe-callback/): Validate describe callback signatures are not async. | ||
| - [`noPlaywrightWaitForNavigation`](https://biomejs.dev/linter/rules/no-playwright-wait-for-navigation/): Prefer modern navigation APIs over deprecated `waitForNavigation()`. | ||
| - [`noPlaywrightWaitForSelector`](https://biomejs.dev/linter/rules/no-playwright-wait-for-selector/): Prefer locators over deprecated `waitForSelector()`. | ||
| - [`noPlaywrightWaitForTimeout`](https://biomejs.dev/linter/rules/no-playwright-wait-for-timeout/): Disallow hard-coded timeouts with `waitForTimeout()`. | ||
|
|
||
| Additionally, the existing `noFocusedTests` rule now detects Playwright's `test.only()` pattern, and `noSkippedTests` already handles Playwright's `test.skip()` pattern. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 140 additions & 0 deletions
140
crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
401 changes: 316 additions & 85 deletions
401
crates/biome_configuration/src/analyzer/linter/rules.rs
Large diffs are not rendered by default.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
crates/biome_configuration/src/generated/domain_selector.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
A few changes are needed: