Releases: biomejs/biome
JavaScript APIs v6.0.0
6.0.0
Minor Changes
-
#8944
8cd3da1Thanks @ash1day! - Added a newspanInBytesToSpanInCodeUnitshelper 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 correctly handles this conversion, including surrogate pairs and unpaired surrogates.import { spanInBytesToSpanInCodeUnits } from "@biomejs/js-api"; const [start, end] = spanInBytesToSpanInCodeUnits( diagnostic.location.span, content, ); const text = content.slice(start, end); // Correctly extracts the text
Patch Changes
- Updated dependencies []:
- @biomejs/wasm-web@2.5.0
- @biomejs/wasm-bundler@2.5.0
- @biomejs/wasm-nodejs@2.5.0
What's Changed
- feat(css): support SCSS qualified names in values and function calls by @denbezrukov in #9096
- feat(css): add unary expression parsing by @denbezrukov in #9093
- feat(css): support scss nesting declarations in declaration lists by @denbezrukov in #9135
- feat(css): allow scss declarations in @page blocks by @denbezrukov in #9139
- feat(css): allow delimiters in bracketed value lists by @denbezrukov in #9145
- feat(analyze/json): useSortedPackageJson by @ematipico in #9134
- feat: two new cross language rules by @ematipico in #9152
- feat(js-api): add spanInBytesToSpanInCodeUnits helper function by @ash1day in #8944
- feat: collect local and global styles for
noUndeclearedClassesby @ematipico in #9297 - feat(organizeImports): add
sortBareImportsoption by @Conaclos in #9384 - chore: merge main to next by @ematipico in #9443
- feat(linter): add includes option for plugin file scoping by @chocky335 in #9171
- feat(cli): add ANSI art Biome logo by @ematipico in #9533
- feat(biome_service): support applying GritQL plugin rewrites via --write by @chocky335 in #9073
- feat(lint): add ignore option to no-unused-variables by @mvarendorff in #9397
- feat(biome_html_analyze): port noRedundantRoles a11y rule to HTML in #9564
- revert: feat(biome_html_analyze): port noRedundantRoles a11y rule to HTML by @dyc3 in #9587
- feat(html/a11y): add noRedundantRoles rule for HTML by @IxxyDev in #9276
- feat(cli): concise reporter by @ematipico in #9539
- feat(biome_html_analyze): port useKeyWithMouseEvents a11y rule to HTML by @rahuld109 in #9582
- chore: fix
nextfailures by @dyc3 in #9633 - feat(biome_html_analyze): port useAriaActivedescendantWithTabindex to HTML by @faizkhairi in #9617
- feat(lint): port useValidAnchor to html by @DerTimonius in #8987
- feat: improve noUndeclaredClasses by @ematipico in #9503
- feat(biome_html_analyze): port useHeadingContent a11y rule to HTML by @faizkhairi in #9716
- feat(formatter): add delimiterSpacing option by @luisherranz in #9718
- feat(assist): implement useSortedAttributes for HTML by @mujpao in #9547
- feat(html/a11y): port noAriaUnsupportedElements to HTML by @IxxyDev in #9491
- feat(assist): use sorted type fields 9137 by @ff1451 in #9275
- feat(html_analyze): port useValidAriaProps rule to HTML by @Maximiliano-Zeballos in #9761
- feat(html): port noAriaHiddenOnFocusable a11y rule to HTML by @aviraldua93 in #9496
- docs: remove duplicate sentence by @Netail in #9832
- fix: assist generator by @Netail in #9831
- feat(cli): add watch mode (--watch) to the CLI for check/format/lint commands by @siketyan in #8731
- refactor: improve watch mode by @ematipico in #9859
- feat(cli): add
upgradecommand by @nhedger in #9546 - chore: extra rule sources by @Netail in #9872
- feat(graphql_analyze): implement useSortedSelectionSet by @Netail in #9853
- feat(html): port useValidAriaValues a11y rule to HTML by @aviraldua93 in #9928
- chore: merge
mainintonextby @dyc3 in #9945 - feat(lint/html): port noExcessiveLinesPerFile to html by @dyc3 in #9967
- docs(organizeImports): revamp user-facing docs by @Conaclos in #9887
- ci: update snapshots by @Conaclos in #9986
- chore: abstract html tag matcher (main into next) by @Netail in #9993
- feat(linter): add noNonInteractiveTabIndex for HTML by @viraxslot in #9306
- feat(html_analyze): implement noNoninteractiveElementToInteractiveRole by @Netail in #10022
- feat(html_analyze): implement noInteractiveElementToNoninteractiveRole by @Netail in #10028
- feat(html_analyze): implement useValidAutocomplete by @Netail in #10013
- feat(html_analyze): implement noNoninteractiveElementInteractions by @Netail in #10026
- feat(js-formatter): implement delimiterSpacing for JavaScript by @luisherranz in #9719
- fix: next branch ci (+ main into next) by @Netail in #10051
- feat(html_analyze): implement useAriaPropsSupportedByRole by @Netail in #10015
- feat(linter): preset by @ematipico in #9813
- feat(organizeImports): add :STYLE: group matcher by @Conaclos in #10070
- feat(lint): support pnpm catalogs by @apple-yagi in #8396
- feat(html_analyze): implement useFocusableInteractive by @Netail in #10067
- feat(html): port useKeyWithClickEvents a11y rule to HTML by @aviraldua93 in #9495
- feat(html_analyze): port useSemanticElements a11y rule to HTML by @Maximiliano-Zeballos in #9792
- feat(js-formatter): implement delimiterSpacing for JSX by @luisherranz in #9720
- feat(js-formatter): implement delimiterSpacing for TypeScript by @luisherranz in #9721
- feat(json-formatter): implement delimiterSpacing for JSON by @luisherranz in #9723
- feat(html_analyze): port noLabelWithoutControl by @Netail in #10089
- chore: merge main into next by @Netail in #10104
- feat(migrate): map ESLint spacing rules to delimiterSpacing by @luisherranz in #9724
- feat(css-formatter): implement delimiterSpacing for CSS by @luisherranz in #9722
- feat(biome_js_analyze): add
bundleDependenciesoption toNoUndeclaredDependenciesrule by @mdrobny in #9170 - fix: workspace generation by @Netail in #10107
- feat(html_analyze): implement noStaticElementInteractions by @Netail in #10069
- feat: implement useSortedEnumMembers by @Netail in #10000
- feat(organizeImports): add
kindfield to import matcher by @georgephillips in #10074 - chore: main into next by @Netail in #10142
- chore: changeset corrections by @Netail in #10145
- fix: align HTML & JS a11y sources by @Netail in #10120
- feat(lint): add rule options for
noImplicitCoercionsto ignore double negations by @Bertie690 in #9309 - docs: incorrect markdown by @ematipico in #10186
- feat(core): handle svg files by @ematipico in #10106
- feat(config): expose
html.parser.vueby @dyc3 in #9366 - chore: refactor delimiterSpacing changesets by @ematipico in #10234
- perf(core): cache analyzer visitor by @ematipico in #10204
- feat: go-to definition (#9619) by @ematipico in #9700
- chore: merge main into next by @ematipico in https://github.com/biomejs/biome/p...
Biome CLI v2.5.0
2.5.0
Minor Changes
-
#9539
f0615fdThanks @ematipico! - Added a new reporter calledconcise. When--reporter=conciseis passed the commandsformat,lint,checkandci, 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: lint/suspicious/noImplicitAnyLet: This variable implicitly has the any type. × main.ts:2:10: lint/suspicious/noRedeclare: Shouldn't redeclare 'z'. Consider to delete it or rename it. -
#9495
2056b23Thanks @aviraldua93! - Added theuseKeyWithClickEventsa11y lint rule for HTML files (.html,.vue,.svelte,.astro). This is a port of the existing JSX rule. The rule enforces that elements with anonclickhandler also have at least one keyboard event handler (onkeydown,onkeyup, oronkeypress) to ensure keyboard accessibility.Inherently keyboard-accessible elements (
<a>,<button>,<input>,<select>,<textarea>,<option>) are excluded, as are elements hidden from assistive technologies (aria-hidden) or withrole="presentation"/role="none".<!-- Invalid: no keyboard handler --> <div onclick="handleClick()">Click me</div> <!-- Valid: has keyboard handler --> <div onclick="handleClick()" onkeydown="handleKeyDown()">Click me</div> <!-- Valid: inherently keyboard-accessible --> <button onclick="handleClick()">Submit</button>
-
#9152
9ec8500Thanks @ematipico! - Added new nursery lint rulenoUndeclaredClassesfor HTML, JSX, and SFC files (Vue, Astro, Svelte). The rule detects CSS class names used inclass="..."(orclassName) attributes that are not defined in any<style>block or linked stylesheet reachable from the file.<!-- .typo is used but never defined --> <html> <head> <style> .button { color: blue; } </style> </head> <body> <div class="button typo"></div> </body> </html>
-
#9152
9ec8500Thanks @ematipico! - Added new nursery lint rulenoUnusedClassesfor CSS. The rule detects CSS class selectors that are never referenced in any HTML or JSX file that imports the stylesheet. This is a project-domain rule that requires the module graph./* styles.css — .ghost is never used in any importing file */ .button { color: blue; } .ghost { color: red; }
/* App.jsx */ import "./styles.css"; export default () => <div className="button" />;
-
#9546
6567efaThanks @nhedger! - Added abiome upgradecommand for standalone installations. It upgrades Homebrew installs withbrew upgrade biome, updates manually installed binaries from the latest GitHub release, and tells npm users to upgrade with their package manager instead. -
#9716
701767aThanks @faizkhairi! - Added the HTML version of theuseHeadingContentrule. The rule now enforces that heading elements (h1-h6) have content accessible to screen readers in HTML, Vue, Svelte, and Astro files.<!-- Invalid: empty heading --> <h1></h1> <!-- Invalid: heading hidden from screen readers --> <h1 aria-hidden="true">invisible content</h1> <!-- Valid: heading with text content --> <h1>heading</h1> <!-- Valid: heading with accessible name --> <h1 aria-label="Screen reader content"></h1>
-
#9582
f437ef8Thanks @rahuld109! - Added the HTML version of theuseKeyWithMouseEventsrule. The rule now enforces thatonmouseoveris accompanied byonfocusandonmouseoutis accompanied byonblurin HTML, Vue, Svelte, and Astro files.<!-- Invalid: onmouseover without onfocus --> <div onmouseover="handleMouseOver()"></div> <!-- Valid: onmouseover paired with onfocus --> <div onmouseover="handleMouseOver()" onfocus="handleFocus()"></div>
-
#9275
1fdbceeThanks @ff1451! - Added the new assist actionuseSortedTypeFields, which sorts the fields of GraphQL object types, interface types and input object types alphabetically, e.g.name, age, idbecomesage, id, name. -
#10561
78075b7Thanks @Conaclos! - Added a newstyleoption to useExportType,
which enforces a style for exporting types.
This is the same option as the one provided byuseImportType. -
#8987
d16e32bThanks @DerTimonius! - Ported theuseValidAnchorrule to HTML. This rule enforces that all anchors are valid and that they are navigable elements. -
#9533
4d251d4Thanks @ematipico! - Theinitcommand now prints the Biome logo. -
#10069
0eb9310Thanks @Netail! - Added the HTML lint rulenoStaticElementInteractions, which enforces that static, visible elements (such as<div>) that have click handlers use the valid role attribute.Invalid:
<div onclick="myFunction()"></div>
-
#9134
2a43488Thanks @ematipico! - Added the assist actionuseSortedPackageJson.This action organizes package.json fields according to the same conventions as the popular sort-package-json tool.
-
#9309
7daa18bThanks @Bertie690! - TheallowDoubleNegationoption has been added tonoImplicitCoercionsto allow ignoring double negations inside code.With the option enabled, the following example is considered valid and is ignored by the rule:
const truthy = !!value;
-
#9700
894f3fbThanks @ematipico! - The Biome Language server now supports the "go-to definition" feature.When the cursor of the mouse is hovering an entity (variable, CSS class, type, etc.), and the command CTRL + click is triggered, the editor jumps to where this entity is defined, if the language server can find it.
Here's what Biome is able to resolve:
- Variables and types used in JavaScript modules, defined in the same file or imported from another module.
- JSX Components used in JavaScript modules, defined in the same file or imported from another module.
- CSS classes used in JSX and HTML-ish files (Vue, Svelte and Astro), and defined in CSS files.
- Components used in HTML-ish files and defined in other HTML-ish.
- Variables used in HTML-ish files and defined in the same file or imported from another module (JavaScript or HTML-ish).
-
#10070
bae0710Thanks @Conaclos! - Added the:STYLE:group matcher fororganizeImportsthat matches style imports.For example, the following configuration...
{ "assist": { "actions": { "source": { "organizeImports": { "level": "on", "opt...
Biome CLI v2.4.16
2.4.16
Patch Changes
-
#10329
ef764d5Thanks @Conaclos! - Fixed an issue where diagnostics showed an incorrect location in Astro files. -
#10363
50aa415Thanks @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 ><!-- 3 --></span>
Output:
<span ><!-- 1 - --> <span>a</span<!-- 2 - --> ><span>b</span><!-- 3 + --><span>a</span><!-- 2 + --><span>b</span><!-- 3 --></span >
-
#10465
0c718daThanks @dfedoryshchev! - Fixed diagnostics emitted by thenoUntrustedLicensesrule. -
#10358
05c2617Thanks @dyc3! - Fixed #10356:biome rage --linternow displays rules enabled through linter domains in the enabled rules list. -
#10300
950247cThanks @dyc3! - Fixed #10265: Svelte function bindings such asbind:value={get, set}are now parsed more precisely, sonoCommaOperatorwon't emit false positives for that syntax anymore. -
#9786
e71f584Thanks @MeGaNeKoS! - Fixed #8480:useDestructuringnow providesvariableDeclaratorandassignmentExpressionoptions to control which contexts enforce destructuring, matching ESLint'sprefer-destructuringconfiguration. Both default to{array: true, object: true}. The diagnostic for object destructuring in assignment expressions now instructs users to wrap the assignment in parentheses. -
#10425
1948b72Thanks @sjh9714! - Fixed #10244: TheuseOptionalChainrule now detects negated guard inequality chains like!foo || foo.bar !== "x". -
#10442
001f94fThanks @ematipico! - Fixed #10411:noMisusedPromisesno longer causes a stack overflow when a nested function returns an object with shorthand properties that shadow destructured variables from an outer scope. -
#10318
9b1577fThanks @dyc3! - Added support forformatter.trailingCommasin overrides. This option was previously available in the top-level formatter configuration but missing from formatter overrides. -
#10319
2e37709Thanks @dyc3! - Fixed Vue and Svelte formatting for standalone interpolations in inline elements. Biome now preserves existing newlines in cases like:- <span> {{ value }} </span> + <span> + {{ value }} + </span>
-
#10365
0a58eb0Thanks @Netail! - Fixed #10361:noUnusedFunctionParametersnow mentions the parameter name in the diagnostic. -
#10439
df6b867Thanks @denbezrukov! - Fixed CSS and SCSS formatting for comments around declaration colons so comments between property names, colons, and values stay at the same boundary as Prettier..selector { - color: /* red, */ - blue; + color: /* red, */ blue; } -
#10344
b30208cThanks @siketyan! - Fixed#10123: Corrected thenoReactNativeDeepImportssource rule to point to the proper upstream rule, so users can migrate from the original rule correctly. -
#10328
b59133fThanks @dyc3! - Fixed #10309: Biome no longer adds newlines to Astro frontmatter when linter or assist--writemode is enabled.
What's Changed
- fix(format/html/vue): preserve newlines around standalone interpolations by @dyc3 in #10319
- refactor(css_parser): remove
allow_css_ratiofrom SCSS expression parsing functions by @denbezrukov in #10325 - fix(astro): display diagnostic advices with the correct location by @Conaclos in #10329
- fix: trim astro frontmatter content before processing it by @dyc3 in #10328
- fix(config): support trailingCommas in overrides by @dyc3 in #10318
- chore(deps): update rust:1.95.0-bullseye docker digest to b26cecc by @renovate[bot] in #10334
- chore(deps): update rust:1.95.0-trixie docker digest to 5b1e348 by @renovate[bot] in #10335
- chore(deps): update dependency @types/node to v24.12.3 by @renovate[bot] in #10336
- chore(deps): update dependency tombi to v0.10.6 by @renovate[bot] in #10337
- feat(css_parser): support for SCSS
@include ... usingclauses by @denbezrukov in #10327 - chore(deps): update github-actions by @renovate[bot] in #10338
- chore(deps): update pnpm to v10.33.4 by @renovate[bot] in #10339
- chore(deps): update rust crate filetime to 0.2.28 by @renovate[bot] in #10340
- chore(deps): update dependency @changesets/changelog-github to v0.7.0 by @renovate[bot] in #10342
- feat(parse/tailwind): differentiate between number and non-number values by @dyc3 in #10332
- chore(deps): update rust crate rayon to 1.12.0 by @renovate[bot] in #10343
- fix(markdown_parser): parse tab-indented siblings by @jfmcdowell in #10333
- fix(lint/js): correct the rule source of
noReactNativeDeepImportsby @siketyan in #10344 - fix(markdown_parser): column-aware tab handling around block containers by @jfmcdowell in #10345
- chore: update pnpm to the lateset by @ematipico in #10348
- chore: fix renovate config by @dyc3 in #10352
- feat(css_parser): support SCSS interpolated selector by @denbezrukov in #10351
- feat(useDestructuring): add options for assignment/declaration and improve diagnostic for bare object assignments by @MeGaNeKoS in #9786
- chore: remove benchmark from repository by @ematipico in #10355
- fix(rage): print rules enabled by domains by @dyc3 in #10358
- feat(css): support SCSS interpolation in attribute selectors by @denbezrukov in #10357
- fix(js_analyze): noUnusedFunctionParameters mention parameter name by @Netail in #10365
- feat(parse/html): parse svelte function bindings more precisely by @dyc3 in #10300
- feat(css_formatter): add support for formatting SCSS keyframes selectors by @denbezrukov in #10362
- fix: yaml linting panic fixes by @jjroush in #10287
- feat(css_parser): add support for SCSS interpolated dashed identifiers and properties by @denbezrukov in #10367
- fix(markdown_parser): handle ordered sublist continuation b...
Biome CLI v2.4.15
2.4.15
Patch Changes
-
#9394
ba3480eThanks @dyc3! - Added the nursery ruleuseTestHooksInOrderin thetestdomain. 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
e0a54ccThanks @dyc3! - Added a new nursery ruleuseVueNextTickPromise, which enforces Promise syntax when using VuenextTick.For example, the following snippet triggers the rule:
import { nextTick } from "vue"; nextTick(() => { updateDom(); });
-
#10219
64aee45Thanks @dyc3! - Added a new nursery rulenoVueVOnNumberValues, that disallows deprecated number modifiers on Vuev-ondirectives.For example, the following snippet triggers the rule:
<input @keyup.13="submit" />
-
#10195
7b8d4e1Thanks @dyc3! - Added the new nursery ruleuseVueValidVFor, which validates Vuev-fordirectives and reports invalid aliases, missing component keys, and keys that do not use iteration variables. -
#10238
1110256Thanks @dyc3! - Added the recommended nursery rulenoVueImportCompilerMacros, which disallows importing Vue compiler macros such asdefinePropsfromvuebecause they are automatically available. -
#10201
1a08f89Thanks @realknove! - Fixed #10193:style/useReadonlyClassPropertiesno longer reports class properties as readonly-able when they are assigned inside arrow callbacks nested in class property initializers. -
#9574
3bd2b6aThanks @Conaclos! - Fixed #9530. The diagnostics oforganizeImportsare now more detailed and more precise. They are also better at localizing where the issue is. -
#10205
a704a6cThanks @Conaclos! - Fixed #10185. `organizeImports now errors when it encounters an unknown predefined group.The following configuration is now reported as invalid because
:INEXISTENT:is an unknown predefined group.{ "assist": { "actions": { "source": { "organizeImports": { "options": { "groups": [":INEXISTENT:"] } } } } } } -
#10052
b565bedThanks @minseong0324! - ImprovednoMisleadingReturnType: it now flags union annotations whose extra variants are never returned, and suggests the narrower type (e.g.string | null→string).These functions are now reported because
nullandnumberare included in the return annotations but never returned:function getUser(): string | null { return "hello"; } // null is never returned function getCode(): string | number { return "hello"; } // number is never returned
-
#10213
ac30057Thanks @dyc3! - Fixed #9450: HTML and Vue element formatting now preserves child line breaks when an element contains another element child on its own line, instead of collapsing the child element onto the same line. -
#10275
9ee6c03Thanks @solithcy! - Fixed #10274: Svelte templates with missing expressions no longer parsed asHtmlBogusElement -
#10143
56798a7Thanks @minseong0324! -noMisleadingReturnTypenow detects misleading return type annotations when object literal properties are initialized withas const.This function is now reported because the return annotation widens a property initialized with
as const:function f(): { value: string } { return { value: "text" as const }; }
-
#10143
56798a7Thanks @minseong0324! -noUselessTypeConversionnow detects redundant conversions on object literal properties initialized withas const.This conversion is now reported because
message.valueis inferred as a string literal:const message = { value: "text" as const }; String(message.value);
-
#9807
0ae5840Thanks @dyc3! - Added the new nursery ruleuseThisInClassMethods, based on ESLint'sclass-methods-use-this.The rule now reports instance methods, getters, setters, and function-valued instance fields that do not use
this, andbiome migrate eslintpreserves the supportedignoreMethods,ignoreOverrideMethods, andignoreClassesWithImplementsoptions.Invalid:
class Foo { bar() { // does not use `this`, invalid console.log("Hello Biome"); } }
-
#10258
e7b18f7Thanks @ematipico! - Improved linter performance by narrowing the query nodes for several lint rules, reducing how often they are evaluated. -
#10273
04e22a1Thanks @dyc3! - Fixed #10271: The HTML parser now correctly parsesofas text content when in text contexts. -
#9838
83f7385Thanks @dyc3! - Added the nursery rulenoBaseToString, which reports stringification sites that fall back to Object's default"[object Object]"formatting. The rule also supports theignoredTypeNamesoption. -
#10143
56798a7Thanks @minseong0324! -useExhaustiveSwitchCasesnow checks switch statements over object literal properties initialized withas const.This switch is now reported because
status.kindis inferred as the string literal"ready"but no case handles it:const status = { kind: "ready" as const }; switch (status.kind) { }
-
#10143
56798a7Thanks @minseong0324! -useStringStartsEndsWithnow detects string index comparisons on object literal properties initialized withas const.This comparison is now reported because
message.valueis inferred as a string literal:const message = { value: "hello" as const }; message.value[0] === "h";
What's Changed
- fix(markdown_parser): parse indented reference continuation by @jfmcdowell in #10192
- fix(markdown_parser): parse quoted ordered list interrupts by @jfmcdowell in https://...
Biome CLI v2.4.14
2.4.14
Patch Changes
-
#9393
491b171Thanks @dyc3! - Added the nursery ruleuseTestHooksOnTopin thetestdomain. 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
eefc5abThanks @dyc3! - Fixed #7882: The HTML parser will now emit better diagnostics when it encounters a void element with a closing tag, such as<br></br>. Previously, the parser would emit multiple diagnostics with conflicting advice. Now it emits a single diagnostic that clearly states that void elements should not have closing tags. -
#10054
0e9f569Thanks @minseong0324! -noMisleadingReturnTypeno longer misses widening from concrete object types, class instances, object literals, tuples, functions, and regular expressions to: object.A function annotated
: objectreturning an object literal:function f(): object { return { retry: true }; }
-
#10116
53269ebThanks @jiwon79! - Fixed #6201:noUselessEscapeInRegexno longer flags an escaped backslash followed by-as a useless escape. Patterns like/[\\-]/are now considered valid because the second\is the escaped backslash, not an unnecessary escape of the trailing dash. -
#10092
33d8543Thanks @Conaclos! - Fixed #9097:organizeImportsno longer adds a blank line between a never-matched group and a matched group.Given the following
organizeImportsoptions:{ "groups": [":NODE:", ":BLANK_LINE:", ":PACKAGE:", ":BLANK_LINE:", ":PATH:"] }The following code...
// Comment import "package"; import "./file.js";
...was organized as:
+ // Comment import "package"; + import "./file.js";
A blank line was added even though the group ':NODE:' doesn't match any imports here.
:BLANK_LINE:between never-matched groups and matched groups are now ignored.
The code is now organized as:// Comment import "package"; + import "./file.js"; -
#10138
a10b6c1Thanks @dyc3! - Fixed Vuev-forhandling fornoUndeclaredVariablesandnoUnusedVariables. Biome now recognizes variables declared byv-fordirectives and references to iterated values in Vue templates. -
#10115
d428d76Thanks @minseong0324! -noMisleadingReturnTypeno longer reports false positives when a union return type'sbooleanvariant is covered by bothtrueandfalsereturns. -
#9922
7acf1e0Thanks @dyc3! - Added the new nursery rulenoReactStringRefs, which disallows legacy React string refs such asref="hello"andthis.refs.hello.Biome also reports template-literal refs such as
ref={`hello`}, so React code can consistently migrate to callback refs,createRef(), oruseRef(). -
#10010
f3e76abThanks @dyc3! - Fixed a bug in the LSP file watcher registration so Biome now watches.biome.jsonand.biome.jsoncconfiguration files and reloads workspace settings when they change. -
#10176
8a40ef8Thanks @dyc3! - Fixed #10011: ThenoThisInStaticrule no longer reportsthiswhen it is used as the constructor target innew this(...), which is required for inherited static factory methods. -
#10163
6867e96Thanks @jiwon79! - Fixed #9884: TheuseSortedAttributesauto-fix no longer corrupts source code when both an outer JSX element and a nested JSX-valued attribute have unsorted attributes in the same pass. Multiple unsorted groups separated by spread or shorthand attributes within the same JSX element are now reported as a single diagnostic. -
#10079
d29dd19Thanks @Damix48! - Fixed false positive innoAssignInExpressionsfor Svelte{@const}blocks. Assignments in{@const name = value}are now correctly recognized as declarations rather than accidental assignments in expressions. -
#10080
5d8fdacThanks @Damix48! - Fixed parsing of closing parentheses in Svelte{#each}block key expressions. Biome now correctly parses method calls and other parenthesised expressions used as keys.For example, the following snippets are now parsed correctly:
{#each numbers as number, index (number.toString())} <p>{number}</p> {/each} {#each numbers as number (key(number))} <p>{number}</p> {/each} -
#10140
e7024b9Thanks @solithcy! - Fixed #10135: Biome no longer crashes on missing Svelte template expressions.The following code snippet longer panics:
{#if } <p>^ this would previously crash</p> {/if} {@const } <p> ^ this would also crash</p> -
#10111
7818009Thanks @jiwon79! - Fixed #9997:noDuplicateSelectorsno longer reports false positives for selectors inside@scopequeries. Biome now treats@scopeas a separate at-rule context, like@media,@supports,@container, and@starting-style.The following snippet is no longer flagged as a duplicate:
.Example { padding: 0; } @scope (.theme-dark) { .Example { color: white; } }
-
#9926
d62b331Thanks @dyc3! - Added the nursery lint ruleuseMathMinMax, which prefersMath.min()andMath.max()over equivalent ternary comparisons.For example, this code:
const min = a < b ? a : b;
is much more readable when rewritten as:
const min = Math.min(a, b);
-
#10115
d428d76Thanks @minseong0324! -useExhaustiveSwitchCasesnow flags missingtrue/falsecases forbooleandiscriminants, including whenbooleanis a union variant. -
#10125
a55a0b6Thanks @bmish! - Fixed a resolver bug where packages that define a typed entry point throughpackage.json'smainfield but omittypeswere ignored during type-aware resolution. Type-aware rules such asnoFloatingPromisescan now inspect imports from those packages.
Biome CLI v2.4.13
2.4.13
Patch Changes
-
#9969
c5eb92bThanks @officialasishkumar! - Added the nursery rulenoUnnecessaryTemplateExpression, 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_suffix' const c = `${"a"}${"b"}`; // can be 'ab'
-
#10037
f785e8cThanks @minseong0324! - Fixed #9810:noMisleadingReturnTypeno longer reports false positives on a getter with a matching setter in the same namespace.class Store { get status(): string { if (Math.random() > 0.5) return "loading"; return "idle"; } set status(v: string) {} }
-
#10084
5e2f90cThanks @jiwon79! - Fixed #10034:noUselessEscapeInRegexno longer flags escapes ofClassSetReservedPunctuatorcharacters (&,!,#,%,,,:,;,<,=,>,@,`,~) insidev-flag character classes as useless. These characters are reserved as individual code points inv-mode, so the escape is required.The following pattern is now considered valid:
/[a-z\&]/v;
-
#10063
c9ffa16Thanks @Netail! - Added extra rule sources from ESLint CSS.biome migrate eslintshould do a bit better detecting rules in your eslint configurations. -
#10035
946b50eThanks @Netail! - Fixed #10032: useIframeSandbox now flags if there's no initializer value. -
#9865
68fb8d4Thanks @dyc3! - Added the new nursery ruleuseDomNodeTextContent, which preferstextContentoverinnerTextfor DOM node text access and destructuring.For example, the following snippet triggers the rule:
const foo = node.innerText;
-
#10023
bd1e74fThanks @ematipico! - Added a new nursery rulenoReactNativeDeepImportsthat disallows deep imports from thereact-nativepackage. Internal paths likereact-native/Libraries/...are not part of the public API and may change between versions.For example, the following code triggers the rule:
import View from "react-native/Libraries/Components/View/View";
-
#9885
3dce737Thanks @dyc3! - Added a new nursery ruleuseDomQuerySelectorthat prefersquerySelector()andquerySelectorAll()over older DOM query methods such asgetElementById()andgetElementsByClassName(). -
#9995
4da9cafThanks @siketyan! - Fixed #9994: Biome now parses nested CSS rules correctly when declarations follow them inside embedded snippets. -
#10009
b41cc5aThanks @Jayllyz! - Fixed #10004:noComponentHookFactoriesno longer reports false positives for object methods and class methods. -
#9988
eabf54aThanks @Netail! - Tweaked the diagnostics range for useAltText, useButtonType, useHtmlLang, useIframeTitle, useValidAriaRole & useIfameSandbox to report on the opening tag instead of the full tag. -
#10043
fc65902Thanks @mujpao! - Fixed #10003: Biome no longer panics when parsing Svelte files containing{#}. -
#9815
5cc83b1Thanks @dyc3! - Added the new nursery rulenoLoopFunc. When enabled, it warns when a function declared inside a loop captures outer variables that can change across iterations. -
#9702
ef470baThanks @ryan-m-walker! - Added the nursery ruleuseRegexpTestthat enforcesRegExp.prototype.test()overString.prototype.match()andRegExp.prototype.exec()in boolean contexts.test()returns a boolean directly, avoiding unnecessary computation of match results.Invalid
if ("hello world".match(/hello/)) { }
Valid
if (/hello/.test("hello world")) { }
-
#9743
245307dThanks @leetdavid! - Fixed #2245: Svelte<script>tag language detection when thegenericsattribute contains>characters (e.g.,<script lang="ts" generics="T extends Record<string, unknown>">). Biome now correctly recognizes TypeScript in such script blocks. -
#10046
0707de7Thanks @Conaclos! - Fixed #10038:organizeImportsnow sorts imports in TypeScript modules and declaration files.declare module "mymodule" { - import type { B } from "b"; import type { A } from "a"; + import type { B } from "b"; } -
#10012
94ccca9Thanks @ematipico! - Added the nursery rulenoReactNativeLiteralColors, which disallows color literals inside React Native styles.The rule belongs to the
reactNativedomain. It reports properties whose name containscolorand whose value is a string literal when they appear inside aStyleSheet.create(...)call or inside a JSX attribute whose name containsstyle.// Invalid const Hello = () => <Text style={{ backgroundColor: "#FFFFFF" }}>hi</Text>; const styles = StyleSheet.create({ text: { color: "red" }, });
// Valid const red = "#f00"; const styles = StyleSheet.create({ text: { color: red }, });
-
#10005
131019eThanks @ematipico! - Added the nursery rulenoReactNativeRawText, which disallows raw text outside of<Text>components in React Native.The rule belongs to the new
reactNativedomain.// Invalid <View>some text</View> <View>{'some text'}</View>
// Valid <View> <Text>some text</Text> </View>
Additional components can be allowlisted through the
skipoption:{ "options": { "skip": ["Title"] } } -
#9911 [
1603f78](https:...
Biome CLI v2.4.12
2.4.12
Patch Changes
-
#9376
9701a33Thanks @dyc3! - Added thenursery/noIdenticalTestTitlelint rule. This rule disallows using the same title for twodescribeblocks 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 case });
-
#9889
7ae83f2Thanks @dyc3! - Improved the diagnostics foruseForOfto better explain the problem, why it matters, and how to fix it. -
#9916
27dd7b1Thanks @Jayllyz! - Added a new nursery rulenoComponentHookFactories, that disallows defining React components or custom hooks inside other functions.For example, the following snippets trigger the rule:
function createComponent(label) { function MyComponent() { return <div>{label}</div>; } return MyComponent; }
function Parent() { function Child() { return <div />; } return <Child />; }
-
#9980
098f1ffThanks @ematipico! - Fixed #9941: Biome now emits awarningdiagnostic when a file exceed thefiles.maxSizelimit. -
#9942
9956f1dThanks @dyc3! - Fixed #9918:useConsistentTestItno longer panics when applying fixes to chained calls such astest.for([])("x", () => {});. -
#9891
4d9ac51Thanks @dyc3! - Improved thenoGlobalObjectCallsdiagnostic to better explain why calling global objects likeMathorJSONis invalid and how to fix it. -
#9902
3f4d103Thanks @ematipico! - Fixed #9901: the commandlint --writeis now idempotent when it's run against HTML-ish files that contains scripts and styles. -
#9891
4d9ac51Thanks @dyc3! - Improved thenoMultiStrdiagnostic to explain why escaped multiline strings are discouraged and what to use instead. -
#9966
322675eThanks @siketyan! - Fixed #9113: Biome now parses and formats@mediaand other conditional blocks correctly inside embedded CSS snippets. -
#9835
f8d49d9Thanks @bmish! - ThenoFloatingPromisesrule now detects floating promises through cross-module generic wrapper functions. Previously, patterns likeexport const fn = trace(asyncFn)— wheretracepreserves the function signature via a generic<F>(fn: F): F— were invisible to the rule when the wrapper was defined in a different file. -
#9981
02bd8ddThanks @siketyan! - Fixed #9975: Biome now parses nested CSS selectors correctly inside embedded snippets without requiring an explicit&. -
#9949
e0ba71dThanks @Netail! - Added the nursery ruleuseIframeSandbox, which enforces thesandboxattribute foriframetags.Invalid:
<iframe></iframe>
-
#9913
d417803Thanks @Netail! - Added the nursery rulenoJsxNamespace, which disallows JSX namespace syntax.Invalid:
<ns:testcomponent />
-
#9892
e75d70eThanks @dyc3! - Improved thenoSelfComparediagnostic to better explain why comparing a value to itself is suspicious and what to use for NaN checks. -
#9861
2cff700Thanks @dyc3! - Added the new nursery ruleuseVarsOnTop, which requiresvardeclarations to appear at the top of their containing scope.For example, the following code now triggers the rule:
function f() { doSomething(); var value = 1; }
-
#9892
e75d70eThanks @dyc3! - Improved thenoThenPropertydiagnostic to better explain why exposingthencan create thenable behavior and how to avoid it. -
#9892
e75d70eThanks @dyc3! - Improved thenoShorthandPropertyOverridesdiagnostic to explain why later shorthand declarations can unintentionally overwrite earlier longhand properties. -
#9978
4847715Thanks @mdevils! - Fixed #9744:useExhaustiveDependenciesno longer reports false positives for variables obtained via object destructuring with computed keys, e.g.const { [KEY]: key1 } = props. -
#9892
e75d70eThanks @dyc3! - Improved thenoRootTypediagnostic to better explain that the reported root type is disallowed by project configuration and how to proceed. -
#9927
7974ab7Thanks @dyc3! - Added eslint-plugin-unicorn'sno-nested-ternaryas a rule source fornoNestedTernary -
#9873
19ff706Thanks @minseong0324! -noMisleadingReturnTypenow checks class methods, object methods, and getters in addition to functions. -
#9888
362b638Thanks @dyc3! - Updated metadata forbiome migrate eslintto better reflect which ESLint rules are redundant versus unsupported versus unimplemented. -
#9892
e75d70eThanks @dyc3! - Improved thenoAutofocusdiagnostic to better explain why autofocus harms accessibility outside allowed modal contexts. -
#9982
d6bdf4aThanks @dyc3! - Improved performance of noMagicNumbers.
Biome now maps ESLintno-magic-numberssources more accurately duringbiome migrate eslint. -
#9889
7ae83f2Thanks @dyc3! - Improved the diagnostics for [noConstantCondition](https://biomejs.dev/linter/rules/no-constant...
Biome CLI v2.4.11
2.4.11
Patch Changes
-
#9350
4af4a3aThanks @dyc3! - Added the new nursery rule useConsistentTestIt in thetestdomain. The rule enforces consistent use of eitheritortestfor test functions in Jest/Vitest suites, with separate control for top-level tests and tests insidedescribeblocks.Invalid:
test("should fly", () => {}); // Top-level test using 'test' flagged, convert to 'it' describe("pig", () => { test("should fly", () => {}); // Test inside 'describe' using 'test' flagged, convert to 'it' });
-
#9429
a2f3f7eThanks @ematipico! - Added the new nursery lint ruleuseExplicitReturnType. It reports TypeScript functions and methods that omit an explicit return type.function toString(x: any) { // rule triggered, it doesn't declare a return type return x.toString(); }
-
#9828
9e40844Thanks @ematipico! - Fixed #9484: the formatter no longer panics when formatting files that containgraphqltagged template literals combined with parenthesized expressions. -
#9886
e7c681eThanks @ematipico! - Fixed an issue where, occasionally, some bindings and references were not properly tracked, causing false positives fromnoUnusedVariablesandnoUndeclaredVariablesin Svelte, Vue, and Astro files. -
#9760
5b16d18Thanks @myx0m0p! - Fixed #4093: thenoDeleterule no longer triggers fordelete process.env.FOO, sincedeleteis the documented way to remove environment variables in Node.js. -
#9799
2af8efdThanks @minseong0324! - Added the rulenoMisleadingReturnType. The rule detects when a function's return type annotation is wider than what the implementation actually returns.// Flagged: `: string` is wider than `"loading" | "idle"` function getStatus(b: boolean): string { if (b) return "loading"; return "idle"; }
-
#9880
7f67749Thanks @dyc3! - Improved the diagnostics foruseFindto better explain the problem, why it matters, and how to fix it. -
#9755
bff7bdbThanks @ematipico! - Improved performance of fix-all operations (--write). Biome is now smarter when it runs lint rules and assist actions. First, it runs only rules that have code fixes, and then runs the rest of the rules. -
#8651
aafca2dThanks @siketyan! - Add a new lint ruleuseDisposablesfor JavaScript, which detects disposable objects assigned to variables withoutusingorawait usingsyntax. Disposable objects that implement theDisposableorAsyncDisposableinterface are intended to be disposed of after use. Not disposing them can lead to resource or memory leaks, depending on the implementation.Invalid:
function createDisposable(): Disposable { return { [Symbol.dispose]() { // do something }, }; } const disposable = createDisposable();
Valid:
function createDisposable(): Disposable { return { [Symbol.dispose]() { // do something }, }; } using disposable = createDisposable();
-
#9788
53b8e57Thanks @MeGaNeKoS! - Fixed #7760: Added support for CSS scroll-driven animationtimeline-range-namekeyframe selectors (cover,contain,entry,exit,entry-crossing,exit-crossing). Biome no longer reports parse errors on keyframes likeentry 0% { ... }orexit 100% { ... }. -
#9728
5085424Thanks @mkosei! - Fixed #9696: Astro frontmatter now correctly parses regular expression literals like/\d{4}/. -
#9261
16b6c49Thanks @ematipico! - Fixed #8409: CSS formatter now correctly places comments after the colon in property declarations.Previously, comments that appeared after the colon in CSS property values were incorrectly moved before the property name:
[lang]:lang(ja) { - /* system-ui,*/ font-family: + font-family: /* system-ui,*/ Hiragino Sans, sans-serif; } -
#9441
957ea4cThanks @soconnor-seeq! - Fixed #1630: LSP project selection now prefers the most specific project root in nested workspaces. -
#9878
de6210fThanks @ematipico! - Fixed #9118:noUnusedImportsno longer reports false positives for default imports used inside Svelte, Vue and Astro components. -
#9879
ce7e2b7Thanks @dyc3! - Fixed a parser diagnostic's message when vue syntax is disabled so that it no longer references the non-existanthtml.parser.vueoption. This option will become available in 2.5. -
#9880
7f67749Thanks @dyc3! - Improved the diagnostics foruseRegexpExecto better explain the problem, why it matters, and how to fix it. -
#9846
b7134d9Thanks @ematipico! - Fixed #9140: Biome now parses Astro's attribute shorthand inside.astrofiles. The following snippet no longer reports a parse error:--- const items = ['a', 'b']; --- <ul> {items.map((item) => <li {item}>row</li>)} </ul>
-
#9790
67df09dThanks @dyc3! - Fixed #9781: Trailing comments after a top-levelbiome-ignore-all formatsuppression are now preserved instead of being dropped. This applies to JavaScript, CSS, HTML, JSONC, GraphQL, and Grit files. -
#9745
d87073eThanks @ematipico! - Fixed #9741: the LSP server now correctly returns theorganizeImportscode action when the client requests it viasource.organizeImports.biomein theonlyfilter. Previously, editors withcodeAction/resolvesupport (e.g. Zed) received an empty response because the action was serialized with the wrong kind (source.biome.organizeImportsinstead ofsource.organizeImports.biome). -
#9880
7f67749Thanks @dyc3! - Improved the diagnostics foruseArraySometo better explain the problem, why it matters, and how to fi...
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.