Version History
2.5.15 Latest
Patch Changes
-
#10634
b436ba0Thanks @subaru-hello! - Added the new nursery rulenoReactObjectTypeAsDefaultProp, which disallows array, object, and function values as default props in React components.For example, the following snippet triggers the rule.
function Component({ items = [] }) {return items;} -
#11956
faa8b37Thanks @dyc3! - Added the nursery rulenoSvelteExportLet, which disallows declaring Svelte component props with the legacyexport letsyntax. Use the$props()rune instead.<script>export let name;</script> -
#10816
1b9479eThanks @Th3S4mur41! - Added a new nursery ruleuseLogicalPropertiesthat enforces the use of logical properties in CSS, promoting better internationalization and accessibility practices. The rule supports adirectionoption with"ltr"as the default and"rtl"as the alternative. This is a first rule covering parts of #9034{"linter": {"rules": {"nursery": {"useLogicalProperties": {"level": "warn","options": {"direction": "rtl"}}}}}} -
#11960
1fdb5c2Thanks @dyc3! - Added the nursery ruleuseSvelteKitRuneImports, which reports imports from the deprecated$app/storesmodule and suggests$app/stateinstead.import { page } from "$app/stores"; -
#11723
3b429d1Thanks @m1handr! - Fixed #11656:noAstroSetHtmlDirectivenow correctly reportsset:htmldirectives inside Astro template expressions. -
#12023
874d5aeThanks @codspeed! - Improved the performance of the HTML formatter up to 4x. -
#11761
a3462feThanks @saberoueslati! - Fixed #11351:useSimplifiedLogicExpressionno longer reports boolean literals on the right side of||and&&outside boolean contexts, because removing them can change the result of the expression. For example,y = x || falseis no longer reported, whileif (x || false)still is. -
#11732
ff4c4ddThanks @dyc3! - Added the nursery rulenoMeaninglessVoidOperator, which reports unnecessary uses ofvoid, such asvoid log()whenlogreturnsvoid. The rule allows discarded call results, thenables,void 0, and calls returningnever. -
#11975
40dd3fbThanks @ematipico! - Fixed the indentation of multiline Astro expressions, in templates and attribute values, when runningbiome check --write. Biome now formats Astro expressions withbiome formattoo, and places them at the column of the surrounding markup.<div>{items.map((item) => (<span>{item}</span>))}<span>{item}</span>))}</div> -
#12016
09d4000Thanks @codspeed! - Improved the performance of indexing and analysis of big files up to 2x. The improvements are mostly visible in projects that make use of project and types lint rules. -
#11750
089bde0Thanks @dyc3! - Added the nursery ruleuseStrictBooleanExpressions, which reports ambiguous truthiness checks such asif (value)whenvaluehas typenumber | undefined. Non-nullable strings and numbers and nullable objects are allowed; the rule has no options. -
#11494
ad5b362Thanks @jp-knj! - Added the nursery rulenoAstroConflictingSetDirectives, which reports Astro elements with multiple content sources, such asset:html,set:text, and child content.For example,
<div set:html={html}>content</div>triggers the rule. -
#11878
84d1b3bThanks @dyc3! - Fixed #11748:useExhaustiveSwitchCasesnow reports missing cases for values created with the mapping overload ofArray.from, including arrays imported from another module. -
#11802
7d1f37eThanks @dyc3! - Tailwind classes will now be detected in Svelte, Vue, and Astro class attribute expressions that don’t use a class merging function. -
#11910
9e50ea2Thanks @ematipico! - Fixed #11504, a regression where Biome would silently ignore errors in the configuration file. Now errors are correctly retained and checked before executing any command. -
#11921
d568632Thanks @hirehamir! - Fixed #10846: when plugins fail to load, Biome now prints each failing plugin’s path on its own line, instead of concatenating bare messages likeCannot read file.Cannot read file.. -
#11930
82ea5a6Thanks @dyc3! - Fixed #11927: The HTML formatter no longer duplicates comments around Svelte blocks. This affected a comment after a block such as{#if}or{#each}at the end of an element, and a comment on the same line as the last element inside a block, before{:else},{/if}, or a similar tag. -
#11931
0cc46d8Thanks @dyc3! - Fixed the indentation of comments at the end of a Svelte block’s contents. A comment before{:else},{:then},{/if}, or a similar tag is now indented with the block’s contents instead of with the tag.{#if condition}<span>Text</span><!-- comment --><!-- comment -->{/if} -
#12031
ef0edd4Thanks @dyc3! - Fixed #12027: Biome’s test rules no longer mistake regular method calls namedtest,it, ordescribefor tests. For example,useValidTestTitleused to report the following regular expression check as a test with an invalid title:const isComment = /^\s*#/.test(line); -
#11959
8477e61Thanks @dyc3! - Fixed #11950:noUnusedVariablesnow reports arrow functions with expression bodies that only reference themselves, such aslet h = () => h();. -
#11915
3260602Thanks @ematipico! - Fixed #11841, where suppression comments had no effect on some parts of HTML-ish files and on snippets embedded in JavaScript files.Now the following suppression works as expected:
<!-- biome-ignore lint/correctness/noUndeclaredVariables: intentionally external --><div :title="missingValue"></div> -
#11952
b51040eThanks @dyc3! - Fixed #11951: the GritQL formatter no longer inserts a space after awithinpattern without anuntilclause.$arg <: within `bar($_)` ,$arg <: within `bar($_)`, -
#11794
429cf95Thanks @dyc3! - Added the nursery rulenoTailwindRawColorsfor JavaScript and HTML. It disallows Tailwind palette colors such asbg-pink-500andtext-white, encouraging design system color utilities such asbg-primary. -
#11837
f5e249bThanks @dyc3! - Fixed #11836:biome check --writeno longer adds invalid parentheses around Svelte{@const}declarations when experimental HTML support and formatting are enabled. -
#11978
8be0b9eThanks @dyc3! - Fixed #11817: Biome no longer crashes when its output is piped to a program that exits early, such ashead. Output to the closed pipe is now discarded and Biome exits normally. -
#11868
3841c26Thanks @ematipico! - Fixed #8986: Biome’s language server now scopes all watched-file patterns to each workspace folder, falling back to the deprecatedrootUriwhen no workspace folders are provided. Clients without relative-pattern support receive compatible absolute glob patterns. -
#11928
0015681Thanks @dyc3! - Restricted access to the Unix daemon socket to the user running Biome. The socket now lives in abiome-daemondirectory inside Biome’s cache directory that only this user can access, and the socket itself has mode0600. -
#11835
589ca1aThanks @dyc3! - UpdateduseReactCompiler: Biome now reports React Compiler diagnostics regardless of the React version declared inpackage.json. -
#11907
b7d9037Thanks @posido! - Fixed withastro/compiler-rs#194: the HTML parser no longer treats a regex literal that starts with>as the end of a self-closing tag. Astro frontmatter such asconst escaped = s.replace(/>/g, ">");no longer swallows the closing---fence, and the same regex inside a template expression no longer runs past its closing}. A regex literal after a keyword such asreturn, as inreturn />'/.test(s), is now recognized too. -
#12021
59cc595Thanks @dyc3! - Type inference performance has been significantly improved. Some popular libraries like Zod, Valibot, Arktype, Effect, Kysely, and Drizzle have gained a ~2-240x speedup in our benchmarks. This improvement affects all rules that use type information. -
#12044
c73fb91Thanks @dyc3! - Fixed #12042: the HTML formatter no longer removes the space between text and an inline element on the next line when it joins the lines.<p>a <em>b</em> c<u>d</u></p><p>a <em>b</em> c <u>d</u></p> -
#11965
f90bf38Thanks @ematipico! - Fixed module resolution in long-running workspaces so imports reflect package manifest and TypeScript path-mapping changes without requiring the importing file to be edited. -
#11860
0884e29Thanks @dyc3! - Removed theattributesandfunctionsoptions from the nursery rulenoTailwindArbitraryValue. The rule now uses the same Tailwind detection asuseTailwindShorthandClasses. -
#11969
865cd30Thanks @AlbinoGeek! - Fixed #11962:noUnknownTypeSelectorno longer reports view transition names inside view transition pseudo-elements, such aspagein::view-transition-group(page). -
#11914
06ff47bThanks @dyc3! - Fixed #11897: the safe fix fornoUselessStringConcatnow escapes embedded double quotes when combining literals, preserving valid JavaScript and existing escape sequences. -
#11997
af7825fThanks @github-actions! - The noRestrictedDependencies rule has been updated with new module replacement data, it should now detect for more relevant replacements. -
#11827
31bb662Thanks @dfedoryshchev! - Fixed #11566:useNamingConventionno longer reports anamespacedeclared insidedeclare globalor inside an external module declaration. Both positions are documented as always ignored, and the rule offered a safe fix, sobiome check --writerenamed the declaration:export {}declare global {// no longer renamed to `Jsx`namespace JSX {}} -
#11814
23ba25fThanks @siketyan! - Fixed type inference through generic type aliases that instantiate another generic type with a nested generic argument, such astype Nested<T> = Box<Wrapper<T>>. Type-aware rules now resolve members of such types:declare const nested: Nested<number>;// noUnnecessaryConditions now reports that `??` is unnecessary.const inner = nested.value.inner ?? 1; -
#11908
dd5a5ceThanks @siketyan! - Fixed #11880: Biome no longer misparses a<<expression followed by a later>>>as TypeScript type arguments. For example,const mask = 1 << bitsfollowed byconst m = mask >>> 0on the next line now parses correctly. -
#11882
28c817dThanks @mikehasa! - Fixed a bug innoOctalEscapewhere the safe fix could silently change a string’s value. A legacy octal escape is at most two digits when the leading digit is4-7, so"\751"is"\75"+"1"(i.e."=1") but was rewritten to the single characterǩ; it is now rewritten to"\x3d1". -
#11861
81b0adbThanks @Netail! - Added the new nursery rulenoSelfImport, which forbids a module from importing itself.foo.js import foo from "./foo.js"; -
#12041
5e14509Thanks @ematipico! - Fixed a stack overflow in type-aware lint rules, such asnoMisusedPromisesandnoFloatingPromises, when generic types in files that import each other reference one another in their type parameters.entity.ts import type { Repository } from "./repository";export interface Entity<R extends Repository<any> = Repository<any>> {}// repository.tsimport type { Entity } from "./entity";export interface Repository<E extends Entity<any> = Entity<any>> {} -
#11838
9bbff0cThanks @dyc3! - Added the nursery ruleusePromiseRejectErrors, which requires Error objects as Promise rejection reasons.Promise.reject("Request failed");new Promise((resolve, reject) => reject(42)); -
#11917
717db8cThanks @dyc3! - Added the nursery rulenoMisplacedListElementsfor HTML and JSX, which requires<li>elements with an HTML element parent to be children of<ul>,<ol>, or<menu>. For example,<div><li>Item</li></div>is invalid. -
#11919
8d0b990Thanks @dyc3! - Fixed #11899: disabling a domain no longer disables rules that also belong to another enabled domain. For example, with"domains": { "react": "all", "next": "none" },useExhaustiveDependenciesanduseHookAtTopLevelare now enabled. Rules enabled explicitly in the configuration also stay enabled when one of their domains is set to"none". -
#11814
23ba25fThanks @siketyan! - Fixed #11810 and #11813: type-aware rules such asnoUnnecessaryConditionsandnoFloatingPromisesno longer take several seconds when a member is accessed on a recursive generic type alias, such as react-hook-form’sFieldPathValueor zustand’sMutate. -
#11983
cc39794Thanks @AlbinoGeek! - Fixed #11939: the fix ofuseRegexLiteralsno longer escapes a slash that is already escaped.new RegExp("\\/")is now fixed to/\//instead of the invalid/\\//. -
#11869
3a21c80Thanks @ematipico! - Fixed#9105:vcs.useIgnoreFilenow evaluates parent directory patterns when matching child paths, preserving re-included directories such as!/srcwhile ignoring their excluded siblings. -
#11875
2cdd220Thanks @dyc3! - Fixed #11867:noUndeclaredVariablesincorrectly reported Vue slot props declared withv-slotor its#shorthand, including destructured props. -
#12021
59cc595Thanks @dyc3! - Type inference accuracy has been improved significantly. More global types, likeArray,Map,Set, etc., are now fully defined. This should decrease false positives on all typed rules, since less types will be unknown. -
#11929
aef690dThanks @Th3S4mur41! - FixednoUnknownPropertyto recognize theframe-sizingCSS property. -
#12022
6233eb2Thanks @dyc3! - Fixed #12020: the HTML parser now reports an error for a mismatched closing tag like the</span>in<p>two</span></p>. Previously, it accepted</span>as the end of<p>becausespancontains the letterp, and the formatter deleted everything after it. HTML tag names are matched case-insensitively, so<DIV></div>is no longer reported as mismatched.A closing tag with no opening tag at the top level of a file, like the second
</p>in<p>a</p></p><p>b</p>, is now also reported as an error, instead of the formatter deleting it and everything after it. -
#12037
48cdbb8Thanks @ff1451! - Fixed #11898:noUselessReturnno longer offers a safe fix for areturn;that is the body of an unbracedif,else, or label, because removing it produced invalid code. The safe fix now also keeps comments placed before or after the removedreturn;.function foo() {// Still reported, but the return is no longer removedif (aborted) return;} -
#12030
4ff83ddThanks @ematipico! - Fixed #9155: Biome no longer reports a parse error for typed slot props in Vue files, such asv-slot="{ value }: { value: ValueType }". Types used in slot props annotations are now correctly detected as used bynoUnusedVariables. -
#11955
088164fThanks @dyc3! - Fixed #11946:noUnreachableanduseGetterReturnnow recognizewhileanddo...whileloops with truthy literal conditions as infinite unless control flow exits the loop. -
#11958
6964bfcThanks @erenbati! - Fixed #11924:noFocusedTestsno longer reports chained method calls such asbuilder.image(url).fit("max")as focused tests. -
#11908
dd5a5ceThanks @siketyan! - Fixed parsing of left shifts between TypeScript instantiation expressions. Biome now parsesf<T> << f<T>as a left shift of two instantiation expressions, matching TypeScript, instead of reporting a parse error. -
#11877
5a53b2cThanks @dyc3! - Fixed #11278:noUnnecessaryConditionsno longer incorrectly reports optional chaining onRegExp.exec()results, including patterns created withnew RegExp(). Biome now infers the nullableRegExpExecArray | nullreturn type, preserving necessary checks such asnew RegExp(pattern).exec(input)?.[1]. -
#11906
b87822dThanks @dyc3! - Fixed #11900:useForOfno longer reports loops that update their index inside the body, includingi += 1andargv[++i]. -
#11834
f89dd4fThanks @dyc3! - Fixed incorrect type inference when generic parameters are reused across inherited types or swapped in recursive types.
2.5.14
Patch Changes
-
#9022
0d49e24Thanks @dyc3! - Added the nursery rulenoReturnInFinally. This rule disallows return statements inPromise.prototype.finally()callbacks, including inside nested blocks and conditional branches. Returns in nested functions are ignored by the rule.// Invalid: return in finally callbackPromise.resolve(1).finally(() => { return 2 })// Valid: no return in finally callbackPromise.resolve(1).finally(() => { console.log(2) })Returning a value from a
Promise.prototype.finally()callback does not replace the original promise’s fulfillment value, which can be confusing. Returned promises and thenables are awaited, and their rejection rejects the resulting promise. -
#11754
71eaa0dThanks @griff-rees! - Added the nursery rulenoSvelteAtDebugTags, which disallows Svelte’s{@debug}tag.<!-- Invalid: leftover debugging tag -->{@debug user}The
{@debug}tag is a debugging aid and should be removed once you no longer need it, as it should not remain in production code. The rule provides a safe fix that removes the tag. -
#11725
5eb5f09Thanks @m1handr! - Added the nursery ruleuseValidTestTitle, which enforces valid titles for unit test cases and suites. -
#11735
9bd70c7Thanks @ematipico! - Fixed #8471:source.fixAll.biomeignoredformatter.formatWithErrors. It now applies safe fixes without formatting files that have parse errors when the option is disabled. -
#11715
f05a3c3Thanks @ematipico! - Fixed #7771: Grit plugins that usesequentialno longer panic when Biome processes files. -
#11766
c2542c6Thanks @dyc3! - Fixed validation ofreadonlyandaccessormodifiers: combining them in either order now reports that they cannot be used together. -
#11461
22e9966Thanks @FoundDream! - Fixed #11423: Multiline template interpolations now preserve the indentation of their closing brace when the source indentation is not a multiple oftabWidth.const value = `${condition? "yes": "no"}}`; -
#11766
c2542c6Thanks @dyc3! - Fixed #11763: TypeScript class members usingoverride accessor, such asoverride accessor value = 1, now parse correctly. The reversed order,accessor override, now reports thatoverridemust precedeaccessor. -
#11790
17d0ff0Thanks @ematipico! - Fixed #10248:noUselessFragmentsnow allows fragments with props in Astro files, such as<Fragment slot="name">{text}</Fragment>inside template expressions. -
#11777
7ee3a6cThanks @ematipico! - Fixed #7573: added therequireExplicitCaseoption touseExhaustiveSwitchCases. When set totrue, the rule reports missing cases even when the switch has adefaultclause, so you can keep a runtime fallback while checking that every value in the union has its own case. The option defaults tofalse. -
#11751
d37f24bThanks @ematipico! - Fixed #8347: the fix fromuseConsistentArrowReturnnow parenthesizes returned expressions that begin with object literals before removing the arrow function body braces, preventing invalid output for expressions such as object property access. -
#11784
46e8912Thanks @dyc3! - Fixed #11782:noUndeclaredCustomPropertiescould hang while checking stylesheets imported by JavaScript modules with many shared dependencies. -
#11731
1534885Thanks @ematipico! - Fixed #7984: The fix fromuseSimplifiedLogicExpressionnow preserves line breaks in multiline conditions with line comments, preventing the right-hand side condition from being commented out. -
#11735
9bd70c7Thanks @ematipico! - Fixed #7304: the HTML formatter now preserves authored segment breaks between CJK characters, and next to CJK punctuation, instead of replacing them with spaces.<div lang="zh-Hant-TW">這個段落是那麼長, 在一行寫不行。這個段落是那麼長,在一行寫不行。</div> -
#11749
ff992a1Thanks @ematipico! - Fixed #11747: formatting and checking large parenthesized object expressions no longer exhibit quadratic slowdowns. -
#11736
1dd1fc4Thanks @dyc3! - Fixed #8177: code actions no longer modify the wrong part of Vue, Svelte, or Astro files when experimental full HTML support is disabled. -
#11743
3835945Thanks @santichausis! - Fixed #10247:biome check --write/biome lint --writenow correctly writes fixes for code inside an HTML attribute expression (for example a Svelteonclick={...}handler, or a mustache expression like{count}), instead of silently reporting the diagnostic as fixable and applying nothing.For example, running
biome lint --write --unsafeforuseBlockStatements(an unsafe fix) on this Svelte component used to leave the file unchanged:<button onclick={() => { if (open) close(); }}>Close</button> -
#11740
8ea8b4aThanks @dyc3! - Fixed #11453:useConsistentTestItnow updates imports alongside calls, preserving the original export through an alias. The rule ignores locally declared functions and withholds fixes when the preferred name would conflict with another binding or global reference. -
#11355
27177caThanks @dyc3! - Fixed the HTML formatter incorrectly applying native HTML element formatting to PascalCase component names such as<Ul>and<Body>in Vue, Svelte, and Astro files.<Body><div>content</div></Body><Body><div>content</div></Body> -
#11355
27177caThanks @dyc3! - Fixed the HTML formatter incorrectly applying SVG block formatting to unknown elements whose names matched SVG element names.<foreignobject><div>content</div></foreignobject><foreignobject><div>content</div></foreignobject> -
#11741
fc69047Thanks @dyc3! - Fixed #8893:useImportExtensionsno longer suggests adding.tsto.jsximports when a colocated.d.tsfile provides type declarations. -
#11642
c87341cThanks @dyc3! - Added the nursery rule useConsistentFunctionStyle, which requires a consistent style for defining functions.By default, the rule reports the following declaration because it requires a function expression assigned to a variable:
function greet() {return "Hello";} -
#11770
ddfd622Thanks @dyc3! - Fixed #8980: suppression comments targeting the entireassistcategory are now respected, includingbiome-ignore-all assistwhen runningcheck. -
#11792
7a4b895Thanks @dyc3! - Fixed dashed utility base names in the Tailwind parser, includingborder-bs,font-features, andscrollbar-thumb. Classes such asmin-inline-[12rem]now preserve the complete base name and parse the arbitrary value separately. -
#11739
1fc17e3Thanks @Netail! - The ruleuseIncludesnow also reportslastIndexOf()comparisons andsome()calls with a strict-equality callback.arr.lastIndexOf(x) !== -1arr.some(item => item === x) -
#11735
9bd70c7Thanks @ematipico! - Fixed #6888. GritQL plugins can now usecontainson import-clause metavariables such as$clauseinimport $clause from "module"patterns. -
#11790
17d0ff0Thanks @ematipico! - Fixed #11786:useAnchorContentnow reports anchors without accessible content in HTML, Astro, Vue, and Svelte even when they have anaria-label,aria-labelledby, ortitleattribute, matching JSX behavior. -
#11651
a9c4aa0Thanks @saberoueslati! - Added the new nursery rulenoVueUndeclaredDirectives, which reports custom Vue directives that are not declared by a<script setup>binding, the component’sdirectivesoption, or the rule’sglobalsoption. Closes #11478.<template><!-- v-highlight is not declared anywhere --><div v-highlight></div></template>Aliased named imports in single-file components are now tracked under their local name, so
noUndeclaredVariablesrecognizesvHighlightinimport { highlight as vHighlight } from "./directives". -
#11715
f05a3c3Thanks @ematipico! - Fixed #7795. ThenoJsxLiteralsrule now ignores surrounding whitespace when matching literals againstallowedStrings. -
#11780
99c7049Thanks @ematipico! - Fixed false positives inuseExhaustiveSwitchCaseswhen numeric cases use different spellings of the same value. For example,case 0x1now covers the numeric literal type1. -
#11720
c7c4e2bThanks @ematipico! - Fixed #7880:noUselessStringConcatno longer reports literal concatenations split across multiple lines when a numeric literal ends the chain. -
#11355
27177caThanks @dyc3! - Improved performance of the HTML formatter for documents that contain many HTML-native or SVG-native tags. -
#11720
c7c4e2bThanks @ematipico! - Fixed #7949:useReadonlyClassPropertiesnow reports static class properties that are never reassigned. -
#11751
d37f24bThanks @ematipico! - Fixed #7644:useImportExtensionsnow resolves path aliases declared by referenced TypeScript project configurations. -
#11791
f88793cThanks @dyc3! - Fixed a false positive inuseTailwindShorthandClassesfor strings in conditional tests, such ascn(m === "w-2 h-2" ? "bg-red-800" : "bg-red-400"). -
#11720
c7c4e2bThanks @ematipico! - Fixed #7783:noNoninteractiveElementInteractionsno longer reports event handlers on native<dialog>elements. -
#11733
7030068Thanks @dyc3! - Fixed #11730:useExhaustiveSwitchCasesreports missing cases when iterating over a class property withfor...of. -
#11717
2107daeThanks @ternaus! - Fixed #11716: thenoUnknownAttributerule now accepts fullscreen event handlers, thecredentiallessiframe property, and the SVGmaskTypeproperty when the React dependency range allows React 19.3 or later. ThecredentiallessandmaskTypeproperties are restricted to<iframe>and<mask>elements, respectively. -
#11737
b7e3559Thanks @dyc3! - Fixed #11692:noFloatingPromisesnow detects unhandled promises returned through generic method signatures, including Playwright fixtures. -
#11780
99c7049Thanks @ematipico! - Fixed #7747:useExhaustiveSwitchCasesnow reports missing cases for literal unions derived from const tuples with(typeof values)[number]and objects withkeyof typeof object.Other type-aware rules, including
noFloatingPromisesandnoUselessTypeConversion, also recognize supported indexed-access results. -
#11724
a9a5e9aThanks @dyc3! - Fixed redundant parentheses around binary and logical unary operands with leading line comments.!(// leading(a || b)a || b); -
#11715
f05a3c3Thanks @ematipico! - Fixed #7722:noUnusedImportsno longer reports type-only imports used in computed names of declared class properties. -
#11731
1534885Thanks @ematipico! - Fixed #6390: Biome now offers suppression actions fornoDynamicNamespaceImportAccessin editors. -
#11751
d37f24bThanks @ematipico! - Fixed #7533:noDescendingSpecificityno longer compares selector specificity across separate cascade layer blocks. -
#11735
9bd70c7Thanks @ematipico! - Fixed #6206:useUniqueElementIdsno longer reports static IDs on elements in SVG contexts.<svg><defs><pattern id="dots" width="10" height="10" /></defs><rect fill="url(#dots)" width="100%" height="100%" /></svg> -
#11715
f05a3c3Thanks @ematipico! - Fixed #5447, so the GitHub reporter now associates annotations with the correct files when Biome runs from a nested directory. -
#11720
c7c4e2bThanks @ematipico! - Fixed #7816:useHookAtTopLevelno longer reports methods named like hooks when called on another function’s result, such asReactotron.configure(...).useReactNative(...). -
#11355
27177caThanks @dyc3! - Removed special HTML formatter handling for the obsolete<listing>element. -
#11731
1534885Thanks @ematipico! - Fixed an issue where Grit plugin code fixes weren’t available as editor code actions. -
#11726
dea163fThanks @dyc3! - Fixed #11722: the JavaScript formatter inserts a newline before the closing angle bracket when a leading comment forces type arguments onto multiple lines.type Foo = Record<// commentstring,number>;number>; -
#9758
02ea438Thanks @Netail! - Added the nursery rulenoJsonUnsafeValues, which disallows JSON values that are unsafe to use between different tools or languages.Invalid:
[2e308, // Number evaluating to Infinity-2e308, // Number evaluating to -Infinity"\ud83d", // String with lone surrogate1e-400, // Unsafe zero (too small, will evaluate to 0)9007199254740992, // Unsafe integer (outside safe integer range)2.2250738585072009e-308, // Subnormal number] -
#11790
17d0ff0Thanks @ematipico! - Fixed #8574: the JavaScript formatter sometimes added extra parentheses and moved comments when formatting multiline expressions after operators such as!. Comments now stay beside the values they describe, without an extra pair of parentheses.!((cond1 || // force this to be multi linecond3) // commentcond1 || // force this to be multi linecond3 // comment); -
#11715
f05a3c3Thanks @ematipico! - Fixed #7711:biome lint --suppressno longer fails with conflicting rule fixes when multiple diagnostics target a declaration preceded by a multiline comment. -
#11700
0e9fe53Thanks @dyc3! - Added the nursery rulenoObsoleteTags, which reports obsolete HTML elements in HTML and JSX, such as<font color="red">Text</font>. -
#11735
9bd70c7Thanks @ematipico! - Fixed #7363: Biome GritQL plugins now match TypeScript interface snippets such asinterface $name { $body }. -
#11729
f047985Thanks @m1handr! - Added support forsuite()as an alias ofdescribe()across test analysis rules and formatter. Rules now recognizesuite,fsuite,xsuite, andtest.suiteblocks. The formatter recognises them as test declarations. -
#11778
4b7aa1fThanks @ematipico! - Fixed #7727: GritQL snippets such asimport $what from $wherenow match namespace imports, including type-only imports. Explicitimport type $what from $wherepatterns also match type-only named and namespace imports. -
#11715
f05a3c3Thanks @ematipico! - Fixed #7603:useSingleJsDocAsteriskno longer reports asterisks that are part of JSDoc comment content, such as italic text, as extra line markers. -
#11706
e19512aThanks @dyc3! - Fixed #11704: files re-included by negation patterns in a nested.gitignoreare processed whenvcs.useIgnoreFileis enabled, even when the ignore file contains*. -
#11718
76a302aThanks @dyc3! - Fixed #8573: own-line comments before binary operators stay above the operator whenjavascript.formatter.operatorLinebreakis"before".foo|| // commentbar;// comment|| bar; -
#9797
64fd314Thanks @Netail! - Added the nursery ruleuseConsistentObjectKeys, which requires JSON object keys to follow a consistent Unicode representation.
2.5.13
Patch Changes
-
#11379
07a0073Thanks @Netail! - Added the nursery ruleuseLayeredStyles, which enforces that style rules are defined within a cascade layer and import rules to import its styles into a cascade layer./* Invalid */@import 'foo.css';.my-style {color: red;}/* Valid */@import 'foo.css' layer(base);@layer base {.my-style {color: red;}} -
#11667
e997900Thanks @devtechedge! - Added the nursery ruleuseBetterDomTraversing, which prefers.firstChild,.firstElementChild,.closest(), and merged.querySelector()calls over positional DOM traversal.element.childNodes[0];element.children[0];element.parentElement.parentElement;element.querySelector("a").querySelector("b"); -
#11620
20e513aThanks @jakeleventhal! - Fixed #11610, #11611, #11612, #11615, and #11616: Biome no longer fully infers an imported generic declaration just to apply its type arguments, restoring type-aware lint performance for large libraries such as Zod. This improvesuseRegexpExec,noFloatingPromises,noMisusedPromises,useNullishCoalescing, andnoUnsafePlusOperands. -
#11657
e322040Thanks @ematipico! - Fixed #7495:noUselessConstructornow ignores TypeScript constructors that forward at least one argument tosuper, preserving constructors that narrow the subclass’s accepted parameter types. The exemption also applies when the parent and child signatures are identical; JavaScript and zero-argument forwarding behavior are unchanged. -
#11670
4969ee1Thanks @ematipico! - Fixed #7076:useAriaPropsForRoleanduseFocusableInteractiveno longer report non-focusable elements withrole="separator". A separator with an explicittabIndexortabindexstill requiresaria-valuenow. -
#11627
23aad6dThanks @ematipico! - Fixed #6571 so Grit plugins can capture and inspect multiple named import specifiers. -
#11631
00dbd3aThanks @ematipico! - Reduced unnecessary type inference when type-aware lint rules inspect members of namespace imports from libraries such as Zod. Fixed type inference so blanket re-exports do not expose default exports. -
#11628
a2f8ff7Thanks @dyc3! - Added the nursery rulenoXorAsExponentiation, which reports the bitwise XOR operator^between two decimal integer literals, where the exponentiation operator**was likely intended.const kibibyte = 2 ^ 10; // 8, not 1024 -
#11670
4969ee1Thanks @ematipico! - Fixed #7192:noUnusedPrivateClassMembersnow considers compound assignments such as??=to read and use private class members. -
#11676
840a52aThanks @dyc3! - Fixed #11672 and #11671 by disabling the experimental capitalized-call and effect-dependency checks inuseReactCompiler, matching their exclusion from upstream’s recommended lint preset. Valid calls such asIntl.NumberFormat()and captures of variables declared inside effects no longer produce these diagnostics. -
#11660
49485edThanks @ematipico! - Fixed #11653: Astro template suppression comments ({/* biome-ignore lint: reason */}) now suppress matching HTML lint diagnostics on the following line when full HTML support is enabled. -
#11664
9a73b9cThanks @dyc3! - Improved the performance ofuseRegexpExec. -
#11661
5341b3fThanks @ematipico! - Fixed #7479.noUnusedVariablesnow treats Unicode escapes in identifiers as the same binding as their decoded spelling. -
#11630
62e1fc5Thanks @dyc3! - Fixed the HTML formatter inserting whitespace between adjacent Svelte expressions when their combined length exceeds the line width.<span>{head.median - base.median >= 0 ? "+" : "−"}{formatMs(Math.abs(head.median - base.median))}{head.median - base.median >= 0 ? "+" : "−"}{formatMs(Math.abs(head.median - base.median))}</span> -
#11658
ed4bfa4Thanks @fredrikblau! - Fixed #11644:useHeadingContentno longer reports headings that render their text with a directive:set:htmlandset:textin Astro files,v-htmlandv-textin Vue files.<h1 set:html={heading} /><h2 set:text={heading}></h2><template><h1 v-html="heading"></h1><h2 v-text="heading"></h2></template> -
#11613
47d7383Thanks @ematipico! - Improved the performance of Biome Formatter up to ~50% in some cases. -
#11655
fd8fc74Thanks @ematipico! - Fixed #6974, wherenoUnusedPrivateClassMembersincorrectly reported TypeScript private constructor properties read through object destructuring fromthisas unused. -
#11618
21a10cfThanks @siketyan! - Fixed #11605: Type inference now infers the type of an unannotated callback parameter from the signature of the function the callback is passed to, and honours explicit type arguments on call expressions. This improves type-aware analysis fornoBaseToString,noFloatingPromises,noMisleadingReturnType,noMisusedPromises,noUnnecessaryConditions,noUnsafePlusOperands,noUselessTypeConversion,useArrayFind,useArraySortCompare,useAwaitThenable,useDisposables,useExhaustiveSwitchCases,useIncludes,useNullishCoalescing,useRegexpExec, anduseStringStartsEndsWith. For example,noFloatingPromisescan now detect Promises reached through such parameters:interface Context {doSomething(): Promise<void>;}declare function test(callback: (ctx: Context) => Promise<void>): void;test(async (ctx) => {ctx.doSomething(); // now reported as a floating promise}); -
#11698
b019982Thanks @denbezrukov! - Fixed parsing of unquoted CSS URLs beginning with@or!, such asurl(@/assets/icon.svg)andurl(!font.woff2). Preserved escaped and non-ASCII whitespace in raw URLs during formatting.background-image: url(image\);background-image: url(image\ ); -
#11622
c23e4c7Thanks @Netail! - Added the nursery rulenoUnsafeIframeSandbox, which reportsiframeelements whosesandboxattribute combinesallow-scriptsandallow-same-origin, since that combination lets the embedded document remove its own sandboxing.<iframe src="https://example.com" sandbox="allow-scripts allow-same-origin" /> -
#11606
de0528fThanks @dyc3! - Added the recommendednoSvelteAtHtmlTagsnursery rule, which reports Svelte{@html}tags that render unescaped HTML. -
#11670
4969ee1Thanks @ematipico! - Fixed #6782: GritQL plugins now match captured JSX component names against code snippets such asReact.Fragment. -
#11687
09d97d9Thanks @hori-design! - Fixed #11678:useReactCompilerno longer panics on files that contain non-ASCII characters. This bumps the React Compiler version. -
#11595
a64d757Thanks @dyc3! - Added the nursery Vue-domain ruleuseVueBaseImportrule, which enforces importing Vue APIs fromvueinstead of internal@vue/*packages. -
#11675
353cbaeThanks @dyc3! - FixeduseReactCompilersilently producing no diagnostics in WebAssembly builds, including the playground. -
#11625
ea20e5aThanks @denbezrukov! - Improved linting performance for large CSS and JSON files. -
#11670
4969ee1Thanks @ematipico! - Fixed #7527: suppression actions for diagnostics emitted on comments are now inserted before the diagnostic comment. In particular, suppressingnoTsIgnorenow places thebiome-ignorecomment before@ts-ignore. -
#11655
fd8fc74Thanks @ematipico! - Fixed #8629, wherenoUnusedPrivateClassMembersincorrectly reported used private TypeScript method overload signatures as unused. -
#11669
579f401Thanks @denbezrukov! - Improved the performance ofnoExcessiveLinesPerFilewhenskipBlankLinesisfalse.
2.5.12
Patch Changes
-
#11440
b88f1eaThanks @Princesseuh! - Fixed Astro attribute expressions rejecting TypeScript and JSX syntax that is accepted in text expressions.<Component icon={<Icon />} count={total as number} onSelect={(e: Event) => e} /> -
#11440
b88f1eaThanks @Princesseuh! - Fixed Astro attribute names being split on:and.inside an expression, such as{x && <button x-on:keyup.enter={go} client:load.foo />}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed a bare>in the children of an Astro expression being treated as markup, such as{x && <div>a > b</div>}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed HTML comments inside an Astro expression failing to parse. They are now read as trivia, wherever they appear among the children.{x && <div><!-- first -->text<!-- last --></div>}{cond && <a></a><!-- c --><b></b>} -
#11440
b88f1eaThanks @Princesseuh! - Fixedis:rawchildren inside an Astro expression being read as JSX, such as{x && <div is:raw>{not js} < & text</div>}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed an apostrophe or quote in the text of a JSX element inside an Astro expression ending the expression early, such as{items.map((i) => <li>it's {i}</li>)}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed the children of a<script>or<style>inside an Astro expression being read as JSX. Their contents are text, so braces and comparisons no longer have to be escaped.{cond && <style>a { color: red }</style>}{cond && <script>let x = {a: 1};</script>} -
#11440
b88f1eaThanks @Princesseuh! - Added support for template literal attribute values inside an Astro expression, such as{x && <C data-x=`t${x}` />}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed unquoted attribute values being rejected inside an Astro expression, such as{x && <a class=foo maxlength=255 href=/about>go</a>}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed a template literal nested inside${}breaking the rest of an Astro file, such asconst href = `/blog${page === 0 ? '' : `/${page + 1}`}`;. -
#11440
b88f1eaThanks @Princesseuh! - Fixed a quote inside a regex character class breaking the rest of an Astro file, such asconst unsafe = /[/"]/;. -
#11508
54f3a2eThanks @dyc3! - Added the nursery ruleuseFlatMathMinMax. BecauseMath.min()andMath.max()accept any number of arguments, the rule reports unnecessary nested calls to the same method:Math.max(Math.max(a, b), c);The fix flattens this expression to
Math.max(a, b, c). -
#11585
c5c8315Thanks @Netail! - Fixed #11475:noUnresolvedImportsno longer reports Bun runtime built-in modules (bun,bun:bundle,bun:ffi,bun:jsc,bun:sqlite,bun:test). -
#11368
52a57b3Thanks @Austin1serb! - Fixed #6830: Biome now reports a diagnostic for excessively deep syntax instead of overflowing the native stack while releasing the parsed tree. -
#11596
1fc42edThanks @dyc3! - Added the nursery rulenoThisOutsideOfClass. The rule reportsthisoutside class members and TypeScript functions with an explicitthisparameter.function Person(name) {this.name = name;} -
#11555
2516335Thanks @dyc3! - Fixed #11529, wherenoFloatingPromisesmissed unhandled Promise chains when the imported function’s module belonged to an import cycle. Cyclic modules now preserve types for exports that do not participate in recursive type dependencies. -
#11518
0fee70cThanks @HarperZ9! - Fixed #11500: the formatter now prints thedeclaremodifier before accessibility modifiers on class properties.private declare readonly name: stringis now formatted asdeclare private readonly name: string, matching Prettier and TypeScript’s canonical modifier order. -
#11580
1277af2Thanks @ematipico! - Fixed #5091: Biome no longer moves comments next to the<of a generic, which causes invalid TypeScript syntax:Generic<// a commentGeneric<// a comment -
#11577
42995d2Thanks @ematipico! - Fixed #4592. Biome no longer crashes while parsing malformeddeleteexpressions. -
#11590
67963b4Thanks @ematipico! - Fixed #6427 so Grit plugins can usefunction = ...as a node argument. -
#11600
a689cb5Thanks @ematipico! - Fixed #6644:noUnusedVariablesnow recognizes all interface declarations in a TypeScript declaration-merging group when the interface is referenced.The following snippet no longer triggers the rule.
interface Things {foo: string;}interface Things {bar: string;}export type Key = keyof Things;interface Things {baz: string;} -
#11591
d4a0716Thanks @ematipico! - Fixed #6615.noDuplicatePropertiesno longer reports declarations nested in block at-rules as duplicates of declarations in their parent block. -
#11492
f2a07aaThanks @santichausis! - Fixed #11454:noMisplacedAssertionnow recognises@fast-check/vitest’stest.prop(...)(and.concurrent.prop,.skip.prop, etc.) as a test function, the same way it already recognisestest.each. The JS formatter picks up the same recognition, so a curriedtest.prop(...)(...)call is now formatted with the regular breakable argument layout used fortest.each/test.for, instead of the single-line-hugging layout used for plainit/testcalls.For example, Biome no longer reports the assertion below as misplaced:
import { fc, test } from "@fast-check/vitest";test.prop([fc.string()])("round-trips", (s) => {expect(s).toBe(s);}); -
#11589
65742b3Thanks @ematipico! - Fixed #4928:noUnusedVariablesno longer reports a value declaration as unused when its merged namespace is referenced. -
#11559
472dbc2Thanks @levrik! - Fixed a false positive innoVueDuplicateKeyswhere a<script setup>variable initialized frompropswas reported as a duplicate of the prop it derives from. Biome now exempts any variable whose initializer referencesprops, instead of only recognizingdefineProps()andtoRefs(props).For example, Biome no longer reports
foobelow as a duplicate key:<script setup>import { toRef } from 'vue';const props = defineProps(['foo']);const foo = toRef(props, 'foo');</script> -
#11594
6586cebThanks @ematipico! - Fixed #6640. Biome no longer crashes when linting malformedfor...ofstatements. -
#11571
85b197dThanks @ematipico! - Fixed #10838:useSortedAttributesno longer corrupts JSX attributes when nested JSX elements also require sorting. -
#11533
97e76c0Thanks @ematipico! - Fixed #11520, where the Biome scanner would start analysing dependencies multiple times, leading to long and unresponsive sessions. -
#11564
18a0e1fThanks @Netail! - Fixed the diagnostic range ofnoInferrableTypesso it now highlights only the type instead of including the leading:colon, spaces and comments. -
#11540
124fdaaThanks @ematipico! - Fixed#11537:noShorthandPropertyOverridesnow compares declarations only within the same block. The rule no longer reports@supportsfeature queries and correctly checks nested,@keyframes, and@pageblocks. -
#11532
7ceb0eeThanks @dyc3! - Fixed #11528:noFloatingPromisesno longer reports statement-levelawaitexpressions that handle Promise values, including overloaded calls returning Promise aliases. Awaited values that resolve to arrays of Promises remain reported because their element Promises are not handled byawait. -
#11474
3c6412eThanks @dyc3! - Fixed #10241. Biome no longer reports unsupported text expression diagnostics for double-curly text in vanilla HTML, and the formatter preserves adjacent curly-brace text. -
#11593
6c7fd27Thanks @dyc3! - Added the nursery rulenoVueDeprecatedScopedSlots. It reports deprecated$scopedSlotsreferences in Vue templates and component objects, and offers an unsafe replacement with$slots. For example, Biome now reportsthis.$scopedSlots.defaultinside a Vue component. -
#11440
b88f1eaThanks @Princesseuh! - Fixed the formatter crashing on an Astro or Svelte expression spanning several lines in a file with CRLF line endings, such as<p>{a +\r\n b}</p>. -
#11581
f4e5ebbThanks @dyc3! - Added the nursery ruleuseModernMathApis. The rule reports legacy mathematical patterns that have direct modernMathequivalents.Math.sqrt(a * a + b * b); -
#11597
a20f44aThanks @Netail! - Added the nursery rulenoBunModules, which forbids the use of Bun builtin modules (e.g.bun:sqlite,bun:ffi). -
#11545
7d54688Thanks @dyc3! - Fixed #11542: Biome now reports HTML comments between Svelte tag attributes as parse errors. -
#11582
b6611ddThanks @ematipico! - Fixed #3862. Biome now parses legacy Internet Explorerfilterand-ms-filtervalues such asprogid:DXImageTransform...andalpha(opacity=40). -
#11575
65da251Thanks @dyc3! - Improved the Tailwind parser’s ability to recover from parsing failures. Whitespace now always allows the parser to recover and start parsing a new class. -
#11576
0f78499Thanks @ematipico! - Fixed #3515 and #10395, where Biome could corrupt Unicode characters while writing source received through standard input to standard output. Characters such as⚠and✔are now preserved. -
#11539
0fca643Thanks @ematipico! - Fixed #11512, wherestyle/noDescendingSpecificitymissed lower-specificity selectors after a later higher-specificity selector with the same tail selector. -
#11544
040f867Thanks @dyc3! - Fixed #11541: formatting a Svelte render tag followed by an HTML comment no longer duplicates the comment.<div>{@render children?.()}<!-- comment --><!-- comment --></div> -
#11565
ee69e0eThanks @ematipico! - Fixed #11525. Now the configuration schema correctly provides auto-completion for linter domains. -
#11583
b19390cThanks @dyc3! - Fixed #11352:useExplicitLengthCheckno longer reportslength-like properties used as value-producing||fallbacks or optional chains, and it no longer offers fixes for value-producing&&checks or unsafe negations. -
#11562
753e955Thanks @ematipico! - Fixed an issue where the Biome Language Server would start with logging level set to debug. This would cause logs to grow exponentially in long sessions. -
#11217
7d3ee9cThanks @dyc3! - Fixed handling ofbiome-ignore formatsuppression comments on TypeScript declared class properties with string literal names.class A {declare /* biome-ignore format: exercise suppression checking */ 'a-b': 0;} -
#11497
f5d7896Thanks @dyc3! - Added thenoInvalidFileInputAcceptnursery rule. The rule reports invalid literalacceptvalues on file inputs in JSX and HTML, and normalizes common mistakes.<input type="file" accept="image/jpg" /> -
#11345
ac58958Thanks @jakeleventhal! - Improved type inference performance by avoiding resolution of unused members in object arguments. -
#11554
2d55931Thanks @Netail! - Added the new nursery ruleuseReactNamingConvention, which enforces naming conventions for React values assigned fromcreateContext,useId, anduseRef. A value fromcreateContextmust be a PascalCase component name ending withContext, a value fromuseIdmust be namedidor end withId, and a value fromuseRefmust be namedrefor end withRef. -
#11491
1d6210bThanks @dyc3! - Added the nursery rulenoUnmodifiedLoopCondition, which reports variables in loop conditions that are never modified in the loop.let node = getNode();while (node) {process(node);}
2.5.11
Patch Changes
-
#11499
9743d0cThanks @scs0209! - Fixed #11496:useValidAnchornow treats Astro JSX shorthand attributes like<a {href}>as a validhref. -
#11437
88f805eThanks @Princesseuh! - Fixed #9944: adjacent elements inside an Astro expression now parse as an implicit fragment instead of raising an error.{options.map(() =><div /><div />)} -
#11437
88f805eThanks @Princesseuh! - Fixed Astro templates rejecting unclosed HTML void elements, such as{cond && <br>}. -
#11507
e2fc036Thanks @dyc3! - Fixed #11157:noUnusedVariablesno longer reports Vue<script setup>bindings used by CSSv-bind()as unused. -
#11398
afc4615Thanks @dyc3! - Fixed #11389: Files passed through--stdin-file-pathnow use full HTML support for Astro, Svelte, and Vue when it is enabled. -
#11526
372cd68Thanks @dyc3! - FixednoVueRefAsOperandto track Vue refs through declaration aliases andtoRefs()properties, and to recognizeuseTemplateRef()results. The rule no longer reports false positives such as plain ref transfers, plaintoRefs()property access,defineModel()modifiers, or the supported.effectmember as operands.The refactor enabling these fixes also improves the performance of the rule.
-
#11458
a7cd286Thanks @dyc3! - Fixed #11436: GritQL snippets such asexport { $specifiers } from $sourcenow match named re-exports with aliases, inlinetypemodifiers, and multiple specifiers. -
#11515
382b15dThanks @dyc3! - Fixed #11390, wherenoFloatingPromisesperformed expensive full type inference for calls to non-Promise methods declared on third-party TypeScript classes. The rule now classifies those calls using targeted type information. -
#11516
6f40e82Thanks @levrik! - FixednoVueRefAsOperandso it no longer reports a callback parameter (e.g. from.find(),.map()) as an unwrapped ref value just because it’s nested inside aref(),computed(), or similar call.const result = computed(() => list.find((item) => item.label === "a"));Previously,
itemhere was incorrectly treated as a ref value because the rule attributed it to the outercomputed()call. -
#11495
496268dThanks @Netail! - FixeduseGraphqlNamingConventionso it no longer reports GraphQL enum value definitions with comments & descriptions and now displays a more accurate diagnostic range. -
#11407
6ef52b0Thanks @1678092075! - Fixed #11214:noUnusedVariablesno longer reports type parameters declared by non-default function overload signatures that have an implementation. -
#11322
5c353e6Thanks @jp-knj! - Added a new nursery rulenoAstroSetHtmlDirective, which disallows Astro’sset:htmldirective because untrusted content can introduce cross-site scripting vulnerabilities.For example, the following snippet triggers the rule:
<div set:html={content} /> -
#11462
18883b7Thanks @dyc3! - Fixed #10776:useVueHyphenatedAttributesno longer reports lowercase attribute names containing punctuation, such aspt:header:data-test-idandsome_attr. -
#11476
3270ca4Thanks @dyc3! - Fixed #10330: Vue interpolation delimiters now stay attached to whitespace-sensitive element boundaries and adjacent inline siblings, wrapping their expression when needed to fit the configured line width. Interpolations followed by text now also converge after one formatting pass.<v-btn v-if="store.state.user" variant="text" to="/my-rooms">{{ $t("nav.my-rooms") }}</v-btn><v-btn v-if="store.state.user" variant="text" to="/my-rooms">{{$t("nav.my-rooms")}}</v-btn> -
#11191
3e5367fThanks @ematipico! - Added the nursery rulenoUndeclaredCustomProperties, which reports references to custom properties that are not defined in available CSS, static HTML-likestyleattributes, or JSX stringstyleattributes.For example, the following snippet triggers the rule:
a { color: var(--undefined-color); } -
#11435
7754894Thanks @levrik! - Fixed: Variables and imports used as custom Vue directives are no longer reported as unused.For example:
<script setup>const vHighlight = {mounted: (element) => {element.style.color = "red";},};</script><template><p v-highlight>Hello</p></template> -
#11501
e6acdedThanks @aminya! - Improved the performance ofuseArraySortCompareby skipping type inference for calls to unrelated methods. -
#11467
66b282cThanks @dyc3! - Fixed #11464: Biome now parses parenthesized object literals returned from arrow functions when they contain a conditional expression and a nested arrow function. -
#11456
db9aa2aThanks @dyc3! - Fixed #10278: Marked the fix fornoThisInStaticas unsafe by default. -
#11502
652aedbThanks @levrik! -noGlobalAssignno longer reports assignments to a Vue<script setup>binding from a template expression, when the binding’s name happens to match a built-in global (e.g.open,parent,top).For example, this no longer triggers a diagnostic:
<script setup>const open = defineModel();</script><template><button @click="open = !open">Toggle</button></template>
2.5.10
Patch Changes
-
#11403
8f7786fThanks @Princesseuh! - Fixed Astro rejecting JavaScript comments between attributes.<div /* block comment */ class="something"></div><Component /* c */ client:load /> -
#11403
8f7786fThanks @Princesseuh! - Fixed a bare<in Astro text being treated as the start of a tag, such as<p>5 < 6 and 7 > 6</p>. As in HTML, a<that cannot open a tag is text and needs no escaping. -
#11438
3133ffaThanks @Princesseuh! - Fixed #8294: an Astro expression holding only a comment is no longer reported as a parse error, which also stopped the whole file from being formatted.<div>{/* a note */}</div><div class={/* a note */}>x</div> -
#11403
8f7786fThanks @Princesseuh! - Fixed #9165: an empty Astro expression such as<div>{}</div>no longer fails to parse. Astro renders{}as nothing. -
#11403
8f7786fThanks @Princesseuh! - Fixed Astro expressions containing a comment failing to parse.<div>{/* block comment */ x}</div><div>{/* only a comment */}</div> -
#11403
8f7786fThanks @Princesseuh! - Added support for Astro’s fragment shorthand.<><p>a</p></> -
#11403
8f7786fThanks @Princesseuh! - Fixed an Astro frontmatter block being cut short by a closing tag inside a string or comment.---const a = "</script>";// </script> in a comment--- -
#11403
8f7786fThanks @Princesseuh! - Fixed---being read as an Astro frontmatter fence when markup precedes it. Astro only recognizes frontmatter at the very start of a file, so a file opening with a comment now has no frontmatter, and its---lines are content.<!-- c -->---this is text, not frontmatter--- -
#11403
8f7786fThanks @Princesseuh! - Fixed an Astro frontmatter block ending early on a line that merely starts with a dash.-----count;--- -
#11403
8f7786fThanks @Princesseuh! - Fixed the children of an Astro element carryingis:rawbeing parsed as markup instead of raw text. This now also covers<script>and<style>, whose contents Astro emits verbatim rather than processing, so they are no longer linted as JavaScript or CSS.<article is:raw><% awesome %></article><script is:raw>{{ mustache }}</script> -
#11403
8f7786fThanks @Princesseuh! - Fixed Astro rejecting attribute names that start with a colon, such as:href. -
#11403
8f7786fThanks @Princesseuh! - Fixed the Astro parser failing to recover from a malformed closing tag such as<div></{<//, so that a later mistake is reported where it happens rather than cascading. -
#11403
8f7786fThanks @Princesseuh! - Fixed{inside an Astro<math>element opening an expression. MathML is foreign content where Astro parses no expressions, so LaTeX such asR^{2x}now survives as text.<svg>is unaffected. -
#11403
8f7786fThanks @Princesseuh! - Fixed{{at the start of an Astro expression being read as an interpolation. Astro has no{{ }}syntax, so{{ a: 1 }}and<Comp a={{ b: 1 }} />are object literals. -
#11403
8f7786fThanks @Princesseuh! - Fixed expressions inside an Astro<pre>or<textarea>being read as raw text. Astro parses both as ordinary elements, so their markup and interpolations are now parsed, and a variable used only inside one is no longer reported as unused.<pre>{value}</pre><textarea><div>{value}</div></textarea> -
#11403
8f7786fThanks @Princesseuh! - Added support for template literal attribute values in Astro, such as<div class=`a ${b} c`>. -
#11403
8f7786fThanks @Princesseuh! - Fixed Astro rejecting HTML5 unquoted attribute values that contain`,=,'or", such as<a href=a=b>and<a href=a'b>. -
#11393
dec5a8fThanks @1678092075! - Fixed #11207:useStrictModeno longer reports Vue event handlers such as@click="count++". -
#11431
c065f99Thanks @levrik! - Fixed #11429: Variables and imports used by Vue same-name bindings such as:disabledorv-bind:disabledare no longer reported as unused. -
#11409
405dedbThanks @ematipico! - Fixed a memory leak in the LSP server where memory usage kept growing over long editor sessions. -
#11422
a51eff7Thanks @dyc3! - Fixed #11416: Biome no longer crashes when parsing incomplete{let}or{const}declarations in Svelte files. -
#11378
34b715cThanks @Netail! - Added extra rule sources from@eslint/css.biome migrate eslintdetects rules in your eslint configurations more reliably. -
#11403
8f7786fThanks @Princesseuh! - Fixed{#,{/,{:and{@being read as Svelte block openings in every HTML-like file. They are now Svelte-only, so in HTML, Vue and Angular files a sequence such as{#if x}is ordinary text instead of a parse error. -
#11443
8d45229Thanks @ematipico! - Fixed #11390:noFloatingPromisesno longer performs unnecessary type inference on call arguments when checking methods of non-generic class instances created withnew. -
#11425
9c2667bThanks @dyc3! - Fixed #6426: GritQL plugins now match and rewrite metavariables embedded in quoted strings. -
#11441
00317c3Thanks @dyc3! - Improved performance ofuseNamedCaptureGroup,noMisplacedAssertion,noSkippedTests,noExportsInTest,noDuplicateTestHooks,noIdenticalTestTitle,useTestHooksInOrder, anduseTestHooksOnTop.
2.5.9
Patch Changes
-
#11321
41386f3Thanks @dyc3! - Fixed #11315: The CSS parser now recovers at declaration boundaries after bogus declarations, allowing subsequent valid declarations to be parsed. -
#11248
57b197eThanks @yanthomasdev! - Expanded the environment variable metadata used bybiome rageto includeBIOME_BINARY,BIOME_LOG_FILE, andRUST_BACKTRACEas well as reworded explanations for better readability. -
#11377
a8798eaThanks @Netail! - Added a new nursery ruleuseNamedLayerwhich disallows anonymous cascade layers.@layer {a {color: red;}} -
#11327
6771cf5Thanks @dyc3! - The HTML formatter now preserves meaningful blank lines in HTML, including spacing after elements with trailing spaces and blank lines between comment groups.<div><!-- first group --><!-- second group --></div> -
#10312
ba8aa18Thanks @dyc3! - Added the nursery ruleuseTailwindShorthandClasses, which suggests shorter Tailwind utility classes. For example, the rule suggests replacingw-4 h-4withsize-4. -
#11333
715e0cdThanks @kkkhs! - Fixed #11328:lint/nursery/useExpectnow recognizes Vitest Browser Modeexpect.element()calls as assertions. -
#11343
9b98211Thanks @johncarmack1984! - Fixed #11311: the CSS parser now accepts Tailwind container-query variant names in@variant, such as@xland@max-xl. These previously produced a parse error and anoUnknownAtRulesdiagnostic.@variant @xl {div {background: red;}} -
#11220
3e8c488Thanks @santichausis! - Fixed #9541:noUndeclaredVariables,noUnusedImports, andnoUnusedVariablesnow correctly recognise exported variables and functions declared in one embedded<script>block as usable from a sibling<script>block, in Svelte’s<script module>/<script>pair and Vue’s non-setup<script>blocks.For example, Biome no longer reports
greetas undeclared in the following Svelte component:<script module>export function greet() {console.log("Hello!");}</script><script>greet();</script> -
#11300
36430ebThanks @dyc3! - Fixed the HTML formatter’s whitespace handling formarquee,noscript,video,audio, andobjectelements.<marquee behavior="alternate"> This text will bounce </marquee><marquee behavior="alternate">This text will bounce</marquee> -
#11299
6559e6cThanks @jp-knj! - Added the nursery ruleuseAstroClientOnlyDirectiveValue, which reports Astroclient:onlydirectives without an initializer.For example,
<Component client:only />triggers the rule. -
#11365
7529811Thanks @MHJahanbakhsh! - Fixed #11229: TheuseGenericFontNamesrule now treatsmathas a valid generic font family. -
#11346
674f5f4Thanks @Jayllyz! - Fixed #11335:noComponentHookFactoriesnow reports ause-prefixed variable only when a function is assigned to it directly.function factory() {const useColors = true; // no longer reportedconst useStore = createStore({ count: 0 }); // no longer reportedconst useData = () => useState(null); // still reportedreturn useColors;} -
#11334
c87c46aThanks @zkasuran! - Fixed #11317:noSvgWithoutTitleno longer reports ansvgthat uses the boolean shorthandaria-hidden(equivalent toaria-hidden={true}in React). -
#11364
13853b1Thanks @ematipico! - Fixed a bug whereuseJsxKeyInIterableincorrectly flagged Astro files. -
#11321
41386f3Thanks @dyc3! - Fixed #11315: Invalid CSS declarations in HTMLstyleattributes now produce parser diagnostics instead of causing a panic. -
#11325
67c3bf0Thanks @dyc3! - Fixed HTML text wrapping to account for the width of an adjacent closing tag, avoiding lines that exceed the configured width when the final word and tag must move together.<a-long-long-long-element>foo bar foo bar foo bar foo bar foo bar foo bar foo bar</a-long-long-long-element>foo bar foo bar foo bar foo bar foo bar foobar</a-long-long-long-element> -
#11367
fe5b5d4Thanks @ematipico! - Fixed TypeScriptcompilerOptions.pathsresolution when mapping targets omit./. Biome now resolves these targets relative to their configured path base. -
#11316
17e48d6Thanks @wanxiankai! - Fixed #11289: the safe fix fornoExtraBooleanCastnow preserves parentheses around nested conditional expressions. -
#11254
d25d113Thanks @dyc3! - Fixed #11242: Biome no longer crashes with an access violation when analysing files on Windows ARM64. -
#11221
85aac73Thanks @freeatnet! - Added the nursery rulenoUnsafeTypeAssertion, which disallows TypeScript type assertions while allowing const assertions.const value = input as SomeType; -
#11314
7ffb677Thanks @ematipico! - Fixed #11310: Restored the performance ofnoMisusedPromisesandnoFloatingPromiseswhen analyzed expressions share deep imported type paths. -
#11356
6cd3263Thanks @johncarmack1984! - The Tailwind parser now understands modifiers on bare utilities (@container/sidebar,shadow/50). -
#11318
76059e9Thanks @johncarmack1984! - The Tailwind parser now understands container-query variants (@sm:,@max-lg:,@min-[400px]:) and child and descendant variants (*:,**:). -
#11357
faa2074Thanks @johncarmack1984! - The Tailwind parser now accepts the legacy leading!important marker (!flex,hover:!p-4). -
#11344
f34e15cThanks @johncarmack1984! - The Tailwind parser now understands combinator selectors in arbitrary variants (has-[>svg]:,has-[+p]:), modifiers on variants (group-hover/menu:,@sm/main:), and arbitrary container-query sizes (@[400px]:). -
#11324
2f5d452Thanks @dyc3! - Fixed HTML formatting that inserted rendered whitespace between an element and touching text when the line wrapped.<div>before<meter value=".5"></meter>afterbefore<meter value=".5"></meter>after</div> -
#11312
e65f07eThanks @xosnos! - Added a new nursery ruleuseControlLabelfor both HTML and JSX, which reports interactive control elements (button,menuitem) without an accessible label.<button /> -
#11364
13853b1Thanks @ematipico! - Fixed SVG parsing for files with an XML declaration followed by aPUBLICdoctype, such as<?xml version="1.0"?><!DOCTYPE svg PUBLIC "a" "b">. -
#11301
610ee28Thanks @dyc3! - Fixed parent tag wrapping when an HTML element starts or ends with a block-like or hidden child such assource,track, orparam.<video src="brave.webm"><track kind="subtitles" src="brave.en.vtt"></video><video src="brave.webm"><track kind="subtitles" src="brave.en.vtt"></video>
2.5.8
Patch Changes
-
#10710
0a0fbc1Thanks @dyc3! - Added a new nursery ruleuseReactCompiler, which reports diagnostics from React Compiler lint mode. -
#11251
ea9dd8aThanks @dyc3! - Improved performance ofnoImportCycles. -
#11247
52b44d6Thanks @dyc3! - Added the nursery rulenoSvelteLegacyConst, which disallows legacy Svelte{@const}tags and recommends declaration tags with$derived().Invalid:
{#each boxes as box}{@const area = box.width * box.height}<p>{area}</p>{/each}Valid:
{#each boxes as box}{const area = $derived(box.width * box.height)}<p>{area}</p>{/each} -
#11252
d5f5704Thanks @Turtle-Hwan! - Fixed #11250:useAwaitno longer reports async functions that contain anawait usingdeclaration. -
#11143
6be7be1Thanks @vznh! - Fixed #11017:noUselessUndefinedno longer reportsreturn undefinedwhen the enclosing function has a return type annotation other thanundefinedorvoid. -
#11234
caefe39Thanks @subotac! - Fixed #11228: CSS block comments between a declaration colon and value now preserve their source indentation.:root {--font-stack:/* comment *//* comment */system-ui;} -
#11285
bca1f73Thanks @denbezrukov! - Fixed #11280: CSS formatting keeps comments inside functional pseudo-classes and pseudo-elements instead of moving them before the function name.:/* comment */ where(div) {}:where(/* comment */ div) {} -
#11080
af16a0bThanks @dyc3! - HTMLstyleattribute values are now parsed as CSS. All Biome CSS lint rules are applied to thestyleattributes. -
#11195
6a85588Thanks @dyc3! - Fixed Svelte files failing to parse when an expression begins with an object literal.Now the following snippet is correctly parsed:
<p>{{ a: true }}</p><div class={{ active: isActive }}></div> -
#11173
481d008Thanks @Austin1serb! - Fixed #10242: JavaScript GritQL patterns with multiple metavariables now match snippets consistently in WebAssembly. -
#11187
23c0369Thanks @ematipico! - Added the nursery rulenoInvalidPropertyInitValue, which reports an@propertywhoseinitial-valuedoes not match itssyntaxdescriptor. For example, the following declaration triggers the rule becauseredis not a<length>:@property --size {syntax: "<length>";inherits: false;initial-value: red;} -
#11272
73896e6Thanks @ematipico! - Improved the diagnostic emitted bynoRootType. -
#11240
bd0b68dThanks @ematipico! - Fixed #11223: Improved the performance ofnoMisusedPromiseswhen analyzing async class methods that call other methods throughthis. -
#11172
4a0bc5cThanks @saberoueslati! - Fixed #10806:noUselessFragmentsno longer causes Biome to panic when its unsafe fix removes a fragment used as a JSX attribute value. -
#11227
4d603b0Thanks @saberoueslati! - Fixed #11178:noUndeclaredVariablesno longer reports Vue’s built-in instance properties, such as$slotsand$attrs, in template expressions or$eventin inline event-handler expressions. The instance properties are still reported inside<script setup>, where they are not defined. -
#11187
23c0369Thanks @ematipico! - Fixed CSS parsing of registered custom properties: Biome now correctly validates thesyntaxdescriptor of@propertyrules.
2.5.7
Patch Changes
-
#10822
c171b3bThanks @pkallos! - Added the optionignoreIfStatementsto useNullishCoalescing. Biome now flagsifstatements that only assign to a nullish variable (such asif (!a) { a = b }) and can rewrite them to??=. When enabled, Biome ignores thoseifstatements. -
#11136
e63354cThanks @AkashNaickar! - Added a new nursery rulenoExtendNative, which reports extending the prototype of a built-in object. -
#10094
e007143Thanks @THEjacob1000! - Added the nursery rulenoTailwindArbitraryValue. Biome now reports Tailwind CSS arbitrary values such asw-[400px], including in HTML/JSX class attributes, configured utility functions, and tagged templates. -
#11184
135f476Thanks @subotac! - Fixed #11176:noUnknownPseudoClassnow recognizes Vue’s:deep()pseudo-class inside.vuestyle blocks. -
#8239
a519f9dThanks @cormacrelf! - Fixed #8233, where Biome CLI in stdin mode didn’t work correctly when handling files in projects with nested configurations. For example, with the following structure,--stdin-file-path=subdirectory/...would not use the nested configuration insubdirectory/biome.json:├── biome.json└── subdirectory├── biome.json└── lib.jsTerminal window biome format --write --stdin-file-path=subdirectory/lib.js < subdirectory/lib.jsNow, the nested configuration is correctly picked up and applied.
In addition, Biome now shows a warning if
--stdin-file-pathis provided but that path is ignored and therefore not formatted or fixed. -
#11138
8c2c6bdThanks @ematipico! - FixednoUnnecessaryConditions: Biome now chooses the same function overload as TypeScript when an argument is a callback, so conditions that were previously missed are reported.The following code is now invalid, because a parameter typed
() => voidaccepts anasynccallback andscheduletherefore returnsstring:declare function schedule(handler: () => void): string;declare function schedule(handler: () => Promise<void>): string | undefined;schedule(async () => {}) ?? "fallback";The following code is also now invalid, because
map(() => 42)returns42:type Mapper<T> = () => T;declare function map<T>(mapper: Mapper<T>): T;map(() => 42) || flag; -
#11138
8c2c6bdThanks @ematipico! - Fixed #11087:noUnnecessaryConditionsno longer reports optional chains and nullish coalescing whose receiver can be nullish.For example, the optional chain and fallback in the following code are no longer reported:
declare const usage: { range: { startDate: string } } | null;const startDate = usage?.range.startDate ?? "N/A"; -
#11118
9c16840Thanks @subotac! - Fixed #11098: The HTML formatter now preserves the configured trailing newline when a file ends with a comment.<!-- trailing comment -->\ No newline at end of file<!-- trailing comment --> -
#11201
0e80610Thanks @Bishwas-py! - Fixed #11182: suppression comments fornoPositiveTabindexnow suppress the rule in HTML files when the attributes of the element span multiple lines. -
#11079
607afd2Thanks @dyc3! - The HTML formatter now lays out thesrcsetattribute of<img>and<source>as the list of candidates it is. Runs of whitespace between candidates collapse, and once the list no longer fits on one line each candidate goes on its own line with the descriptors aligned:<img srcset="/visual@0.5.png 400w, /visual.png 805w, /visual@2x.png 1610w, /visual@3x.png 2415w" /><imgsrcset="/visual@0.5.png 400w,/visual.png 805w,/visual@2x.png 1610w,/visual@3x.png 2415w"/> -
#11156
fed72c7Thanks @saberoueslati! - Fixed #11129:noUnusedVariablesno longer reports Vue bindings as unused when they are assigned through automatically unwrapped template refs. -
#11124
d890b39Thanks @denbezrukov! - Fixed CSS formatting of line comments between a declaration colon and value to preserve their source indentation..test {background://///// foo// bar/////// foo// barradial-gradient(circle, #000, transparent);} -
#11113
3d8ab73Thanks @denbezrukov! - Fixed CSS formatting of long block comments between comma-separated property values:.foo {box-shadow:1000px /* long long long long long long long long long long long long comment */ 1000px /* long long long long long long long long long comment */ 2px color(srgb 0.555555555 0.555555555 0.555555555),1000px/* long long long long long long long long long long long long comment */1000px /* long long long long long long long long long comment */ 2pxcolor(srgb 0.555555555 0.555555555 0.555555555),1px 1px black;} -
#11127
da5c1a5Thanks @dyc3! - The HTML formatter now picks the quote character for an attribute by counting the quotes in the value rather than looking only for a double quote.'and"count as the characters they stand for, and only the character that ends up as the delimiter stays escaped:<div title='123 '" 456'></div><div title="123 '" 456"></div>Entities that are not quotes, such as
&or&[#39](https://github.com/biomejs/biome/issues/39);, are left exactly as written. -
#11193
77035bbThanks @dyc3! - Fixed the HTML formatter collapsing the blank line between an element and the text that follows it. A blank line before text is now kept, the way one before another element already was:<div>foo</div>text -
#11106
ad80f57Thanks @dyc3! - The HTML formatter now writes the HTML5 doctype in lowercase, matching Prettier:<!DOCTYPE html><!doctype html>This only applies to a plain
.htmlfile whose doctype stands alone. A doctype that names a DTD keeps the case it was written with, since the rest of the declaration is not lowercased either:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">A
.vue,.svelte, or.astrofile keeps whatever the author wrote. -
#11188
60679dbThanks @dyc3! - Fixed the HTML formatter printing a comment twice when it ended the line of the last element in a document:text<!-- a --><!-- a -->text<!-- a --> -
#11077
4dcd0d9Thanks @dyc3! - Fixed a bug where the HTML formatter collapsed the whitespace inside<textarea>,<xmp>and<plaintext>, changing what the page renders.<textarea>line oneline two </textarea><textarea>line one line two</textarea>Biome now prints the content of these elements exactly as it appears in the source, matching the existing behavior for
<pre>. -
#11194
abfbb11Thanks @dyc3! - Fixed the HTML formatter refusing to format a Svelte file containing an array pattern that skips a position:{#each animals as [, value]}<p>{value}</p>{/each} -
#10094
e007143Thanks @THEjacob1000! - FixeduseSortedClassesto correctly detect unsorted classes in static member expression tagged templates (e.g.tw.div\…“). Previously, these were silently skipped due to surrounding whitespace trivia not being stripped from the tag name. -
#11078
10da30eThanks @dyc3! - Fixed Vue single-file components failing to parse when they contain a custom block such as<i18n>or<docs>, or a<template>written in another language. Their content is no longer read as HTML, so a block may hold whatever its own tooling expects:<docs>This block is prose, and it may mention a `<my-component>` without closing it.</docs><template lang="pug">.test#foo</template>Previously both blocks produced a parse error and the whole file was left unformatted. Biome now prints their content unchanged while still formatting the opening tag.
-
#11231
4afd901Thanks @ematipico! - Improved the performance of the following lint rules: -
#11134
2fa0a62Thanks @yanthomasdev! - Clarified the warning emitted when using the experimentaljsonandjson-prettyreporters. -
#11198
ed88b13Thanks @saberoueslati! - Fixed #11171: variables referenced only inside a Svelte attachment ({@attach ...}) are no longer reported as unused bynoUnusedVariablesandnoUnusedImports. -
#11155
6ee17eaThanks @dyc3! - Improved performance when printing diagnostics to the console. -
#11160
217f8adThanks @dyc3! - Improved the performance ofnoFloatingPromisesby skipping type inference for assignment statements, which are always considered handled. -
#11159
26c23d9Thanks @saberoueslati! - Fixed #11144:noFloatingPromisesno longer reports already-awaited optional Promise values. -
#11138
8c2c6bdThanks @ematipico! - Fixed #11121:noUnnecessaryConditionsno longer reports conditions based on an inapplicable function overload.For example, the condition in the following code is no longer reported because
query({})selects the overload that returnsboolean:declare function query(options: { initial: string }): { isPending: false };declare function query(options: { initial?: string }): { isPending: boolean };const { isPending } = query({});isPending || fallback; -
#11152
c4fc6a9Thanks @dyc3! - Improved the performance of collecting rule timings with--profile-rulesin heavily multithreaded environments. -
#11128
4d3ff76Thanks @ematipico! - Fixed #7635:noDeprecatedImportsnow detects deprecated ambient declarations that are exported separately. -
#11117
01f7ef5Thanks @subotac! - Fixed #11014:noDeleteno longer reportsprocess.env["FOO"]style property deletions. -
#11168
9847e68Thanks @saberoueslati! - Added the nursery rulenoNonScalableViewport, which reports viewport metadata that disables user scaling withuser-scalable=no.For example:
<meta name="viewport" content="width=device-width, user-scalable=no" /> -
#11154
a1d6b1fThanks @dyc3! - Improved the performance ofnoImportCyclesby skipping graph traversals for imports that cannot be part of a cycle. -
#11175
d96d6ddThanks @ematipico! - Fixed CSS parsing of registered custom properties: Biome now correctly validates thesyntaxdescriptor of@propertyrules.
2.5.6
Patch Changes
-
#11035
0e4b03bThanks @ematipico! - Fixed a performance regression innoMisusedPromisesthat caused type inference to run repeatedly while linting a file. -
#11043
22ec076Thanks @denbezrukov! - Fixed CSS formatting for multiline function arguments preceded by comments:.example {value: outer(1,/* comment */nested(first,second)first,second));} -
#11007
c9acb25Thanks @BTF-Kabir-2020! - Fixed #9195:useHookAtTopLevelno longer reports hooks in namedforwardRefcomponents that receive arefparameter. -
#10152
50a9bd8Thanks @Zelys-DFKH! - Fixed #10131: Biome now correctly parses curried arrow functions in ternary consequents when the inner arrow’s parameters use a destructuring pattern, e.g.cond ? (x) => ({ a, b }) => body : alt. -
#11105
8ffe2b9Thanks @dadavidtseng! - Fixed #11092: ThenoUselessTernaryquick fix now preserves operator spacing when simplifying or inverting boolean ternary expressions. -
#10533
5809875Thanks @Mokto! - Fixed #10515:biome check --writewas not idempotent on Svelte files — multi-line template literals in<script>blocks and block comments in<style>blocks gained an extra indent level on every run. -
#11040
0abb620Thanks @Mokto! - Fixed an issue where the HTML formatter would duplicate a comment placed directly before a Svelte{@const ...}or{@debug ...}block. The duplication compounded on every subsequent--write, causing the file to grow exponentially. -
#10858
6d18204Thanks @ruidosujeira! - Fixed #10839: Svelte{#each}array destructuring no longer includes spaces inside square brackets, and multiline bind function expressions now indent their getter, setter, and function body correctly. -
#11009
2c36626Thanks @ematipico! - Improved the accuracy of type-aware lint rules by resolving more inferred types. For example,noFloatingPromisesnow detects floating Promises returned by aliased callbacks and arrays of Promises created by async mapping callbacks.The following statements are now reported:
type AsyncCallback = () => Promise<void>;declare const callback: AsyncCallback;callback();[1, 2, 3].map(async (value) => value); -
#10973
9cb044cThanks @ematipico! - Fixed false positives innoMisleadingReturnTypewhen generic-constraint, normalization, substitution, or structural return-type comparison cannot complete. The rule now suppresses diagnostics rather than suggesting a return type derived from partial information. For example, this unresolved return type is no longer reported:function unresolvedReturnType(): MissingType {return "value" as const;} -
#11071
15047a2Thanks @dyc3! - The HTML parser now accepts mixed-casedoctypedeclarations. -
#11030
cc90e65Thanks @marschattha! - Therdjsonreporter now populates the severity field of each diagnostic (ERROR,WARNING, orINFO), so tools consuming Reviewdog Diagnostic Format output no longer need to assume a default severity. -
#11009
2c36626Thanks @ematipico! - Fixed a performance regression in type-aware JavaScript lint rules by inferring only requested types and memoizing export resolution. -
#11056
903b177Thanks @dyc3! - Added support for Svelte declaration tags usingletandconst. Biome can now parse, format, and lint bindings declared in these tags. -
#11045
89c27c6Thanks @ematipico! - Improved the performance of Biome formatter up to ~7% across the board. -
#9806
781d68dThanks @dyc3! - Added the nursery rulenoJsRestrictedProperties, which ports ESLint’sno-restricted-propertiesrule. Biome now flags restricted member access and object destructuring, andbiome migrate eslintpreserves the rule’s options.
Copyright (c) 2023-present Biome Developers and Contributors.