Version History
Version 2.4.2 Latest
Patch Changes
-
#9103
fc9850cThanks @dyc3! - Fixed #9098:useImportTypeno longer incorrectly flags imports used in Svelte control flow blocks ({#if},{#each},{#await},{#key}) as type-only imports. -
#9106
f4b7296Thanks @dyc3! - Updated rule source metadata for rules fromhtml-eslint. -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoConditionalExpect. This rule disallows conditionalexpect()calls inside tests, which can lead to tests that silently pass when assertions never run.// Invalid - conditional expect may not runtest("conditional", async ({ page }) => {if (someCondition) {await expect(page).toHaveTitle("Title");}});// Valid - unconditional expecttest("unconditional", async ({ page }) => {await expect(page).toHaveTitle("Title");}); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightElementHandle. Prefers locators to element handles.const el = await page.$(".btn"); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightEval. Disallowspage.$eval()andpage.$$eval()methods.await page.$eval(".btn", (el) => el.textContent); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightForceOption. Disallows theforceoption on user interactions.await locator.click({ force: true }); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightMissingAwait. Enforces awaiting async Playwright APIs.const el = page.locator(".btn");el.click(); // Missing await -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightNetworkidle. Disallows deprecatednetworkidlewait option.await page.goto(url, { waitUntil: "networkidle" }); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightPagePause. Disallowspage.pause()debugging calls in committed code.await page.pause(); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightUselessAwait. Disallows unnecessaryawaiton synchronous Playwright methods.// Incorrect - locator() is synchronousconst loc = await page.locator(".btn"); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightWaitForNavigation. Prefers modern navigation APIs over deprecatedwaitForNavigation().await page.waitForNavigation(); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightWaitForSelector. Prefers locators over deprecatedwaitForSelector().await page.waitForSelector(".btn"); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightWaitForTimeout. Disallows hard-coded timeouts withwaitForTimeout().await page.waitForTimeout(5000); -
#8960
4a5ff40Thanks @abossenbroek! - EnhancednoSkippedTeststo detect Playwright patterns (.fixme,test.describe,test.step, bracket notation, bare calls). ConsolidatednoPlaywrightSkippedTestinto this rule. -
#9101
0c0fb6fThanks @siketyan! - Fixed#9080: ThenoUnusedVariablesrule no longer reports a top-levelPropsinterface or type alias as unused in Astro files. -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery ruleuseExpect. This rule ensures that test functions contain at least oneexpect()assertion.// Invalid - test without assertiontest("no assertion", async ({ page }) => {await page.goto("/");});// Valid - test with assertiontest("has assertion", async ({ page }) => {await expect(page).toHaveTitle("Title");}); -
#8960
4a5ff40Thanks @abossenbroek! - Added the nursery ruleusePlaywrightValidDescribeCallback. Validates that describe callback signatures are not async.test.describe("suite", async () => {});
Copyright (c) 2023-present Biome Developers and Contributors.