Releases: biomejs/biome
Biome CLI v2.4.10
2.4.10
Patch Changes
-
#8838
f3a6a6bThanks @baeseokjae! - Added new lint nursery rulenoImpliedEval.The rule detects implied
eval()usage through functions likesetTimeout,setInterval, andsetImmediatewhen called with string arguments.// Invalid setTimeout("alert('Hello');", 100); // Valid setTimeout(() => alert("Hello"), 100);
-
#9320
93c3b6cThanks @taberoajorge! - Fixed #7664:noUnusedVariablesno longer reports false positives for TypeScript namespace declarations that participate in declaration merging with an exported or used value declaration (const,function, orclass) of the same name. The reverse direction is also handled: a value declaration merged with an exported namespace is no longer flagged. -
#9630
1dd4a56Thanks @raashish1601! - Fixed #9629:noNegationElsenow keeps ternary branch comments attached to the correct branch when applying its fixer. -
#9216
04243b0Thanks @FrederickStempfle! - Fixed #9061:noProcessEnvnow also detectsprocess.envwhenprocessis imported from the"process"or"node:process"modules.Previously, only the global
processobject was flagged:import process from "node:process"; // This was not flagged, but now it is: console.log(process.env.NODE_ENV);
-
#9692
61b7ec5Thanks @mkosei! - Fixed Svelte#eachdestructuring parsing and formatting for nested patterns such as[key, { a, b }]. -
#9627
06a0f35Thanks @ematipico! - Fixed #191: Improved the performance of how the Biome Language Server pulls code actions and diagnostics.Before, code actions were pulled and computed all at once in one request. This approach couldn't work in big files, and caused Biome to stale and have CPU usage spikes up to 100%.
Now, code actions are pulled and computed lazily, and Biome won't choke anymore in big files.
-
#9643
5bfee36Thanks @dyc3! - Fixed #9347:useVueValidVBindno longer reports valid object bindings likev-bind="props". -
#9627
06a0f35Thanks @ematipico! - Fixed assist diagnostics being invisible when using--diagnostic-level=error. Enforced assist violations (e.g.useSortedKeys) were filtered out before being promoted to errors, causingbiome checkto incorrectly return success. -
#9695
9856a87Thanks @dyc3! - Added the new nursery rulenoUnsafePlusOperands, which reports+and+=operations that use object-like,symbol,unknown, orneveroperands, or that mixnumberwithbigint. -
#9627
06a0f35Thanks @ematipico! - Fixed duplicate parse errors incheckandcioutput. When a file had syntax errors, the same parse error was printed twice and the error count was inflated. -
#9627
06a0f35Thanks @ematipico! - Improved the performance of the commandslintandcheckwhen they are called with--write. -
#9627
06a0f35Thanks @ematipico! - Fixed--diagnostic-levelnot fully filtering diagnostics. Setting--diagnostic-level=errornow correctly excludes warnings and infos from both the output and the summary counts. -
#9623
13b3261Thanks @ematipico! - Fixed #9258:--skipno longer causessuppressions/unusedwarnings for suppression comments targeting skipped rules or domains. -
#9631
599dd04Thanks @raashish1601! - Fixed #9625:experimentalEmbeddedSnippetsEnabledno longer crashes when a file mixes formatable CSS-in-JS templates with tagged templates that the embedded formatter can't currently delegate, such as a styled-components interpolation returning `css```.
What's Changed
- feat(linter): add
noImpliedEvalrule by @baeseokjae in #8838 - fix(linter): detect process.env when process is imported from module by @FrederickStempfle in #9216
- fix(cli): skip with domains should not report by @ematipico in #9623
- fix: avoid unresolved embedded CSS tag ranges by @raashish1601 in #9631
- chore(deps): update dependency happy-dom to v20.8.8 [security] by @renovate[bot] in #9628
- fix(cli): improve code actions filtering by @ematipico in #9627
- fix(lint): preserve ternary branch comments in noNegationElse by @raashish1601 in #9630
- fix(markdown-parser): incorrect inline link R_PAREN token range by @jfmcdowell in #9642
- fix(useVueValidVBind): don't flag missing arguments by @dyc3 in #9643
- chore(deps): update rust crate terminal_size to 0.4.4 by @raashish1601 in #9646
- test(markdown-parser): add criterion benchmarks and CI workflow by @jfmcdowell in #9657
- chore(deps): update dependency happy-dom to v20.8.9 [security] by @renovate[bot] in #9694
- chore(Cargo.toml): clean up, compile insta in opt-level=3 by @Conaclos in #9698
- fix(lint): handle namespace declaration merging in noUnusedVariables by @taberoajorge in #9320
- feat(md/fmt): links, codeblocks by @ematipico in #9699
- fix(html): support nested svelte each destructuring by @mkosei in #9692
- feat(lint/js): add
noUnsafePlusOperandsby @dyc3 in #9695 - chore(deps): update rust crate papaya to 0.2.4 by @renovate[bot] in #9707
- chore(deps): update rust crate rustc-hash to 2.1.2 by @renovate[bot] in #9710
- chore(deps): update rust crate boa_engine to 0.21.1 by @renovate[bot] in #9706
- chore(deps): update dependency tombi to v0.9.8 by @renovate[bot] in #9705
- chore(deps): update dependency rust to v1.94.1 by @renovate[bot] in #9704
- chore(deps): update dependency dprint to v0.53.1 by @renovate[bot] in #9703
- chore(deps): update rust crate quickcheck_macros to 1.2.0 by @renovate[bot] in #9601
- chore: update sponsors by @ematipico in #9714
- ci: release by @github-actions[bot] in #9622
New Contributors
- @raashish1601 made their first contribution in #9631
- @taberoajorge made their first contribution in #9320
- @mkosei made their first contribution in #9692
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.9...@biomejs/biome@2.4.10
Biome CLI v2.4.9
2.4.9
Patch Changes
-
#9315
085d324Thanks @ematipico! - Added a new nursery CSS rulenoDuplicateSelectors, that disallows duplicate selector lists within the same at-rule context.For example, the following snippet triggers the rule because the second selector and the first selector are the same:
/* First selector */ .x .y .z { } /* Second selector */ .x { .y { .z { } } }
-
#9567
b7ab931Thanks @ematipico! - Fixed #7211:useOptionalChainnow detects negated logical OR chains. The following code is now considered invalid:!foo || !foo.bar;
-
#8670
607ebf9Thanks @tt-a1i! - Fixed #8345:useAdjacentOverloadSignaturesno longer reports false positives for static and instance methods with the same name. Static methods and instance methods are now treated as separate overload groups.class Kek { static kek(): number { return 0; } another(): string { return ""; } kek(): number { return 1; } // no longer reported as non-adjacent }
-
#9476
97b80a8Thanks @masterkain! - Fixed#9475: Fixed a panic when Biome analyzed ambient TypeScript modules containing class constructor, getter, or setter signatures that reference local type aliases. Biome now handles these declarations without crashing during semantic analysis. -
#9553
0cd5298Thanks @dyc3! - Fixed a bug where enabling the rules of a whole group, would enable rules that belonged to a domain under the same group.For example,
linter.rules.correctness = "error"no longer enables React- or Qwik-specific correctness rules unlesslinter.domains.react,linter.domains.qwik, or an explicit rule config also enables them, or their relative dependencies are installed. -
#9586
4cafb71Thanks @dyc3! - Fixed #8828: Grit patterns usingexport { $foo } from $sourcenow match named re-exports in JavaScript and TypeScript files. -
#9550
d4e3d6eThanks @dyc3! - Fixed #9548: Biome now parses conditional expressions whose consequent is an arrow function returning a parenthesized object expression. -
#8696
a7c19ccThanks @Faizanq! - Fixed #8685 wherenoUselessLoneBlockStatementswould remove empty blocks containing comments. The rule now preserves these blocks since comments may contain important information like TODOs or commented-out code. -
#9557
6671ac5Thanks @datalek! - Fixed #9557: Biome's LSP server no longer crashes on startup when used with editors that don't sendworkspaceFoldersduring initialization. This affected any LSP client that only sendsrootUri, which is valid per the LSP specification. -
#9455
1710cf1Thanks @omar-y-abdi! - Fixed #9174:useExpectnow correctly rejects asymmetric matchers in Vitest or Jest likeexpect.stringContaining(),expect.objectContaining(), and utilities likeexpect.extend()that are not valid assertions. Previously these constructs caused false negatives, allowing tests without real assertions to pass the lint rule. -
#9584
956e367Thanks @ematipico! - Fixed a bug where Vue directive attribute values likev-bind:class="{'dynamic': true}"were incorrectly parsed as JavaScript statements instead of expressions. Object literals inside directive values like:class,v-if, andv-htmlare now correctly parsed as expressions, preventing spurious parse errors. -
#9474
e168494Thanks @ematipico! - Added the new nursery rulenoUntrustedLicenses. This rule disallows dependencies that ship with invalid licenses or licenses that don't meet the criteria of your project/organisation.The rule has the following options:
allow: a list of licenses that can be allowed. Useful to bypass possible invalid licenses from downstream dependencies.deny: a list of licenses that should trigger the rule. Useful to deny licenses that don't fit your project/organisation.
When bothdenyandalloware provided,denytakes precedence.requireOsiApproved: whether the licenses need to be approved by the Open Source Initiative.requireFsfLibre: whether the licenses need to be approved by the Free Software Foundation.
-
#9544
723798bThanks @ViniciusDev26! - Added an unsafe fix touseConsistentMethodSignaturesthat automatically converts between method-style and property-style signatures. -
#9555
8a3647bThanks @ematipico! - Fixed#188: the Biome Language Server no longer panics when open files change abruptly, such as during git branch checkouts. -
#9605
f65c637Thanks @ematipico! - Fixed #9589. Now Biome correctly parses object expressions inside props and directives. The following code doesn't emit errors anymore:<style is:global define:vars={{ bgLight: light }}> <Component name={{ first, name }} />
-
#9565
ccb249eThanks @eyupcanakman! - Fixed #9505:noUselessStringConcatno longer reports tagged template literals as useless string concatenations. Tagged templates invoke a function and can return non-string values, so combining them with+is not equivalent to a single template literal. -
#9534
4d050dfThanks @Netail! - Added the nursery rulenoInlineStyles. The rule disallows the use of inlinestyleattributes in HTML and thestyleprop in JSX, includingReact.createElementcalls. Inline styles make code harder to maintain and can interfere with Content Security Policy. -
#9611
cddaa44Thanks @gaauwe! - Fixed a regression where Biome LSP could misread editor settings sent throughworkspace/didChangeConfigurationwhen the payload was wrapped in a top-levelbiomekey. This causedrequireConfigurationand related settings to be ignored in some editors.
What's Changed
Biome CLI v2.4.8
2.4.8
Patch Changes
-
#9488
bc709f6Thanks @mvanhorn! - Fixed #9463: the "Biome found a configuration file outside of the current working directory" diagnostic now includes the configuration file path and the working directory, giving users actionable information to debug the issue. -
#9527
2f8bf80Thanks @mdm317! - Fixed #8959: Fixed TypeScript arrow function formatting when a comment appears after=>. -
#9525
e7b3b10Thanks @ViniciusDev26! - Added the rulenoDrizzleUpdateWithoutWhereto prevent accidental full-table updates when using Drizzle ORM without a.where()clause. -
#9531
1302740Thanks @ematipico! - Fixed #9187: Astro frontmatter containing regex literals with quotes (/'/,/"/) or dashes (/---/) no longer causes parse errors. -
#9535
b630d93Thanks @leno23! - Fixed #9524: remove extra space before>whenbracketSameLineis true and the self-closing slash is absent in HTML formatter. -
#9537
81e6306Thanks @ematipico! - Fixed #9238: The HTML parser no longer incorrectly reports---inside element content (e.g.<td>---</td>) as an "Unexpected value or character" error. -
#9532
4b64145Thanks @ematipico! - Fixed #9117:biome check --writeno longer falsely reports Svelte and Vue files as changed whenhtml.formatter.indentScriptAndStyleis enabled and the files are already correctly formatted. -
#9528
61451efThanks @ematipico! - Fixed #9341: Fixed an LSP crash that could corrupt file content when saving with format-on-save enabled. -
#9538
794f79cThanks @ematipico! - Fixed #9279: The rulenoSubstrnow detects.substr()and.substring()calls in all expression contexts, including variable declarations, function arguments, return statements, and arrow function bodies. -
#9462
c23272cThanks @ematipico! - Fixed #9370: The resolver now correctly prioritizes more specificexportspatterns over less specific ones. Previously, a pattern like"./*"could match before"./features/*", causing resolution failures for packages with overlapping subpath patterns. -
#9515
f85c069Thanks @shivamtiwari3! - Fixed #9506 and #9479: Biome no longer reports false parse errors on<script type="speculationrules">and<script type="application/ld+json">tags. These script types contain non-JavaScript content and are now correctly skipped by the embedded language detector. -
#9514
7fe43c8Thanks @ematipico! - Fixed #6964: Biome now correctly resolves the.gitignorefile relative tovcs.rootwhen configured. Previously, thevcs.rootsetting was ignored and Biome always looked for the ignore file in the workspace directory. -
#9521
af39936Thanks @ematipico! - Fixed #9483. Now the rulenoRedeclaredoesn't panic when it encounters constructor overloads. -
#9490
60cf024Thanks @willfarrell! - Added support for modern CSS properties, pseudo-classes, and pseudo-elements.New known properties:
dynamic-range-limit,overlay,reading-flow,reading-order,scroll-marker-group,scroll-target-group.New pseudo-elements:
::checkmark,::column,::picker,::picker-icon,::scroll-button,::scroll-marker,::scroll-marker-group.New pseudo-classes:
:active-view-transition-type,:has-slotted,:target-after,:target-before,:target-current. -
#9526
4d42823Thanks @ematipico! - Fixed #9358 and #9375. Now attributes that have text expressions such asclass={buttonClass()}are correctly tracked in Svelte files. -
#9520
61f53eeThanks @ematipico! - Fixed #9519. NownoUnusedVariablesdoesn't flag variables that are used astypeoftype. -
#9487
331dc0dThanks @mvanhorn! - Fixed #9477:source.fixAll.biomeno longer sorts imports whensource.organizeImports.biomeis disabled in editor settings. The organize imports action is now excluded from the fix-all pass unless explicitly requested. -
#9525
e7b3b10Thanks @ViniciusDev26! - Added the rulenoDrizzleDeleteWithoutWhereto prevent accidental full-table deletes when using Drizzle ORM without a.where()clause.
What's Changed
- fix(formatter/md): fix formatting for MdHardLine by @tidefield in #9480
- chore(deps): update rust:1.94.0-bookworm docker digest to 6a544e5 by @renovate[bot] in #9493
- chore(deps): update rust:1.94.0-bullseye docker digest to 9d1864f by @renovate[bot] in #9494
- chore(deps): update rust crate tracing-subscriber to 0.3.23 by @renovate[bot] in #9498
- chore(benchmark): upgrade to Debian 13 Trixie, Node.js 24 by @siketyan in #9499
- fix: missing rule source reference by @Netail in #9504
- chore: manually import dev dependencies by @ematipico in #9512
- test: infrastructure for embedded langauges by @ematipico in #9509
- feat(css): parse scss interpolated selector names by @denbezrukov in #9486
- feat(css): add support for modern CSS properties, pseudo-classes, and pseudo-elements by @willfarrell in #9490
- fix(html): skip unsupported <script> types instead of treating as JS (fixes #9506, #9479) by @shivamtiwari3 in #9515
- fix(semantic): regression in tracking scopes by @ematipico in #9521
- fix(noUnusedVariables): regression in previous refactor by @ematipico in #9520
- fix(diagnostic): include config path and CWD in ConfigurationOutsideProject by @mvanhorn in #9488
- fix(lsp): changes file corruption by @ematipico in #9528
- fix(embeds): track attributes text expressions by @ematipico in #9526
- fix(core): idempotence formatting html-ish files by @ematipico in https://github.com/bi...
Biome CLI v2.4.7
2.4.7
Patch Changes
-
#9318
3ac98ebThanks @ematipico! - Added new nursery lint ruleuseBaselinefor CSS. The rule reports when CSS properties, property values, at-rules, media conditions, functions, or pseudo-selectors are not part of the configured Baseline tier.For example, at the time of writing, the rule will trigger for the use of
accent-colorbecause it has limited availability:a { accent-color: bar; }
-
#9272
2de8362Thanks @terror! - Added the nursery ruleuseImportsFirstthat enforces all import statements appear before any non-import statements in a module. Inspired by the eslint-plugin-importimport/firstrule.// Invalid import { foo } from "foo"; const bar = 1; import { baz } from "baz"; // ← flagged // Valid import { foo } from "foo"; import { baz } from "baz"; const bar = 1;
-
#9285
93ea495Thanks @dyc3! - FixednoUndeclaredVariablesfrom erroneously flagging props only used in the template section in Vue SFCs -
#9435
6c5a8f2Thanks @siketyan! - Fixed #9432: Values referenced as a JSX element in Astro/Vue/Svelte templates are now correctly detected;noUnusedImportsanduseImportTyperules no longer reports these values as false positives. -
#9362
fc9ca4cThanks @Netail! - Extra rule source references.biome migrate eslintshould do a bit better detecting rules in your eslint configurations. -
#9392
b881feaThanks @g-ortuno! - Fixed biomejs/biome-vscode#959: LSP now correctly resolves project directory whenconfigurationPathpoints to a configuration file outside the workspace. -
#9420
a1c46afThanks @ematipico! - Fixed #9385:noUselessEscapeInStringno longer incorrectly flags valid CSS hex escapes (e.g.\e7bb) as useless. The rule now recognizes all hex digits (0-9,a-f,A-F) as valid escape characters in CSS strings. -
#9416
f2581b8Thanks @ematipico! - Fixed #9131, #9112, #9166: the formatter no longer crashes or produces corrupt output when a JS file withexperimentalEmbeddedSnippetsEnabledcontains non-embedded template literals alongside embedded ones (e.g.console.log(\test`)next tographql(`...`)`). -
#9344
cb4d7d7Thanks @ematipico! - Fixed #6921:noShadowno longer incorrectly flags destructured variable bindings in sibling scopes as shadowing. Object destructuring, array destructuring, nested patterns, and rest elements are now properly recognized as declarations. -
#9360
bc5dd99Thanks @ematipico! - Fixed #7125: The rulenoShadowno longer incorrectly flags parameters in TypeScript constructor and method overload signatures. -
#9371
29cac17Thanks @ematipico! - Fixed #5279: Tabs in diagnostic diff output are now rendered at a consistent width across context and changed lines, fixing visual misalignment when source files use tab indentation. -
#9043
61e2a02Thanks @dyc3! - Fixed #8897: Biome now parses@utilitynames containing/when Tailwind directives are enabled. -
#9354
930c858Thanks @denbezrukov! - Improved CSS parser recovery for invalidunicode-rangevalues that mix wildcard ranges with range intervals. For example, Biome now reports clearer diagnostics for invalid syntax like:unicode-range: U+11???-2??; unicode-range: U+11???-;
with diagnostics such as:
× Wildcard ranges cannot be combined with a range interval. > unicode-range: U+11???-2??; ^ × Expected a codepoint but instead found ';'. > unicode-range: U+11???-; ^ -
#9355
78e74a2Thanks @SchahinRohani! - Fixed #9349: Biome now correctly handles Vue dynamic:altandv-bind:altbindings inuseAltText, preventing false positives in.vuefiles. -
#9369
b309ddeThanks @costajohnt! - Fixed #9210:useAnchorContentno longer reports an accessibility error for AstroImagecomponents inside links when they provide non-emptyalttext. -
#9345
70c2d4eThanks @ematipico! - Fixed #7214:useOptionalChainnow detects optional chain patterns that don't start at the beginning of a logical AND expression. For example,bar && foo && foo.lengthis now correctly flagged and fixed tobar && foo?.length. -
#9311
78c4e9bThanks @ruidosujeira! - Fixed #9245: theuseSemanticElementsrule no longer suggests<output>forrole="status"androle="alert". The<output>element is only arelatedConceptof these roles, not a direct semantic equivalent. These roles are now excluded from suggestions, aligning with the intended behavior of the upstreamprefer-tag-over-rolerule. -
#9363
b2ffb4aThanks @ematipico! - Fixed #5212:useSemanticElementsno longer reports a diagnostic when a semantic element already has its corresponding role attribute (e.g.<nav role="navigation">,<footer role="contentinfo">). These cases are now correctly left tonoRedundantRoles. -
#9364
1bb9edcThanks @xvchris! - Fixed #9357. Improved the information emitted by some diagnostics. -
#9434
bf12092Thanks @siketyan! - Fixed #9433:noBlankTargetnow correctly handles dynamic href attributes, such as<a href={company?.website} target="_blank">. -
#9351 [
5046d2b]...
Biome CLI v2.4.6
2.4.6
Patch Changes
-
#9305
40869b5Thanks @ematipico! - Fixed #4946:noUnreachableno longer reports code insidefinallyblocks as unreachable when there is abreak,continue, orreturnin the correspondingtrybody. -
#9303
464910cThanks @ematipico! - Fixed #2786: The formatter no longer produces different output on subsequent runs when acaseclause has a trailing line comment followed by a single block statement. -
#9324
6294aa2Thanks @arendjr! - Fixed#7730:useAnchorContentnow recognises SolidJS'sinnerHTMLthe same way as React'sdangerouslySetInnerHTML. -
#9298
1003229Thanks @Netail! - Fixed#9296, so comments are moved along with the attributes in the useSortedAttributes assist rule code fix. -
#9329
855b451Thanks @dyc3! - Improved performance ofnoEmptyBlockStatements. The rule is now smarter about short-circuiting its logic. -
#9326
85dfe9bThanks @dyc3! - Improved performance fornoImportCyclesby explicitly excluding node_modules from the cycle detection. The performance improvement is directly proportional to how big your dependency tree is. -
#9323
d5ee469Thanks @ematipico! - Fixed #9217 and biomejs/biome-vscode#959, where the Biome language server didn't correctly resolve the editor settingconfigurationPathwhen the provided value is a relative path. -
#9302
86fbc70Thanks @sepagian! - Fixed #9300: Lowercase component member expressions like<form.Field>in Svelte and Astro files are now correctly formatted.-<form .Field></form.Field> +<form.Field></form.Field>
What's Changed
- fix(js_analyze): move comments with useSortedAttributes action by @Netail in #9298
- fix(formatter): switch case comments by @ematipico in #9303
- refactor(markdown-parser): promote list structural tokens from skipped trivia to explicit CST nodes by @jfmcdowell in #9274
- fix(noUnreachable): handle dead implicit jumps in finally by @ematipico in #9305
- refactor(markdown-parser): align newline/prescan paragraph-break checks by @jfmcdowell in #9197
- refactor(markdown-parser): promote blank lines between list items to MdNewline nodes by @jfmcdowell in #9313
- fix(linter): support SolidJS's
innerHTMLinuseAnchorContentby @arendjr in #9324 - fix(lsp): correctly resolve
configurationPathby @ematipico in #9323 - perf(noImportCycles): exclude
node_modulesfrom cycle detection by @dyc3 in #9326 - refactor(css_parser): split function parser into modules by @denbezrukov in #9325
- refactor(markdown-parser): promote fenced code block skipped trivia to explicit CST nodes by @jfmcdowell in #9321
- refactor(css): rename operator_token field to operator by @denbezrukov in #9327
- perf: add
.skip(1)to.ancestors()calls in a bunch of places by @dyc3 in #9330 - perf(noEmptyBlockStatements): short circuit to avoid traversing descendants for comments by @dyc3 in #9329
- fix: lowercase component member expressions in Astro/Svelte by @sepagian in #9302
- chore: align parser options struct name by @Netail in #9332
- feat(css): use ScssExpression in ScssNestingDeclaration and CssGenericProperty by @denbezrukov in #9328
- refactor(css): align scss expression node variants by @denbezrukov in #9340
- feat(css): use expression in page by @denbezrukov in #9342
- ci: release by @github-actions[bot] in #9301
New Contributors
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.5...@biomejs/biome@2.4.6
Biome CLI v2.4.5
2.4.5
Patch Changes
-
#9185
e43e730Thanks @dyc3! - Added the nursery ruleuseVueScopedStylesfor Vue SFCs. This rule enforces that<style>blocks have thescopedattribute (ormodulefor CSS Modules), preventing style leakage and conflicts between components. -
#9184
49c8fdeThanks @chocky335! - Improved plugin performance by batching all plugins into a single syntax visitor with a kind-to-plugin lookup map, reducing per-node dispatch overhead from O(N) to O(1) where N is the number of plugins. -
#9283
071c700Thanks @dyc3! - FixednoUndeclaredVariableserroneously flagging functions and variables defined in the<script setup>section of Vue SFCs. -
#9221
4612133Thanks @ematipico! - Fixed an issue where the JSON reporter didn't contain the duration of the command. -
#9294
1805c8fThanks @Netail! - Extra rule source reference.biome migrate eslintshould do a bit better detecting rules in your eslint configurations. -
#9178
101b3bbThanks @Bertie690! - Fixed #9172 and #9168:
Biome now considers more constructs as valid test assertions.Previously,
assert,expectTypeOfandassertType
were not recognized as valid assertions by Biome's linting rules, producing false positives inlint/nursery/useExpectand other similar rules.Now, these rules will no longer produce errors in test cases that used these constructs instead of
expect:import { expectTypeOf, assert, assertType } from "vitest"; const myStr = "Hello from vitest!"; it("should be a string", () => { expectTypeOf(myStr).toBeString(); }); test("should still be a string", () => { assertType<string>(myStr); }); it.todo("should still still be a string", () => { assert(typeof myStr === "string"); });
-
#9173
32dad2dThanks @dyc3! - Added parsing support for Svelte's new comments-in-tags feature.The HTML parser will now accept JS style comments in tags in Svelte files.
<button // single-line comment onclick={doTheThing} >click me</button> <div /* block comment */ class="foo" >text</div>
-
#8952
1d2ca15Thanks @pkallos! - Added the nursery ruleuseNullishCoalescing. This rule suggests using the nullish coalescing operator (??) instead of logical OR (||) when the left operand may be nullish. This prevents bugs where falsy values like0,'', orfalseare incorrectly treated as missing. Addresses #8043// Invalid declare const x: string | null; const value = x || "default"; // Valid const value = x ?? "default";
-
#9243
1992a85Thanks @Netail! - Fixed #7813: improved the diagnostic of the ruleuseExhaustiveDependencies. The diagnostic now shows the name of the variable to add to the dependency array. -
#9063
3d0648fThanks @taga3s! - Added the nursery rulenoVueRefAsOperand. This rule disallows cases where a ref is used as an operand.The following code is now flagged:
import { ref } from "vue"; const count = ref(0); count++; // Should be: count.value++
import { ref } from "vue"; const ok = ref(false); if (ok) { // Should be: if (ok.value) // }
-
#9273
f239e20Thanks @denbezrukov! - Fixed #9253: parsing of@container scroll-state(...)queries.@container scroll-state(scrolled: bottom) { } @container scroll-state(stuck) { } @container scroll-state(not (stuck)) { } @container scroll-state((stuck) and (scrolled: bottom)) { } @container scroll-state((stuck) or (snapped: x)) { } @container main-layout scroll-state(not ((stuck) and (scrolled: bottom))) { }
-
#9259
96939c0Thanks @ematipico! - Fixed CSS formatter incorrectly collapsing selectors when a BOM (Byte Order Mark) character is present at the start of the file. The formatter now correctly preserves line breaks between comments and selectors in BOM-prefixed CSS files, matching Prettier's behavior. -
#9251
59e33fbThanks @ematipico! - Fixed #9249: The CSS formatter no longer incorrectly breaks ratio values (like1 / -1) across lines when followed by comments. -
#9284
ec3a17fThanks @denbezrukov! - Fixed #9253: removed false-positive diagnostics for valid@container/@supportsgeneral-enclosed queries.@container scroll-state(scrolled: bottom) { } @supports foo(bar: baz) { }
-
#9215
b2619a1Thanks @FrederickStempfle! - Fixed #9189:biome ciin GitHub Actions now correctly disables colors so that::error/::warningworkflow commands are not wrapped in ANSI escape codes. -
#9256
65ae4c1Thanks @ematipico! - Fixed JSON reporter escaping of special characters in diagnostic messages. The JSON reporter now properly escapes double quotes, backslashes, and control characters in error messages and advice text, preventing invalid JSON output when diagnostics contain these characters. -
#9223
5b9da81Thanks @ematipico! - Fixed an issue where the JSON reporter didn't write output to a file when--reporter-filewas specified. The output is now correctly written to the specified file instead of always going to stdout. -
#9154
c487e54Thanks @abossenbroek! - Fixed #9115: ThenoPlaywrightMissingAwaitrule no longer produces false positives on jest-dom matchers liketoBeVisible,toBeChecked,toHaveAttribute, etc. For matchers shared between Playwright and jest-dom, the rule now checks whetherexpect()'s argument is a Playwright locator or page object before flagging. Added semantic variable resolution so that extracted Playwright locators (e.g.const loc = page.locator('.item'); expect(loc).toBeVisible()) are still correctly flagged. -
#9269
33e5cdfThanks @dyc3! - Fixed a false positive wherenoUndeclaredVariablesreported bindings from Vue<script setup>as undeclared when used in<template>.This change ensures embedded bindings collected from script snippets (like imports and
defineModelresults...
Biome CLI v2.4.4
2.4.4
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.
What's Changed
- chore(scss): cherry-picks by @denbezrukov in #9149
- fix(parse/html): don't lex square brackets as special tokens in contexts where they don't mean anything by @dyc3 in #9150
- refactor(parse/html): use token_set! instead of matches! for svelte keywords and directives helpers by @dyc3 in #9148
- fix(parse/html): don't lex "use" as
USE_KWwhen in html text content by @dyc3 in #9151 - feat(css): enhance SCSS qualified name detection by @denbezrukov in #9159
- chore(html): more html benchmarks by @dyc3 in #8153
- fix(parse/html/vue): don't treat
:as special token outside of vue directives by @dyc3 in #9162 - feat(lint/vue): automatically ignore
noAssignInExpressionsfor vue v-on directives by @dyc3 in #9164 - ci: release by @github-actions[bot] in #9160
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.3...@biomejs/biome@2.4.4
Biome CLI v2.4.3
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.
What's Changed
- perf(lint): optimize noIrregularWhitespace rule by @Jayllyz in #9111
- fix(cli): use github reporter in github actions env by @ematipico in #9120
- fix: add more globals for mocha by @ematipico in #9126
- fix(parse/html): astro fence by @ematipico in #9124
- fix(linter): skip useDestructuring for variables with type annotations by @FrankFMY in #8975
- fix(parser): accept scroll-state(...) in @container not queries by @ruidosujeira in #8855
- fix(noUnknownAttribute): add
closedbyas a valid attribute for<dialog>by @THernandez03 in #9142 - feat(parse/html): parse astro directives by @dyc3 in #9128
- ci: release by @github-actions[bot] in #9116
New Contributors
- @THernandez03 made their first contribution in #9142
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.2...@biomejs/biome@2.4.3
Biome CLI v2.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 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
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 synchronous const 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 assertion test("no assertion", async ({ page }) => { await page.goto("/"); }); // Valid - test with assertion test("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 () => {});
What's Changed
- fix(lint): don't report
Propsinterface 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-eslintby @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.2
Biome CLI v2.4.1
2.4.1
Patch Changes
-
#9092
6edd600Thanks @ematipico! - Fixed #9052. This PR reverts changes introduced by #8519, which caused unwanted changes on how paths are resolved. -
#9091
3bf674dThanks @ematipico! - Fixed #9090, where SCSS files were incorrectly processed by Biome. This was a regressions caused by the latest developments for supporting SCSS out of the box. -
#9100
66931a8Thanks @siketyan! - Fixed #9081: ThenoUnknownPseudoElementrule no longer reports false positives for any known pseudo elements in CSS modules. This was a regression introduced in v2.4.0. -
#9102
d01b903Thanks @ematipico! - Fixed #9095, where Biome didn't print anything in stdin mode. This was a regression caused by a recent, internal refactor.
What's Changed
- chore: docs that break website by @ematipico in #9077
- chore(deps): update dependency @types/node to v24.10.13 by @renovate[bot] in #9083
- chore(deps): update dependency rust to v1.93.1 by @renovate[bot] in #9084
- chore(deps): update github-actions by @renovate[bot] in #9086
- chore(deps): update dependency tombi to v0.7.28 by @renovate[bot] in #9085
- feat(markdown): port snapshots from prettier by @tidefield in #9067
- fix(core): scss handling by @ematipico in #9091
- revert(core): includes resolution by @ematipico in #9092
- chore(deps): update rust crate jiff to 0.2.20 by @renovate[bot] in #9088
- chore(deps): update rust crate libc to 0.2.182 by @renovate[bot] in #9089
- fix(cli): stdin regression by @ematipico in #9102
- fix(lint): regression of the
noUnknownPseudoElementrule by @siketyan in #9100 - ci: release by @github-actions[bot] in #9094
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.0...@biomejs/biome@2.4.1