Toutes les versions depuis 2.4.2
2.4.2
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 () => {});
2.4.3
Patch Changes
-
#9120
aa40fc2Thanks @ematipico! - Fixed #9109, where the GitHub reporter wasn’t correctly enabled whenbiome ciruns on GitHub Actions. -
#9128
8ca3f7fThanks @dyc3! - Fixed #9107: The HTML parser can now correctly parse Astro directives (client/set/class/is/server), which fixes the formatting for Astro directives. -
#9124
f5b0e8dThanks @ematipico! - Fixed #8882 and #9108: The Astro frontmatter lexer now correctly identifies the closing---fence when the frontmatter contains multi-line block comments with quote characters, strings that mix quote types (e.g."it's"), or escaped quote characters (e.g."\"). -
#9142
3ca066bThanks @THernandez03! - Fixed #9141: ThenoUnknownAttributerule no longer reportsclosedbyas an unknown attribute on<dialog>elements. -
#9126
792013eThanks @ematipico! - Added missing Mocha globals to theTestdomain:context,run,setup,specify,suite,suiteSetup,suiteTeardown,teardown,xcontext,xdescribe,xit, andxspecify. These are injected by Mocha’s BDD and TDD interfaces and were previously flagged as undeclared variables in projects using Mocha. -
#8855
6918c9eThanks @ruidosujeira! - Fixed #8840. Now the Biome CSS parser correctly parsesnot + scroll-stateinside@containerqueries. -
#9111
4fb55cfThanks @Jayllyz! - Slightly improved performance ofnoIrregularWhitespaceby adding early return optimization and simplifying character detection logic. -
#8975
086a0c5Thanks @FrankFMY! - Fixed #8478:useDestructuringno longer suggests destructuring when the variable has a type annotation, likeconst foo: string = object.foo.
2.4.4 Latest
Patch Changes
-
#9150
6946835Thanks @dyc3! - Fixed #9138: Astro files containing---in HTML content (e.g.,<h1>---Hi</h1>) are now parsed correctly, both when a frontmatter block is present and when there is no frontmatter at all. -
#9150
aa6f837Thanks @dyc3! - Fixed #9138: The HTML parser incorrectly failing to parse bracket characters ([and]) in text content (e.g.<div>[Foo]</div>). -
#9151
c0d4b0cThanks @dyc3! - Fixed parsing of Svelte directive keywords (use,style) when used as plain text content in HTML/Svelte files. Previously,<p>use JavaScript</p>or<p>style it</p>would incorrectly produce a bogus element instead of proper text content. -
#9162
7f1e060Thanks @dyc3! - Fixed #9161: The Vue parser now correctly handles colon attributes likexlink:hrefandxmlns:xlinkby parsing them as single attributes instead of splitting them into separate tokens. -
#9164
458211bThanks @dyc3! - Fixed #9161: ThenoAssignInExpressionsrule no longer flags assignments in Vue v-on directives (e.g.,@click="counter += 1"). Assignments in event handlers are idiomatic Vue patterns and are now skipped by the rule.
Copyright (c) 2023-present Biome Developers and Contributors.