Skip to content
Closed
Show file tree
Hide file tree
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 Oct 17, 2025
a275448
Update crates/biome_analyze/src/rule.rs
voxxit Oct 17, 2025
a0737d6
Update crates/biome_js_analyze/src/lint/nursery/missing_playwright_aw…
voxxit Oct 17, 2025
c353d56
refactor(biome_js_analyze): enhance missingPlaywrightAwait rule and a…
voxxit Oct 17, 2025
9051d4a
feat(biome_js_analyze): enhance missingPlaywrightAwait rule to check …
voxxit Oct 17, 2025
8873983
fix(biome_js_analyze): refine missingPlaywrightAwait rule logic and u…
voxxit Oct 17, 2025
8e425da
refactor(biome_js_analyze): remove describe-like callee check from mi…
voxxit Oct 17, 2025
f0f6348
refactor(biome_js_analyze): remove "describe" call checks from missin…
voxxit Oct 17, 2025
a02098d
refactor(biome_js_analyze): remove invalid and valid describe test ca…
voxxit Oct 17, 2025
388330e
refactor(biome_js_analyze): enhance missingPlaywrightAwait rule to ch…
voxxit Oct 17, 2025
99e2e59
chore: add changeset for the Playwright additions
voxxit Oct 17, 2025
c05d8db
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 17, 2025
cef341d
feat(biome_js_analyze): add Playwright lint rules and remove focused …
voxxit Oct 19, 2025
7194c72
feat(biome_js_analyze): add 13 new Playwright lint rules to nursery
voxxit Oct 19, 2025
5cc62d5
refactor(biome_js_analyze): enhance missingPlaywrightAwait rule and u…
voxxit Oct 19, 2025
69e6acf
fix(biome_configuration): correct rule indices in linter rules
voxxit Oct 19, 2025
55697e8
refactor(biome_jsonrpc): remove noPlaywrightFocusedTest rule and upda…
voxxit Oct 19, 2025
95b7c54
refactor(biome_js_analyze): update Playwright lint rules to use Token…
voxxit Oct 19, 2025
59d18c5
refactor(biome_js_analyze): clean up imports in no_playwright_useless…
voxxit Oct 19, 2025
9911849
refactor(biome_js_analyze): simplify logic in missingPlaywrightAwait …
voxxit Oct 19, 2025
d84f9c8
Merge upstream/main into pr-7775
josh-ninjatrader Nov 30, 2025
95487c4
feat(lint): enhance Playwright linting rules and add new tests (pr fe…
josh-ninjatrader Nov 30, 2025
533ed8d
refactor(lint): simplify diagnostic messages for missing awaits and u…
josh-ninjatrader Nov 30, 2025
b6cdc5d
refactor(lint): update diagnostic examples for Playwright await rules
josh-ninjatrader Nov 30, 2025
ae23713
refactor(lint): ensure dynamic caller is supported
josh-ninjatrader Nov 30, 2025
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
21 changes: 21 additions & 0 deletions .changeset/common-lizards-sniff.md
Copy link
Copy Markdown
Member

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:

  • create a changeset for each rule
  • for each rule, please provide a small summary (seems like you already do so) and optionally a small snippet of invalid code
  • Avoid mentioning the batch thing, it's not needed to the user

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.
14 changes: 13 additions & 1 deletion crates/biome_analyze/src/rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ pub enum RuleSource {
EslintVitest(&'static str),
/// Rules from [Eslint Plugin Vue.js](https://eslint.vuejs.org/)
EslintVueJs(&'static str),
/// Rules from [Eslint Plugin Playwright](https://github.com/playwright-community/eslint-plugin-playwright)
EslintPlaywright(&'static str),
/// Rules from [graphql-schema-linter](https://github.com/cjoudrey/graphql-schema-linter)
GraphqlSchemaLinter(&'static str),
/// Rules from [Stylelint](https://github.com/stylelint/stylelint)
Expand Down Expand Up @@ -195,6 +197,7 @@ impl std::fmt::Display for RuleSource {
write!(f, "eslint-plugin-package-json-dependencies")
}
Self::EslintPerfectionist(_) => write!(f, "eslint-plugin-perfectionist"),
Self::EslintPlaywright(_) => write!(f, "eslint-plugin-playwright"),
Self::EslintQwik(_) => write!(f, "eslint-plugin-qwik"),
Self::EslintReact(_) => write!(f, "eslint-plugin-react"),
Self::EslintReactHooks(_) => write!(f, "eslint-plugin-react-hooks"),
Expand Down Expand Up @@ -277,6 +280,7 @@ impl RuleSource {
| Self::EslintPackageJson(rule_name)
| Self::EslintPackageJsonDependencies(rule_name)
| Self::EslintPerfectionist(rule_name)
| Self::EslintPlaywright(rule_name)
| Self::EslintQwik(rule_name)
| Self::EslintReact(rule_name)
| Self::EslintReactHooks(rule_name)
Expand Down Expand Up @@ -321,6 +325,7 @@ impl RuleSource {
format!("package-json-dependencies/{rule_name}")
}
Self::EslintPerfectionist(rule_name) => format!("perfectionist/{rule_name}"),
Self::EslintPlaywright(rule_name) => format!("playwright/{rule_name}"),
Self::EslintQwik(rule_name) => format!("qwik/{rule_name}"),
Self::EslintReact(rule_name) => format!("react/{rule_name}"),
Self::EslintReactHooks(rule_name) => format!("react-hooks/{rule_name}"),
Expand Down Expand Up @@ -377,6 +382,7 @@ impl RuleSource {
Self::EslintUnusedImports(rule_name) => format!("https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/{rule_name}.md"),
Self::EslintVitest(rule_name) => format!("https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/{rule_name}.md"),
Self::EslintVueJs(rule_name) => format!("https://eslint.vuejs.org/rules/{rule_name}"),
Self::EslintPlaywright(rule_name) => format!("https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/{rule_name}.md"),
Self::GraphqlSchemaLinter(rule_name) => format!("https://github.com/cjoudrey/graphql-schema-linter?tab=readme-ov-file#{rule_name}"),
Self::Stylelint(rule_name) => format!("https://github.com/stylelint/stylelint/blob/main/lib/rules/{rule_name}/README.md"),
}
Expand Down Expand Up @@ -456,6 +462,8 @@ pub enum RuleDomain {
Solid,
/// Next.js framework rules
Next,
/// Playwright testing library rules
Playwright,
/// Qwik framework rules
Qwik,
/// Vue.js framework rules
Expand All @@ -474,6 +482,7 @@ impl Display for RuleDomain {
Self::Test => fmt.write_str("test"),
Self::Solid => fmt.write_str("solid"),
Self::Next => fmt.write_str("next"),
Self::Playwright => fmt.write_str("playwright"),
Self::Qwik => fmt.write_str("qwik"),
Self::Vue => fmt.write_str("vue"),
Self::Project => fmt.write_str("project"),
Expand Down Expand Up @@ -510,6 +519,7 @@ impl RuleDomain {
],
Self::Solid => &[&("solid", ">=1.0.0")],
Self::Next => &[&("next", ">=14.0.0")],
Self::Playwright => &[&("@playwright/test", ">=1.0.0")],
Self::Qwik => &[
&("@builder.io/qwik", ">=1.0.0"),
&("@qwik.dev/core", ">=2.0.0"),
Expand Down Expand Up @@ -538,6 +548,7 @@ impl RuleDomain {
],
Self::Solid => &[],
Self::Next => &[],
Self::Playwright => &["test", "expect"],
Self::Qwik => &[],
Self::Vue => &[],
Self::Project => &[],
Expand All @@ -551,6 +562,7 @@ impl RuleDomain {
Self::Test => "test",
Self::Solid => "solid",
Self::Next => "next",
Self::Playwright => "playwright",
Self::Qwik => "qwik",
Self::Vue => "vue",
Self::Project => "project",
Expand All @@ -568,11 +580,11 @@ impl FromStr for RuleDomain {
"test" => Ok(Self::Test),
"solid" => Ok(Self::Solid),
"next" => Ok(Self::Next),
"playwright" => Ok(Self::Playwright),
"qwik" => Ok(Self::Qwik),
"vue" => Ok(Self::Vue),
"project" => Ok(Self::Project),
"tailwind" => Ok(Self::Tailwind),

_ => Err("Invalid rule domain"),
}
}
Expand Down
140 changes: 140 additions & 0 deletions 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.

401 changes: 316 additions & 85 deletions crates/biome_configuration/src/analyzer/linter/rules.rs

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions 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.

11 changes: 11 additions & 0 deletions crates/biome_diagnostics_categories/src/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,17 @@ define_categories! {
"lint/nursery/noMultiStr": "https://biomejs.dev/linter/rules/no-multi-str",
"lint/nursery/noNextAsyncClientComponent": "https://biomejs.dev/linter/rules/no-next-async-client-component",
"lint/nursery/noParametersOnlyUsedInRecursion": "https://biomejs.dev/linter/rules/no-parameters-only-used-in-recursion",
"lint/nursery/noPlaywrightElementHandle": "https://biomejs.dev/linter/rules/no-playwright-element-handle",
"lint/nursery/noPlaywrightEval": "https://biomejs.dev/linter/rules/no-playwright-eval",
"lint/nursery/noPlaywrightForceOption": "https://biomejs.dev/linter/rules/no-playwright-force-option",
"lint/nursery/noPlaywrightMissingAwait": "https://biomejs.dev/linter/rules/no-playwright-missing-await",
"lint/nursery/noPlaywrightNetworkidle": "https://biomejs.dev/linter/rules/no-playwright-networkidle",
"lint/nursery/noPlaywrightPagePause": "https://biomejs.dev/linter/rules/no-playwright-page-pause",
"lint/nursery/noPlaywrightUselessAwait": "https://biomejs.dev/linter/rules/no-playwright-useless-await",
"lint/nursery/usePlaywrightValidDescribeCallback": "https://biomejs.dev/linter/rules/use-playwright-valid-describe-callback",
"lint/nursery/noPlaywrightWaitForNavigation": "https://biomejs.dev/linter/rules/no-playwright-wait-for-navigation",
"lint/nursery/noPlaywrightWaitForSelector": "https://biomejs.dev/linter/rules/no-playwright-wait-for-selector",
"lint/nursery/noPlaywrightWaitForTimeout": "https://biomejs.dev/linter/rules/no-playwright-wait-for-timeout",
"lint/nursery/noProto": "https://biomejs.dev/linter/rules/no-proto",
"lint/nursery/noReactForwardRef": "https://biomejs.dev/linter/rules/no-react-forward-ref",
"lint/nursery/noShadow": "https://biomejs.dev/linter/rules/no-shadow",
Expand Down
Loading
Loading