B

Biome

B
Biome Web v2.5.14

Biome CLI v2.5.14

2.5.14 Patch Changes #9022 0d49e24 Thanks @dyc3! - Added the nursery rule noReturnInFinally. This rule disallows return statements in Promise.prototype.finally() callbacks, including inside nested blocks and conditional branches. Returns in nested functions are ignored by the rule. // Invalid: return in finally callback Promise.resolve(1).finally(() => { return 2 }) // Valid: no return in finally…

B
Biome Web v2.5.13

Biome CLI v2.5.13

2.5.13 Patch Changes #11379 07a0073 Thanks @Netail! - Added the nursery rule useLayeredStyles, which enforces that style rules are defined within a cascade layer and import rules to import its styles into a cascade layer. /* Invalid */ @import 'foo.css'; .my-style { color: red; } /* Valid */ @import 'foo.css' layer(base); @layer base { .my-style { color: red; } } #11667 e997900 Thanks @devtechedge…

B
Biome Web v2.5.12

Biome CLI v2.5.12

2.5.12 Patch Changes #11440 b88f1ea Thanks @Princesseuh! - Fixed Astro attribute expressions rejecting TypeScript and JSX syntax that is accepted in text expressions. <Component icon={<Icon />} count={total as number} onSelect={(e: Event) => e} /> #11440 b88f1ea Thanks @Princesseuh! - Fixed Astro attribute names being split on : and . inside an expression, such as {x && <button x-on:keyup.enter={g…

B
Biome Web v2.5.11

Biome CLI v2.5.11

2.5.11 Patch Changes #11499 9743d0c Thanks @scs0209! - Fixed #11496: useValidAnchor now treats Astro JSX shorthand attributes like <a {href}> as a valid href. #11437 88f805e Thanks @Princesseuh! - Fixed #9944: adjacent elements inside an Astro expression now parse as an implicit fragment instead of raising an error. {options.map(() => <div /> <div /> )} #11437 88f805e Thanks @Princesseuh! - Fixed…

B
Biome Web v2.5.10

Biome CLI v2.5.10

2.5.10 Patch Changes #11403 8f7786f Thanks @Princesseuh! - Fixed Astro rejecting JavaScript comments between attributes. <div /* block comment */ class="something"></div> <Component /* c */ client:load /> #11403 8f7786f Thanks @Princesseuh! - Fixed a bare < in Astro text being treated as the start of a tag, such as <p>5 < 6 and 7 > 6</p>. As in HTML, a < that cannot open a tag is text and needs no…

B
Biome Web v2.5.9

Biome CLI v2.5.9

2.5.9 Patch Changes #11321 41386f3 Thanks @dyc3! - Fixed #11315: The CSS parser now recovers at declaration boundaries after bogus declarations, allowing subsequent valid declarations to be parsed. #11248 57b197e Thanks @yanthomasdev! - Expanded the environment variable metadata used by biome rage to include BIOME_BINARY, BIOME_LOG_FILE, and RUST_BACKTRACE as well as reworded explanations for bett…

B
Biome Web v2.5.8

Biome CLI v2.5.8

2.5.8 Patch Changes #10710 0a0fbc1 Thanks @dyc3! - Added a new nursery rule useReactCompiler, which reports diagnostics from React Compiler lint mode. #11251 ea9dd8a Thanks @dyc3! - Improved performance of noImportCycles. #11247 52b44d6 Thanks @dyc3! - Added the nursery rule noSvelteLegacyConst, which disallows legacy Svelte {@const} tags and recommends declaration tags with $derived(). Invalid: {…

B
Biome Web v2.5.7

Biome CLI v2.5.7

2.5.7 Patch Changes #10822 c171b3b Thanks @pkallos! - Added the option ignoreIfStatements to useNullishCoalescing. Biome now flags if statements that only assign to a nullish variable (such as if (!a) { a = b }) and can rewrite them to ??=. When enabled, Biome ignores those if statements. #11136 e63354c Thanks @AkashNaickar! - Added a new nursery rule noExtendNative, which reports extending the pr…

B
Biome Web v2.5.6

Biome CLI v2.5.6

2.5.6 Patch Changes #11035 0e4b03b Thanks @ematipico! - Fixed a performance regression in noMisusedPromises that caused type inference to run repeatedly while linting a file. #11043 22ec076 Thanks @denbezrukov! - Fixed CSS formatting for multiline function arguments preceded by comments: .example { value: outer( 1, /* comment */ nested( - first, - second - ) + first, + second + ) ); } #11007 c9acb…

B
Biome Web v2.5.5

Biome CLI v2.5.5

2.5.5 Patch Changes #10972 ab8c21b Thanks @ematipico! - Fixed useExhaustiveSwitchCases for unions of bigint literals. The rule now reports missing bigint cases and compares bigint literals by value, including binary, octal, hexadecimal, and separator-containing spellings. For example, this switch now reports the missing 2n case: declare const value: 1n | 2n; switch (value) { case 1n: break; } #109…

B
Biome Web v2.5.4

Biome CLI v2.5.4

2.5.4 Patch Changes #10665 55ff995 Thanks @dyc3! - Improved the performance of the HTML parser slightly in our synthetic benchmarks. #10894 f4fb10e Thanks @ematipico! - Fixed #6392: On-type formatting no longer moves comments before an if statement into its body. #10939 f2799db Thanks @Netail! - Fixed #10930: noLabelWithoutControl now correctly detects text interpolation in Astro, Svelte & Vue as…

B
Biome Web v2.5.3

Biome CLI v2.5.3

2.5.3 Patch Changes #10815 86613d5 Thanks @WaterWhisperer! - Fixed a parser panic reported in #10708: Biome now recovers when unsupported CSS Modules @value rules or scoped @keyframes names end at EOF. #10534 da9b403 Thanks @Mokto! - Fixed noUnusedVariables false positives in Svelte files: Svelte store subscriptions ($store references in templates now keep the underlying store binding from being f…

B
Biome Web v2.5.2

Biome CLI v2.5.2

2.5.2 Patch Changes #10595 f458028 Thanks @pkallos! - Added the option ignoreBooleanCoercion to useNullishCoalescing. When enabled, Biome ignores || and ||= used inside a Boolean() call, where coalescing on falsy values is intentional. #10798 4a32b63 Thanks @pkallos! - Added the option ignorePrimitives to useNullishCoalescing. When enabled, Biome ignores ||, ||=, and ternary expressions whose non-…

B
Biome Web v2.5.1

Biome CLI v2.5.1

2.5.1 Patch Changes #10722 f8a303d Thanks @denbezrukov! - Fixed CSS formatter output for comments between import media queries. -@import url("print.css") print, -/* comment */ -screen; +@import url("print.css") print, /* comment */ screen; #10738 9fdc560 Thanks @JamBalaya56562! - Fixed #9899: the json and json-pretty reporters now escape backslashes in a diagnostic's location.path. Previously, pat…

B
Biome Web v2.5.0

Biome CLI v2.5.0

2.5.0 Minor Changes #9539 f0615fd Thanks @ematipico! - Added a new reporter called concise. When --reporter=concise is passed the commands format, lint, check and ci, the diagnostics are printed in a compact manner: ! index.ts:2:10: lint/correctness/noUnusedImports: Several of these imports are unused. ! main.ts:9:7: lint/correctness/noUnusedVariables: This variable f is unused. × index.ts:8:5: li…

B
Biome Web v6.0.0

JavaScript APIs v6.0.0

6.0.0 Minor Changes #8944 8cd3da1 Thanks @ash1day! - Added a new spanInBytesToSpanInCodeUnits helper function to convert byte-based spans from Biome diagnostics to UTF-16 code unit spans. Biome internally uses UTF-8 byte offsets for spans, but JavaScript strings use UTF-16 code units. This causes incorrect text extraction when using string.slice() with non-ASCII content. The new helper function co…

B
Biome Web v2.4.16

Biome CLI v2.4.16

2.4.16 Patch Changes #10329 ef764d5 Thanks @Conaclos! - Fixed an issue where diagnostics showed an incorrect location in Astro files. #10363 50aa415 Thanks @dyc3! - Fixed HTML formatting for a case where comments could cause the formatter to split up a closing tag, which would cause the resulting HTML to be syntactically invalid. Input: <span ><!-- 1 --><span>a</span ><!-- 2 --><span>b</span ><!--…

B
Biome Web v2.4.15

Biome CLI v2.4.15

2.4.15 Patch Changes #9394 ba3480e Thanks @dyc3! - Added the nursery rule useTestHooksInOrder in the test domain. The rule enforces that Jest/Vitest lifecycle hooks (beforeAll, beforeEach, afterEach, afterAll) are declared in the order they execute, making test setup and teardown easier to reason about. #10254 e0a54cc Thanks @dyc3! - Added a new nursery rule useVueNextTickPromise, which enforces P…

B
Biome Web v2.4.14

Biome CLI v2.4.14

2.4.14 Patch Changes #9393 491b171 Thanks @dyc3! - Added the nursery rule useTestHooksOnTop in the test domain. The rule flags lifecycle hooks (beforeEach, beforeAll, afterEach, afterAll) that appear after test cases in the same block, enforcing that hooks are defined before any test case. #10157 eefc5ab Thanks @dyc3! - Fixed #7882: The HTML parser will now emit better diagnostics when it encounte…

B
Biome Web v2.4.13

Biome CLI v2.4.13

2.4.13 Patch Changes #9969 c5eb92b Thanks @officialasishkumar! - Added the nursery rule noUnnecessaryTemplateExpression, which disallows template literals that only contain string literal expressions. These can be replaced with a simpler string literal. For example, the following code triggers the rule: const a = `${"hello"}`; // can be 'hello' const b = `${"prefix"}_suffix`; // can be 'prefix_suf…

B
Biome Web v2.4.12

Biome CLI v2.4.12

2.4.12 Patch Changes #9376 9701a33 Thanks @dyc3! - Added the nursery/noIdenticalTestTitle lint rule. This rule disallows using the same title for two describe blocks or two test cases at the same nesting level. describe("foo", () => {}); describe("foo", () => { // invalid: same title as previous describe block test("baz", () => {}); test("baz", () => {}); // invalid: same title as previous test ca…

B
Biome Web v2.4.11

Biome CLI v2.4.11

2.4.11 Patch Changes #9350 4af4a3a Thanks @dyc3! - Added the new nursery rule useConsistentTestIt in the test domain. The rule enforces consistent use of either it or test for test functions in Jest/Vitest suites, with separate control for top-level tests and tests inside describe blocks. Invalid: test("should fly", () => {}); // Top-level test using 'test' flagged, convert to 'it' describe("pig",…