Aquesta és una versió anterior. La versió actual és la 2.6.3. Biome 2.6.3 · Data de publicació:
Fitxers d’instal·lació 2.4.2
| Arquitectura | Tipus | Àmbit | Mida del fitxer | Baixa | SHA256 |
|---|---|---|---|---|---|
| 64 bits | Portable | — | — | github.com | VirusTotal |
| ARM64 | Portable | — | — | github.com | VirusTotal |
L’enllaç i l’SHA256 provenen del manifest comunitari del Gestor de paquets del Windows. Convé comparar el hash del fitxer baixat abans d’executar-lo.
Notes de la versió
2.4.2
Patch Changes
- #9103 fc9850c Thanks @dyc3! - Fixed #9098: useImportType no longer incorrectly flags imports used in Svelte control flow blocks ({#if}, {#each}, {#await}, {#key}) as type-only imports.
- #9106 f4b7296 Thanks @dyc3! - Updated rule source metadata for rules from html-eslint.
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noConditionalExpect. This rule disallows conditional expect() calls inside tests, which can lead to tests that silently pass when assertions never run.
// Invalid - conditional expect may not run
test("conditional", async ({ page }) => {
if (someCondition) {
await expect(page).toHaveTitle("Title");
}
});
// Valid - unconditional expect
test("unconditional", async ({ page }) => {
await expect(page).toHaveTitle("Title");
});
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightElementHandle. Prefers locators to element handles.
const el = await page.$(".btn");
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightEval. Disallows page.$eval() and page.$$eval() methods.
await page.$eval(".btn", (el) => el.textContent);
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightForceOption. Disallows the force option on user interactions.
await locator.click({ force: true });
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightMissingAwait. Enforces awaiting async Playwright APIs.
const el = page.locator(".btn");
el.click(); // Missing await
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightNetworkidle. Disallows deprecated networkidle wait option.
await page.goto(url, { waitUntil: "networkidle" });
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightPagePause. Disallows page.pause() debugging calls in committed code.
await page.pause();
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightUselessAwait. Disallows unnecessary await on synchronous Playwright methods.
// Incorrect - locator() is synchronous
const loc = await page.locator(".btn");
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightWaitForNavigation. Prefers modern navigation APIs over deprecated waitForNavigation().
await page.waitForNavigation();
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightWaitForSelector. Prefers locators over deprecated waitForSelector().
await page.waitForSelector(".btn");
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule noPlaywrightWaitForTimeout. Disallows hard-coded timeouts with waitForTimeout().
await page.waitForTimeout(5000);
- #8960 4a5ff40 Thanks @abossenbroek! - Enhanced noSkippedTests to detect Playwright patterns (.fixme, test.describe, test.step, bracket notation, bare calls). Consolidated noPlaywrightSkippedTest into this rule.
- #9101 0c0fb6f Thanks @siketyan! - Fixed #9080: The noUnusedVariables rule no longer reports a top-level Props interface or type alias as unused in Astro files.
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule useExpect. This rule ensures that test functions contain at least one expect() assertion.
// Invalid - test without assertion
test("no assertion", async ({ page }) => {
await page.goto("/");
});
// Valid - test with assertion
test("has assertion", async ({ page }) => {
await expect(page).toHaveTitle("Title");
});
- #8960 4a5ff40 Thanks @abossenbroek! - Added the nursery rule usePlaywrightValidDescribeCallback. Validates that describe callback signatures are not async.
test.describe("suite", async () => {});
What's Changed
- fix(lint): don't report Props interface as unused in Astro files by @siketyan in #9101
- fix(service): parse text expressions in svelte control flow blocks by @dyc3 in #9103
- feat(migrate): more metadata for rules from html-eslint by @dyc3 in #9106
- feat(lint): add Playwright ESLint rules by @abossenbroek in #8960
- ci: release by @github-actions[bot] in #9104
New Contributors
- @abossenbroek made their first contribution in #8960
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.1...@biomejs/biome@2.4.2https://github.com/biomejs/biome/releases/tag/@biomejs/biome@2.4.2