Zum Inhalt springen
verdict:

Biome 2.4.2

digest

note: die Zusammenfassung und die Release Notes sind auf Englisch

note: keine Zusammenfassung für dieses digest-Release

digest-Releases werden ohne Zusammenfassung gelistet. Die originalen Release Notes dieser Version stehen hier unten.

release-notesgithub.com/biomejs/biome · 123 Zeilen
  1. ## 2.4.2
  2. ### Patch Changes
  3. - [#9103](https://github.com/biomejs/biome/pull/9103) [`fc9850c`](https://github.com/biomejs/biome/commit/fc9850c4858f6d1a9c1314d782fd561a6c2253c3) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#9098](https://github.com/biomejs/biome/issues/9098): `useImportType` no longer incorrectly flags imports used in Svelte control flow blocks (`{#if}`, `{#each}`, `{#await}`, `{#key}`) as type-only imports.
  4. - [#9106](https://github.com/biomejs/biome/pull/9106) [`f4b7296`](https://github.com/biomejs/biome/commit/f4b729679e0ff4452758e026e053bb7b08add4b2) Thanks [@dyc3](https://github.com/dyc3)! - Updated rule source metadata for rules from `html-eslint`.
  5. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noConditionalExpect`](https://biomejs.dev/linter/rules/no-conditional-expect/). This rule disallows conditional `expect()` calls inside tests, which can lead to tests that silently pass when assertions never run.
  6. ```js
  7. // Invalid - conditional expect may not run
  8. test("conditional", async ({ page }) => {
  9. if (someCondition) {
  10. await expect(page).toHaveTitle("Title");
  11. }
  12. });
  13. // Valid - unconditional expect
  14. test("unconditional", async ({ page }) => {
  15. await expect(page).toHaveTitle("Title");
  16. });
  17. ```
  18. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightElementHandle`](https://biomejs.dev/linter/rules/no-playwright-element-handle/). Prefers locators to element handles.
  19. ```js
  20. const el = await page.$(".btn");
  21. ```
  22. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightEval`](https://biomejs.dev/linter/rules/no-playwright-eval/). Disallows `page.$eval()` and `page.$$eval()` methods.
  23. ```js
  24. await page.$eval(".btn", (el) => el.textContent);
  25. ```
  26. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightForceOption`](https://biomejs.dev/linter/rules/no-playwright-force-option/). Disallows the `force` option on user interactions.
  27. ```js
  28. await locator.click({ force: true });
  29. ```
  30. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightMissingAwait`](https://biomejs.dev/linter/rules/no-playwright-missing-await/). Enforces awaiting async Playwright APIs.
  31. ```js
  32. const el = page.locator(".btn");
  33. el.click(); // Missing await
  34. ```
  35. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightNetworkidle`](https://biomejs.dev/linter/rules/no-playwright-networkidle/). Disallows deprecated `networkidle` wait option.
  36. ```js
  37. await page.goto(url, { waitUntil: "networkidle" });
  38. ```
  39. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightPagePause`](https://biomejs.dev/linter/rules/no-playwright-page-pause/). Disallows `page.pause()` debugging calls in committed code.
  40. ```js
  41. await page.pause();
  42. ```
  43. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightUselessAwait`](https://biomejs.dev/linter/rules/no-playwright-useless-await/). Disallows unnecessary `await` on synchronous Playwright methods.
  44. ```js
  45. // Incorrect - locator() is synchronous
  46. const loc = await page.locator(".btn");
  47. ```
  48. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightWaitForNavigation`](https://biomejs.dev/linter/rules/no-playwright-wait-for-navigation/). Prefers modern navigation APIs over deprecated `waitForNavigation()`.
  49. ```js
  50. await page.waitForNavigation();
  51. ```
  52. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightWaitForSelector`](https://biomejs.dev/linter/rules/no-playwright-wait-for-selector/). Prefers locators over deprecated `waitForSelector()`.
  53. ```js
  54. await page.waitForSelector(".btn");
  55. ```
  56. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`noPlaywrightWaitForTimeout`](https://biomejs.dev/linter/rules/no-playwright-wait-for-timeout/). Disallows hard-coded timeouts with `waitForTimeout()`.
  57. ```js
  58. await page.waitForTimeout(5000);
  59. ```
  60. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Enhanced `noSkippedTests` to detect Playwright patterns (`.fixme`, `test.describe`, `test.step`, bracket notation, bare calls). Consolidated `noPlaywrightSkippedTest` into this rule.
  61. - [#9101](https://github.com/biomejs/biome/pull/9101) [`0c0fb6f`](https://github.com/biomejs/biome/commit/0c0fb6fe1b5b2a935cf61101a7bc5323a979dce9) Thanks [@siketyan](https://github.com/siketyan)! - Fixed [`#9080`](https://github.com/biomejs/biome/issues/9080): The `noUnusedVariables` rule no longer reports a top-level `Props` interface or type alias as unused in Astro files.
  62. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`useExpect`](https://biomejs.dev/linter/rules/use-expect/). This rule ensures that test functions contain at least one `expect()` assertion.
  63. ```js
  64. // Invalid - test without assertion
  65. test("no assertion", async ({ page }) => {
  66. await page.goto("/");
  67. });
  68. // Valid - test with assertion
  69. test("has assertion", async ({ page }) => {
  70. await expect(page).toHaveTitle("Title");
  71. });
  72. ```
  73. - [#8960](https://github.com/biomejs/biome/pull/8960) [`4a5ff40`](https://github.com/biomejs/biome/commit/4a5ff4034d8406d7de28aa6ce8095987c3fef547) Thanks [@abossenbroek](https://github.com/abossenbroek)! - Added the nursery rule [`usePlaywrightValidDescribeCallback`](https://biomejs.dev/linter/rules/use-playwright-valid-describe-callback/). Validates that describe callback signatures are not async.
  74. ```js
  75. test.describe("suite", async () => {});
  76. ```
  77. ## What's Changed
  78. * fix(lint): don't report `Props` interface as unused in Astro files by @siketyan in https://github.com/biomejs/biome/pull/9101
  79. * fix(service): parse text expressions in svelte control flow blocks by @dyc3 in https://github.com/biomejs/biome/pull/9103
  80. * feat(migrate): more metadata for rules from `html-eslint` by @dyc3 in https://github.com/biomejs/biome/pull/9106
  81. * feat(lint): add Playwright ESLint rules by @abossenbroek in https://github.com/biomejs/biome/pull/8960
  82. * ci: release by @github-actions[bot] in https://github.com/biomejs/biome/pull/9104
  83. ## New Contributors
  84. * @abossenbroek made their first contribution in https://github.com/biomejs/biome/pull/8960
  85. **Full Changelog**: https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.1...@biomejs/biome@2.4.2

auf github ansehenimported 2026-09-28 über npm