All versions since 2.5.14
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.15
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.6.2 Latest
Minor Changes
-
#11479
5c60ba8Thanks @nhedger! - Added a--gitflag tobiome init. The flag enables Git VCS integration and setsvcs.useIgnoreFiletotruein the generated configuration, even when the command runs outside a Git repository. -
#11742
3a1356dThanks @Netail! - Added thebiome migrate stylelintcommand. It imports a Stylelint configuration and its ignore settings into your Biome configuration, mapping Stylelint rules to their Biome equivalents. Pass--writeto apply the changes, and--include-inspiredor--include-nurseryto migrate additional rules. -
#12318
774b5b5Thanks @Netail! - Added the new assist actionuseGraphqlSortedDefinitions, which sorts the named definitions of a GraphQL document, such as types, type extensions, directives, fragments, and operations.Invalid:
type User {id: ID!}enum Role {ADMINUSER}directive @auth on FIELD_DEFINITION -
#6886
3479d15Thanks @christymcgrory! -biome ragenow shows the resolvedfiles.includesandfiles.ignoreUnknownconfiguration. -
#11102
0874b7fThanks @gameroman! - Added support foruseTailwindSortedClassesrule in HTML-ish files. -
#10711
40de5a0Thanks @soconnor-seeq! - Adds a newresolutionKindoption for object-syntax plugin entries.This allows shared Biome configs in monorepos to load local Grit plugins from the package that declares them instead of resolving plugin paths from the consuming project.
{"plugins": [{ "path": "./grit/no-debugger.grit", "resolutionKind": "config" },{ "path": "local-plugin.grit", "resolutionKind": "project" },{ "path": "local-plugin.grit" }]}Use
resolutionKind: "config"to resolve the plugin from the configuration file that declares it. UseresolutionKind: "project"to resolve the plugin from the consuming project. When omitted,resolutionKinddefaults toproject. This only affects plugin resolution;includesstill apply to end-user project files as usual. -
#11432
4befd08Thanks @ematipico! - Addedbiome inspect configto show resolved configuration values and their origins as human-readable diagnostics, including matching overrides.Configuration files can also extend other configurations up to ten levels deep. Repeated references to the same resolved file are ignored with an information diagnostic, while resolving multiple versions of one extended package produces an error.
-
#11477
ab05554Thanks @nhedger! - Added automatic Git VCS integration when runningbiome initinside a Git repository, including from nested directories and Git worktrees. The generated configuration setsvcs.enabledandvcs.useIgnoreFiletotrue, withvcs.clientKindset to"git". -
#11451
1ac4b09Thanks @ematipico! - #### YAML is now supportedAdded support for formatting YAML files, both
.yamland.ymlextensions -
#11432
4befd08Thanks @ematipico! - Configuration files can now recursively extend local files and npm package configurations up to ten levels. Every repeated reference participates in the merge, while resolving multiple versions of one extended package produces an error. -
#11713
ac6a640Thanks @dyc3! - Added support for Gritrange()patterns, addressing #8454. Plugins can filter syntax nodes by optionalstart_line,start_column,end_line, andend_columnbounds.For example, this pattern matches function calls contained entirely on line 2.
range(start_line=2, end_line=2) as $call where {$call <: call_expression()} -
#11244
0628b53Thanks @ematipico! - Added the new CLI option--profile-type-inferenceto the commandslintandcheck.The profiler is designed to track the execution time of internal queries and operations, group them by file, and sort them from the most expensive to the least expensive.
Terminal window biome lint --profile-type-inferenceprofiler ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━i Type inference profile (Biome <version>)src/index.tsRequests (top 5 of 12 groups; 28 source records; 46 executions)1. Promise classification <- nursery/noFloatingPromises...Queries (top 8 of 25 groups; 61 source records; 94 executions)1. Promises / infer_expression_is_promise...Whole-module inference (top 1 of 1 group; 1 source record; 1 execution)1. Import depth limit...68 files omitted.ℹ To show all the information, use the --verbose option. The output might be very verbose, so it's advised to analyze a single file.$ biome lint --profile-type-inference --verbose ./path/to/file.tsUse
--verboseto include detailed timings, attribution, breadth, and implementation references for the top source records in each file. -
#12108
4fcb880Thanks @ematipico! - Promoted 59 nursery rules to stable groups.Correctness
Promoted the following rules to the
correctnessgroup with error severity. All of them are recommended:noDuplicateFieldDefinitionNamesnoVueRefAsOperandnoVueImportCompilerMacrosnoVueVOnNumberValuesuseVueValidVFornoComponentHookFactoriesnoJsxNamespaceuseReactAsyncServerFunctionnoReactNativeRawTextuseReactNativePlatformComponentsuseQwikLoaderLocationnoPlaywrightMissingAwaitusePlaywrightValidDescribeCallback
Suspicious
Promoted the following rules to the
suspiciousgroup:noLoopFuncnoJsxLeakedDollarnoReactStringRefs(recommended)useScopedStyles(recommended)noReactNativeDeepImports(recommended, error severity)noDrizzleDeleteWithoutWhere(recommended, error severity)noDrizzleUpdateWithoutWhere(recommended, error severity)noConditionalExpectuseExpectnoIdenticalTestTitle(recommended)noPlaywrightForceOptionnoPlaywrightNetworkidlenoPlaywrightPagePausenoPlaywrightWaitForNavigationnoPlaywrightWaitForTimeoutnoDuplicateSelectorsnoEmptyObjectKeysuseBaselinenoUntrustedLicenses
Security
Promoted
useIframeSandboxto thesecuritygroup with error severity.Performance
Promoted the recommended rule
useDomNodeTextContentto theperformancegroup with warning severity.Complexity
Promoted the following rules to the
complexitygroup:useArraySomeuseRegexpTestnoUnnecessaryTemplateExpressionnoPlaywrightUselessAwaitnoExcessiveSelectorClassesuseMathMinMax(recommended, warning severity)noExcessiveNestedCallbacks
Style
Promoted the following rules to the
stylegroup with information severity:useVueConsistentDefinePropsDeclarationuseVueNextTickPromise(recommended)noReactNativeLiteralColorsuseConsistentTestItuseTestHooksInOrderuseTestHooksOnTopnoPlaywrightEvalnoPlaywrightElementHandlenoPlaywrightWaitForSelectoruseReduceTypeParameteruseNamedCaptureGroupuseUnicodeRegexuseImportsFirstuseVarsOnTopuseThisInClassMethodsnoInlineStylesuseDomQuerySelectornoTopLevelLiterals
-
#12206
0f984fbThanks @dyc3! - Added theignoreUsingDeclarationsoption tonoUnusedVariables. When enabled, the rule no longer reports unused variables declared withusingorawait using, because these declarations clean up their value automatically even when the code never reads it.{"linter": {"rules": {"correctness": {"noUnusedVariables": {"options": { "ignoreUsingDeclarations": true }}}}}} -
#12424
6a41490Thanks @siketyan! - Removed thejavascript.parser.gritMetavariablesoption. It was intended for internal use only and had no effect on how Biome parses JavaScript and TypeScript files. Biome now reports it as an unknown key and exits with a configuration error, so remove it from your configuration file. -
#12055
54870c0Thanks @ff1451! - Added the new assist actionuseGraphqlSortedVariables, which sorts the variable definitions of GraphQL operations.Invalid:
query GetUser($userId: ID!, $includePosts: Boolean = false, $after: String) {user(id: $userId) {name}} -
#12149
83df808Thanks @dyc3! - Added thetailwind.stylesheetoption, which points Biome at the CSS file that holds your Tailwind CSS configuration.useTailwindSortedClassesreads the@theme,@utility, and@custom-variantrules in that file and in the local files it imports, so your own theme values, utilities, and variants sort correctly.biome.json {"tailwind": { "stylesheet": "./src/app.css" }}src/app.css @import "tailwindcss";@theme {--color-brand: #3b82f6;}@utility content-auto {content-visibility: auto;}@custom-variant theme-midnight (&:where([data-theme="midnight"] *)); -
#12206
0f984fbThanks @dyc3! - Added migration of theignoreRestSiblingsandignoreUsingDeclarationsoptions ofno-unused-vars,@typescript-eslint/no-unused-vars, andunused-imports/no-unused-varstonoUnusedVariablesinbiome migrate eslint. Options that the ESLint configuration omits are set to ESLint’s defaults, so the migrated rule reports the same variables. For example,"no-unused-vars": "error"now migratesignoreRestSiblingsasfalse. -
#11709
32d12cbThanks @ematipico! - Added the new commandbiome inspect file, which returns developer information for the given file.Terminal window biome inspect file path/to/file.tsBy default, the command returns the CST of the file. The command accepts the following arguments:
--ast, which returns the AST of a file.--ir, which returns the formatting IR of a file.--semantic, which returns the semantic model information of a file, if available.
-
#12221
cb571afThanks @dyc3! - The rulenoEmptySourcenow supports Markdown files. It reports files that contain only blank lines and HTML comments. For example, the following file is now reported:<!-- TODO --> -
#12214
8955b56Thanks @dyc3! - The rulenoEmptySourcenow supports YAML files. It reports files with no documents and each document that has no content. For example, the second document in the following code is now reported:name: foo--- -
#12033
8669e53Thanks @dyc3! - Added theignoreElementsoption tonoRedundantRoles. Elements listed in this option are not checked by the rule.{"linter": {"rules": {"a11y": {"noRedundantRoles": {"options": {"ignoreElements": ["button"]}}}}}} -
#12084
04e3750Thanks @dyc3! - The rulenoRestrictedElementsnow supports HTML, Vue, Svelte, and Astro files. For example, with{ "elements": { "marquee": "Use CSS animations instead." } }, the following code is now reported:<marquee>Breaking news</marquee> -
#11408
5a870f2Thanks @ematipico! - Added support for distributing named Grit rules, rule presets, and configurations through packages that have a manifest file.The field
pluginsis used to export named Grit plugins, andconfigsis used to export named configurations. Package entries must select a named export:package/rule,package/presets/preset, orpackage/configs/config. Bare package entries aren’t supported. Rules consumed from another package are exposed under the consuming package’s name, while package authors continue to reference them by their source package inside the manifest. Configurations consumed from another package are also exposed under the consuming package’s name.biome-manifest.json {"$schema": "./node_modules/@biomejs/biome/manifest_schema.json","version": 1,"plugins": {"rules": ["@org/shared-rules/noDeprecatedApi","@org/strict-rules/presets/recommended",{ "useCompanyLogger": "./rules/useCompanyLogger.grit" }],"presets": {"recommended": ["useCompanyLogger","@org/shared-rules/noDeprecatedApi"]}},"configs": ["@org/shared-configs/configs/recommended",{ "base": "./configs/base.json" }]}The package must publish the manifest and every referenced file, for example, through the
filesfield inpackage.json. Plugin authors can expose their manifest through thebiomecondition with./biome-manifest.jsonas its value.package.json {"name": "@org/biome-plugin","exports": {"biome": "./biome-manifest.json","default": "./index.js"},"files": ["biome-manifest.json", "rules", "configs"]}And then, you can load the rules in your
biome.json:biome.json {"plugins": ["@org/biome-plugin/useCompanyLogger","@org/biome-plugin/presets/recommended"]}For more information on how to create a plugin to distribute via npm, check the relative guide.
-
#12264
90f2eafThanks @dyc3! - Fixed #11082: glob patterns in theincludesoption of a plugin are now matched against file paths relative to the directory of the configuration file, the same asfiles.includesandoverrides[].includes.Previously, the patterns were matched against the absolute file path, so a pattern such as
packages/**/src/**matched no files and the plugin never ran.{"plugins": [{ "path": "./my-plugin.grit", "includes": ["packages/**/src/**"] }]}Patterns that start with
**/keep working. Patterns that contain the absolute path of the project no longer match, and must be rewritten as relative patterns. -
#11133
1df00deThanks @dlecan! - Added Android (Termux) support to the npm distribution (#1340).npm install @biomejs/biomenow works on Termux through the new@biomejs/cli-android-arm64and@biomejs/cli-android-x64packages, which reuse the static musl binaries. -
#12132
c5fadc4Thanks @ematipico! - Added SCSS support throughout the toolchain. Biome can now format and lint.scssfiles, and recognizes.module.scssfiles as CSS Modules. -
#10837
754432cThanks @JamBalaya56562! - Added support for Google Apps Script (.gs) files.They are parsed as JavaScript scripts, so ES module
import/exportstatements are reported as errors (Apps Script has no module system). Common Apps Script service globals (e.g.SpreadsheetApp,DriveApp,Logger) are recognized bynoUndeclaredVariablesandnoGlobalAssign, and the list can be extended through thejavascript.globalsoption. -
#11126
fa63050Thanks @Punisheroot! - Biome now recognizes files with the.htmextension as HTML. -
#12291
6c6619eThanks @dyc3! - Changed the dependency that enables thetailwinddomain automatically. The domain is now enabled whenpackage.jsondeclarestailwindcssv4 or later, instead of v3 or later, because we are currently targeting Tailwind v4 support. The domain can always be enabled manually. -
#11394
de1ad4cThanks @ematipico! - #### Markdown is now supportedAdded support for linting and formatting Markdown files. The first version of Biome Markdown parser has 100% compatibility against CommonMark.
Other variants of Markdown, such as GitHub Flavored Markdown (GFM) aren’t currently supported; however, we plan to support them soon.
Formatter and Linter are automatically enabled by default.
Markdown parser
The parser comes with an opt-in option to enable frontmatter parsing. When enabled, the first thematic break
---is considered the opening fence of the frontmatter:biome.json {"markdown": {"parser": {"frontmatter": true}}}---title: Lorem ipsum---The parser also comes with an opt-in option called
cjkFriendlyEmphasis. When enabled, the parser follows the CommonMark CJK-friendly amendments and recognizes emphasis markers, such as**, placed directly next to Chinese, Japanese, or Korean text. Enable it only when the tool that renders your Markdown supports the same amendments, because the option changes which text Biome formats and lints as emphasis:biome.json {"markdown": {"parser": {"cjkFriendlyEmphasis": true}}}With the option enabled, the following text is parsed as bold, instead of as literal
**:**このアスタリスクは強調記号として認識されず、そのまま表示されます。**この文のせいで。Markdown formatter
The formatter has great compatibility with Prettier formatting, more than 90% detected by our infrastructure. The formatter ships with a new option called
proseWrap, that allows controlling how the Biome formatter should wrap paragraphs.For example, when
proseWrapis set toalways, the formatter will wrap the paragraph to match the configuredlineWidth:biome.json {"markdown": {"formatter": {"lineWidth": 20,"proseWrap": "always"}}}Very tiny line width, sothe paragraph is morecompact.Markdown linter
The linter ships with a few rules inspired by markdownlint. We plan to ship more rules in the upcoming releases.
Some rules you can start using already:
Markdown snippets
Biome recognizes the code inside fenced code blocks, frontmatter, and HTML blocks as embedded languages, and formats it with the formatter of its language and your configuration:
```jsconst value = {a:1,b:2}const value = { a: 1, b: 2 };```HTML blocks are formatted only when the HTML formatter is enabled. A block with a syntax error stays as written, and Biome still formats the rest of the file.
The option
markdown.formatter.formatEmbedscontrols this behavior, and it’s enabled by default. Set it tofalseto keep the code of these blocks as written:biome.json {"markdown": {"formatter": {"formatEmbeds": false}}}The command
biome migrate prettiermigrates the Prettier optionembeddedLanguageFormattingtomarkdown.formatter.formatEmbeds.The option
markdown.analyzeEmbedsruns the linter and assist actions on the same blocks, with the rules and actions of their language, and reports their syntax errors. It’s disabled by default, because fenced code blocks usually contain examples or partial code:biome.json {"markdown": {"analyzeEmbeds": true}} -
#11634
04c3f5dThanks @ematipico! - Addedbiome inspect pluginsto list resolved rules by plugin and importing preset without loading or executing plugin code. Include globs show which files each import targets, and--pathselects a target file. Fixed Markdown linter overrides and their configuration inspection. -
#12282
a3fa0d6Thanks @ff1451! - Added the new assist actionuseGraphqlSortedArguments, which sorts the arguments of GraphQL fields and directives, and the arguments declared by field and directive definitions.Invalid:
query {users(orderBy: NAME, first: 10, after: "cursor") {name}} -
#10631
1077238Thanks @thibaut-pro! - Added thesortFirstoption to the useSortedAttributes action (JSX and HTML). It takes a list of attribute names that are sorted before all other attributes, in the order given, while the remaining attributes keep their usual sort. This is useful to keep attributes such askeyfirst.With the following configuration:
{"assist": {"actions": {"source": {"useSortedAttributes": {"level": "on","options": { "sortFirst": ["key"] }}}}}}The attributes are reordered so that
keycomes first:// Before<div className={styles.investment} key={investment.id} />;// After<div key={investment.id} className={styles.investment} />; -
#10424
189b7baThanks @LinusU! - Added thepartitionByNewLineoption to theuseSortedInterfaceMembersassist. When enabled, members separated by a blank line are kept in their own section and sorted only within that section, preserving the logical groupings the author intentionally introduced with empty lines.
Patch Changes
-
#11953
354f74cThanks @Th3S4mur41! - Enhanced the nursery ruleuseLogicalPropertiesto check physical CSS values in addition to physical property names.The rule recognizes physical values in
frame-sizing,anchor-size(), andanchor(), with direction-aware replacements controlled by the existingdirectionoption.For
justify-content: leftandjustify-content: right, the rule reports a diagnostic without an automatic replacement because the correct logical alignment depends on the layout axis.This is a second part of the rule covering parts of #9034
-
#12175
3730b32Thanks @dyc3! - Added the nursery rulenoDoubleComparison, which reports two comparisons of the same values that can be combined into one. For example,x === y || x < ycan be written asx <= y. -
#12166
25eb10cThanks @dyc3! - Added the new nursery rulenoNestedSwitch, which disallowsswitchstatements inside otherswitchstatements.switch (n) {case 0:switch (m) {} // reported} -
#12170
872ac9fThanks @dyc3! - Added the new nursery rulenoNestedTemplateLiterals, which disallows template literals written inside other template literals.const message = `I have ${color ? `${count} ${color}` : count} apples`; -
#12111
f72375fThanks @dyc3! - Added the nursery rulenoObjectConstructor, which disallows calling theObjectconstructor without arguments, such asnew Object()orObject(). Biome can replace these calls with the object literal{}. -
#12254
cb88f07Thanks @dyc3! - Added the nursery rulenoSvelteClassDirective, which reports Svelte’sclass:directive. Since Svelte 5.16, theclassattribute accepts objects and arrays, and Svelte recommends them over the directive.<div class:active={isActive}></div> -
#12186
30aa7d2Thanks @dyc3! - Added the new nursery rulenoUselessDateGetTime, which reports dates converted with.getTime()before being passed to theDateconstructor. Passing the date directly, as innew Date(date), already creates a copy.const copy = new Date(date.getTime()); -
#12229
5f8ea6cThanks @dyc3! - Added the nursery rulenoVueLifecycleAfterAwait, which reports Vue lifecycle hooks, such asonMounted(), that are registered after anawaitin a component’ssetup()function. Vue doesn’t run these hooks.<script>import { onMounted } from "vue";export default {async setup() {await fetchUser();onMounted(() => {});},};</script> -
#12077
3dd096fThanks @dyc3! - Added the nursery rulenoVueRootVIf, which disallowsv-ifon the only root element of a Vue component template.<template><div v-if="visible">Content</div></template> -
#12136
b92638bThanks @dyc3! - Added the nursery rulenoVueShadowNativeEvents, which reports Vue component events named after built-in browser events, such asclickorkeydown.<script setup>// Invalidconst emit = defineEmits(["click"]);emit("click");</script> -
#12135
31a29b6Thanks @dyc3! - Added the nursery rulenoVueVHtml, which disallows Vue’sv-htmldirective.v-htmlinserts its value into the page as HTML, so text from users can run code on your page (cross-site scripting, or XSS).<template><div v-html="content"></div></template> -
#12134
60329afThanks @dyc3! - Added the new nursery rulenoVueVText, which disallows Vue’sv-textdirective in favor of text interpolation.For example, the following snippet triggers the rule:
<div v-text="message"></div> -
#9817
241b861Thanks @dyc3! - Added the new nursery rulenoZeroFractions, which disallows numeric literals with redundant zero fractions or dangling dots such as1.0and1.. Biome can now simplify these literals to shorter equivalents. -
#12109
b45d426Thanks @dyc3! - Added the nursery ruleuseConsistentJsonFileRead, which enforces a consistent way of reading JSON files before passing them toJSON.parse(). By default, it reports files read as aBuffer; setreadAsto"buffer"to report files read as a UTF-8 string instead.const packageJson = JSON.parse(await fs.readFile("./package.json")); -
#12129
b57f874Thanks @dyc3! - Added the new nursery ruleuseMatchingFunctionName, which requires a named function expression to have the same name as the variable or property it’s assigned to.// The function name `bar` doesn't match the variable name `foo`.const foo = function bar() {}; -
#12169
0f1ae53Thanks @dyc3! - Added the new nursery ruleuseSimplifiedBooleanReturn, which reportsifstatements that only returntrueorfalseand can be replaced by returning the condition directly.function isPositive(value) {if (value > 0) {return true;}return false;} -
#11957
b2db9f2Thanks @dyc3! - Added the nursery ruleuseSvelteKitResolve, which requires internal links and calls togoto(),pushState(), andreplaceState()to use paths built with SvelteKit’sresolve().<a href="/about">About</a> -
#12235
b7c1870Thanks @dyc3! - Added the nursery ruleuseSvelteReactiveClasses, which reportsDate,Map,Set,URL, andURLSearchParamsobjects that are modified in Svelte files or exported from Svelte modules. Svelte doesn’t detect changes made inside these built-in objects, so the rule suggests the matching classes fromsvelte/reactivity.<script>const tags = new Set();function addTag(tag) {tags.add(tag);}</script> -
#12172
b47674dThanks @dyc3! - Added the nursery ruleuseSvelteShorthandDirective, which enforces the shorthand syntax for Sveltebind:,class:, andstyle:directives. For example,<input bind:value={value} />is now reported and can be fixed to<input bind:value />. -
#12137
4aeca96Thanks @dyc3! - Added the nursery ruleuseVueMatchingComponentFileName, which requires the name of a Vue component to match its file name. The following component inMyComponent.vueis now reported:<script>export default {name: "MyButton",};</script> -
#12075
de453c0Thanks @tionway! - Fixed #11902:biome migrate --writenow successfully migrates empty nested configuration files without introducing an invalid trailing comma. -
#12149
83df808Thanks @dyc3! - SwitcheduseTailwindSortedClassesto the Tailwind CSS v4 class order. The rule now checks the attributes and functions set in the top-leveltailwindconfiguration, and its ownattributesandfunctionsoptions were removed. Runbiome migrate --writeto move them totailwind.attributes,tailwind.mergeFunctions, andtailwind.variantFunctions.The rule is now part of the
projectdomain, so enabling it makes Biome scan your project. -
#12202
9f1cfdeThanks @dyc3! - Fixed #12184:useImportExtensionsno longer misses relative imports with.jsxor.tsxextensions when usingextensionMappingsorforceJsExtensions. The rule reports these imports when the configured replacement resolves to an existing file. -
#12081
fd4df34Thanks @dyc3! - Added the nursery ruleuseCapitalizedConstructors, a port of ESLint’snew-cap. It reportsnewexpressions whose callee name starts with a lowercase letter, and calls withoutnewwhose callee name starts with an uppercase letter.const friend = new person();const other = Person(); -
#12061
36aa8c3Thanks @dyc3! - Added the nursery rulenoExcessiveStatementsPerFunction, a port of ESLint’smax-statements. It reports functions that contain more statements than the configuredmax(default:10). -
#12053
b91a445Thanks @dyc3! - Added the nursery ruleuseVueConsistentEventHyphenation, a port ofvue/v-on-event-hyphenation. It enforces a consistent hyphenation style for event names inv-ondirectives on custom components. By default, hyphenated names are required, so<MyComponent @customEvent="handler" />is reported. -
#12327
2266df2Thanks @dyc3! - Improved the performance of the Biome CLI on projects with many files during cleanup. -
#12110
cf408d5Thanks @dyc3! - Added the recommended nursery rulenoOctal, which disallows legacy octal literals such as071and decimal literals with leading zeros such as08. Use0o71for explicit octal notation. -
#12066
d13d1baThanks @dyc3! - Updated rule source metadata. -
#12393
c80f28cThanks @ematipico! - Fixed #12389: the Svelte formatter no longer duplicates binding names when converting redundantbind:initializers to shorthand syntax.<input bind:valuevalue><input bind:value> -
#12325
31a2fb0Thanks @dyc3! - Improved the performance of the formatter in files with little or no comments. -
#12223
9f246d7Thanks @dyc3! - Added the nursery rulenoAccidentalBitwiseOperators, which reports the bitwise operators&,|, and|=where the logical operators&&,||, and||=were likely intended.if (obj & obj.prop) {}options = options | {}; -
#12052
1a6fb41Thanks @dyc3! - Added the nursery rulenoVueBooleanDefault, which disallows default values for Boolean props in Vue components. Vue already defaults an absent Boolean prop tofalse.<script setup lang="ts">withDefaults(defineProps<{ disabled?: boolean }>(), {disabled: true,});</script> -
#12177
215288bThanks @MustafaKemal0146! - Fixed #4517:noConfusingVoidTypeno longer reportsvoidin union types that contain onlyvoidandnever, such asvoid | never. -
#12461
259a84eThanks @ematipico! - Fixed GritQL JSON snippets so patterns such as{ $key: $value }can now bind metavariables in object keys and values. -
#12185
08cfbd2Thanks @dyc3! - Fixed the Tailwind CSS parser splitting dashed utility names. Classes such asdrop-shadow!,flex-grow-0, andmax-w-screen-lgnow keepdrop-shadow,flex-grow, andmax-w-screenas their utility names. -
#12444
ef61338Thanks @ematipico! - Fixed the match count reported bybiome search. The summary and thematchesfield of the JSON reporters now count every match, instead of the number of searched files. -
#12292
4eadd57Thanks @ematipico! - Fixed withastro/compiler-rs#199: processing instructions such as<?xml version="1.0" encoding="UTF-8"?>no longer cause parse errors in Astro and Vue files. -
#12152
7a573deThanks @dyc3! - Fixed the Tailwind class parser rejecting arbitrary variants whose selector starts with an attribute selector. Classes like[[data-variant=legend]+&]:-mt-1.5andgroup-has-[[data-slot=item-description]]/item:self-startnow parse correctly. -
#12155
851d803Thanks @erenbati! - biomejs/biome#11949: FixednoSelfAssignto detect self-assignments when equivalent property names use dot and bracket notation, including numeric and string-literal keys. -
#12112
db7ede6Thanks @dyc3! - Added the nursery rulenoPromiseExecutorReturn, which disallows returning values from the function passed tonew Promise(), becausenew Promise()ignores them.new Promise((resolve) => resolve(1)); -
#12404
fcd3d74Thanks @dyc3! - Fixed #12374:biome migrate eslintnow preserveseqeqeq’s null comparison options when configuringnoDoubleEquals. Migrating the default ESLint configuration now setsignoreNull: false, so comparisons such asx == nullremain reported. -
#12426
0fe3d2bThanks @dyc3! - Improved the performance of linting by computing the range of a syntax node without allocating its edge tokens. -
#12441
c4199d7Thanks @dyc3! - Improved the performance of commands that run with--use-server, such asbiome check --use-server. The Biome daemon now processes the files of a command on all available CPU cores, instead of at most four files at a time. -
#12183
c08e3c3Thanks @dyc3! - Fixed the Tailwind class parser rejecting CSS variable shorthands whose fallback contains parentheses. Classes likebg-(--a,var(--b)),bg-(--a,calc(1px)), andafter:bg-(--drawer-bleed-background,var(--color-popover))now parse correctly, including in variants (max-(--a,var(--b)):flex) and modifiers (bg-red-500/(--a,var(--b))). -
#12441
c4199d7Thanks @dyc3! - Fixedbiome stopwaiting 15 seconds and then failing with “the request to the remote workspace timed out”, even though the Biome daemon had stopped. The command now returns as soon as the daemon shuts down. -
#12117
ae0cabdThanks @dyc3! - FixednoUnreachable,noUnreachableSuper,useGetterReturn,useIterableCallbackReturnandnoFallthroughSwitchClauseskipping functions that contain an unlabeledbreakorcontinueinside a labeled loop orswitch.For example,
noUnreachablenow reportsafterBreak()here:function f(xs) {outer: for (const x of xs) {break;afterBreak();}} -
#11093
78c992fThanks @dyc3! - Fixed CSS formatting for multiline function arguments preceded by comments:.example {value: outer(1,/* comment */nested(first,second)first,second));} -
#12474
e55a750Thanks @dyc3! - Fixed #12471: a comment above a CSS rule no longer removes the indentation of the rule’s wrapped selector./* comment */.sidebar-navigation.sidebar-navigation-item-with-a-long-descriptive-class-name {color: red;} -
#12180
6ddce62Thanks @dyc3! - Fixed #12179: the CSS parser now accepts Tailwind@custom-variantnames that start with a digit, such as the2xlbreakpoint.@custom-variant 2xl (@container page (width >= 96rem)); -
#12440
6636760Thanks @dyc3! - Fixed #12433: withhtml.experimentalFullSupportEnabled, the editor now offers code actions for diagnostics inside embedded code, such as expressions and scripts in Astro, Vue, Svelte, and HTML files. -
#12480
00771b4Thanks @vidigoat! - Fixed the formatter duplicating comments inside an empty object, array, or class that is spread in JSX. Each formatting pass added another copy of the comment.<div{...{/* comment */}/* comment */}}/> -
#11093
78c992fThanks @dyc3! - 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. -
#11563
a4e6528Thanks @santichausis! - Fixed #11419:noAdjacentSpacesInRegexno longer applies its fix inside a regex character class ([...]), where it was changing what the class matches instead of just clarifying the spacing.For example, Biome used to “fix” this regex into matching different characters:
const before = /[\s ]/;// Biome used to rewrite this to /[\s {3}]/, which is a different regex:// {3} isn't a quantifier inside a character class, it's three more// characters to match — the fixed regex now also matches "1", "2", "{", "}".Adjacent spaces outside a character class are still merged into a quantifier as before.
-
#12451
c71fe6aThanks @dyc3! - Fixed #12445:noTsIgnoreno longer reports comments that merely mention@ts-ignore, such as// see the note on @ts-ignore belowor JSDoc prose. The rule now follows TypeScript and only reports@ts-ignoreat the start of a comment, or at the start of the last line of a block comment. The fix now rewrites only the directive. -
#12266
33fef85Thanks @JamBalaya56562! - Fixed #12265: Biome now uses the correct defaults forsemiandsingleQuotewhen migrating a Prettier configuration that doesn’t set them. The migrated configuration uses"semicolons": "always"and"quoteStyle": "double", matching Prettier’s defaults. -
#11093
78c992fThanks @dyc3! - 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. -
#12246
b073c2fThanks @dyc3! - Fixed the parsing of Svelteclass:andstyle:directive names. Modifiers such as|importantinstyle:color|importantare now parsed as modifiers instead of being part of the name, and/in<input class:invalid/>now closes the tag. -
#12246
b073c2fThanks @dyc3! - Fixed #11215:noUnusedVariablesno longer reports variables in Svelte components that are only used through theclass:andstyle:directive shorthands, such as<div class:active>and<div style:color>. -
#12104
2bb4838Thanks @dyc3! - Fixed #12098:useImportExtensionsnow reports relative imports without extensions in Vue, Svelte, and Astro files whenhtml.experimentalFullSupportEnabledis enabled. -
#12441
c4199d7Thanks @dyc3! - Fixed commands that run with--use-serverreportingcancelled because of pending writefor some files instead of checking them. Biome now sends a cancelled request again, so the command reports the same diagnostics as a run without--use-server. -
#12242
0ec0a46Thanks @dyc3! - Fixed a false positive inuseVueConsistentDefinePropsDeclaration. The rule no longer reports calls such asa.b.c(0)or calls to a locally importeddefinePropsfunction. It now only checks calls to Vue’sdefinePropsmacro. -
#12244
fe217c6Thanks @dyc3! - Fixed a false positive innoVueDuplicateKeyswhere variables created from props wrapped inwithDefaults()were reported as duplicates of those props. The following code is now valid:<script setup lang="ts">import { toRefs } from "vue";const props = withDefaults(defineProps<{ text: string }>(), {});const { text } = toRefs(props);</script> -
#12240
e26a76bThanks @latent-9! - Fixed a false negative in noUnreachable and useGetterReturn:forloops whose test is a truthy literal, such asfor (; true ;), are now handled as infinite loops, consistent withwhileanddo...while. -
#12212
513f7dbThanks @siketyan! - Added support for formatting CSS-in-JS templates with interpolations, such as the ones of styled-components and Emotion, whenjavascript.experimentalEmbeddedSnippetsEnabledis enabled. The interpolations are formatted as JavaScript, and the text glued to them is kept as is.const Button = styled.button`color:${ (props)=>props.color };width : ${({width})=>width}px;color: ${(props) => props.color};width: ${({ width }) => width}px;`; -
#12131
05e3036Thanks @dyc3! - The HTML formatter now formats the JavaScript inside quoted Vue directive values, such as:prop,v-bind,v-if,@eventhandlers that reference a function, andv-slot. These values andv-forvalues are written between double quotes, and the strings inside them use single quotes.<div :bar="foo + 1" v-if='isVisible&&ready'></div><li v-for='item in ["a","b"]'></li><div :bar="foo + 1" v-if="isVisible && ready"></div><li v-for="item in ['a', 'b']"></li> -
#12218
73e169eThanks @dyc3! - The HTML formatter now formats Vue@eventhandlers that contain statements. A single expression stays on one line without a semicolon, and multiple statements are written on lines of their own inside the quotes, like Prettier does.<button @click="count += 1"></button><button @click="save( );close( )"></button><button @click="count += 1"></button><button@click="save();close();"></button>The parser also accepts handlers that start with a statement, such as
@click="if (ok) save()". The formatter adds the;that Vue needs to compile them as the body of a function:<button @click="if (ok) save()"></button><button @click="if (ok) save();"></button>Handlers that Vue compiles as the body of a function keep their semicolons with
"semicolons": "asNeeded", because Vue compiles a handler without a;as an expression. -
#12192
4d056a5Thanks @dyc3! - Fixed CSS package imports that use thestyleexport condition, such astw-animate-css. Withtailwind.stylesheetconfigured,useTailwindSortedClassesnow reads utilities and theme values from imported packages, including their transitive CSS imports. -
#12217
8a253f8Thanks @dyc3! - Updatedbiome migrate eslintto migratetailwindcss/enforces-shorthandtouseTailwindShorthandClasseswhen nursery rules are included, and@html-eslint/no-target-blanktonoBlankTarget. Corrected the reported reasons for unsupported legacy, deprecated, formatter-covered, and compiler-dependent rules. -
#12047
4db3f58Thanks @denbezrukov! - Fixed parsing of bareifidentifiers in CSSif()branch values, such asif(style(--enabled: true): if; else: serif). -
#12401
e295f02Thanks @dyc3! - FixeduseTailwindShorthandClassessuggesting invalid or behavior-changing shorthands for rotations, dividers, content alignment, and custom width and height tokens. Shorthand fixes now preserve!importantwith either leading or trailing!markers. -
#11854
2917939Thanks @dyc3! - Added support for mapped types such as{ [K in keyof T]: T[K] }to type inference. Type-aware rules now resolve the properties of mapped types, including generic aliases instantiated with concrete type arguments:type Optional<T> = { [K in keyof T]?: T[K] };declare const config: Optional<{ retries: number }>;// `config.retries` is now inferred as `number | undefined`.Mapped types that remap keys with an
asclause remain unsupported. -
#12251
7d55c42Thanks @dyc3! - Fixed #12233: thebiomecommand installed from npm now exits with a non-zero code when the Biome binary is killed by a signal, such as a crash fromSIGABRTorSIGSEGV. Previously, it exited with code0and reported the run as successful. -
#12157
a1320b1Thanks @dyc3! - Renamed the nursery ruleuseSortedClassestouseTailwindSortedClasses. Runbiome migrate --writeto update your configuration. -
#12124
d5ace64Thanks @levrik! - Biome now parses and formats thegenericattribute of Vue<script setup lang="ts">blocks, such asgeneric="TData extends RowData". The declared type parameters are no longer reported bynoUndeclaredVariables,noUnusedVariablesandnoUnusedImportsalso take the parameters into account now.<script setup lang="ts" generic="T extends Item,U"><script setup lang="ts" generic="T extends Item, U"> -
#12350
97c51a8Thanks @Netail! - Improved the diagnostics of the GraphQL rulesnoDuplicateArgumentNames,noDuplicateEnumValueNames,noDuplicateFieldDefinitionNames,noDuplicateGraphqlOperationName,noDuplicateInputFieldNamesandnoDuplicateVariableNames. Each diagnostic now names the duplicated identifier, highlights its first occurrence and points to every repeated occurrence, instead of highlighting the whole parent node or only the repeated occurrences. Names that are duplicated more than once in the same list are reported separately. -
#12178
8c4469cThanks @MustafaKemal0146! - Fixed #10212:useConsistentObjectDefinitionsno longer reports named function expressions such as{ b: function c() {} }, because converting them to methods can change the function’snameor how its name is resolved inside the body. -
9361d23Thanks @florian-lefebvre! - The JavaScript formatter now wraps a sequence expression returned from areturnorthrowstatement in parentheses, matching Prettier.return a, b;return (a, b); -
#12362
ac71f2bThanks @dyc3! - Improved the performance of the linter and assists, most of all when few rules are enabled, for example with--only. -
#12185
08cfbd2Thanks @dyc3! - Added the nursery rulenoTailwindLegacyUtilitiesfor JavaScript and HTML. It reports Tailwind CSS classes that Tailwind CSS only keeps for backward compatibility, and fixes them to their current names.<div className="flex-grow bg-gradient-to-r" />; // use `grow` and `bg-linear-to-r` -
#11093
78c992fThanks @dyc3! - 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); -
#12063
8724a5dThanks @dyc3! - Fixed #9749: in GritQL plugins andbiome search, acontainsfollowed by further conditions now tries every node it matches, instead of failing when the first match doesn’t satisfy the remaining conditions. -
#12154
79c1643Thanks @dyc3! - Added the new nursery ruleuseLowercaseTestTitle, which requires test, test suite, and benchmark titles to start with a lowercase letter.// Invalidit("Returns the cached value", () => {}); -
#12086
27a34f9Thanks @dyc3! -biome migrate eslintnow preserves the element lists ofreact/forbid-elements,svelte/no-restricted-html-elements, andvue/no-restricted-html-elementswhen migrating them tonoRestrictedElements. When several of these rules are configured, their lists are merged. -
#12174
bee1e54Thanks @dyc3! - Fixed the Tailwind class parser producing an invalid syntax tree for parenthesized and unary expressions inside arbitrary values. Classes likew-[calc(1px+(2px))],w-[calc((100%_-_2rem)/3)], andw-[calc(1px*-(2px))]now parse correctly. -
#12203
b1e35faThanks @dyc3! - Fixed parsing of Tailwind@themeat-rules with more than one option. Biome now accepts any number of options, includingprefix(...), such as the@theme default inline reference { ... }rule in Tailwind’s owntailwindcss/index.css. -
#11888
02e038fThanks @dfedoryshchev! - FixeduseNamingConventionreporting a declaration nested in anamespacethat is itself 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. This follows up #11827.export {}declare global {namespace Outer {// no longer reportednamespace my_NAMESPACE {}}} -
#12068
dd96b11Thanks @GreedyC! - Fixed #12004:noDuplicateFontNamesallowsfont-family: monospace, monospace, which preserves the inherited font size in browsers. -
#12411
4de5d3dThanks @latin-1! - Fixed #12410: theuseSortedPropertiesassist now preserves the relative order of Tailwind CSS wildcard resets such as--font-*: initialand other custom properties. -
#12211
8d0f080Thanks @Athish2002! - Fixed #11944:noUselessStringConcatsafe fix now accurately stringifies numbers according to ECMAScriptNumber::toStringsemantics, properly handling scientific notation (such as1e21and0.1e-6), alternate radixes, and separators. -
#12392
60211cbThanks @ematipico! - Fixed #12390: rules from theprojectandtypesdomains that are enabled in an override now run for files matched by that override. -
#12399
cd735e9Thanks @dyc3! - Fixed #12373:biome migrate eslintno longer migratesone-vartouseSingleVarDeclaratorunless--include-inspiredis passed. -
#12141
4efe06dThanks @dyc3! - Updatedbiome migrate eslintto recognize more upstream rules covered by existing Biome rules and explain why additional unsupported rules are skipped. -
#11093
78c992fThanks @dyc3! - The HTML parser now accepts mixed-casedoctypedeclarations. -
#12288
39d7595Thanks @dyc3! - Fixed false positives innoProtofor computed identifiers, property names containing quotes, and tagged templates. Expressions such asobj[__proto__]andobj[`"__proto__"`]no longer trigger the rule.Fixed missed diagnostics for
__proto__accesses through parentheses, TypeScript wrappers, and comma expressions, such asobj[('__proto__')]. -
#12341
9a44363Thanks @dyc3! - Improved the performance ofnoUnusedVariables,noUnusedImports, and the other lint rules that check whether a variable is used in another language of the same file. -
#11432
4befd08Thanks @ematipico! - Fixed JavaScript assist overrides and HTML parser, linter, and assist overrides so they are applied to matching files. -
#12339
8fa3b1aThanks @dyc3! - Improved the performance of the linter and assists by up to 50% on some files. -
#12322
b822e49Thanks @dyc3! - Improved the performance ofbiome format --writefor files without syntax errors. Biome no longer parses the formatted code of these files a second time. JSON files are not affected. -
#12362
ac71f2bThanks @dyc3! - Improved the performance of the lint rules that analyze control flow, such asnoUnreachableanduseGetterReturn. -
#12361
f447e08Thanks @dyc3! - Improved the performance ofnoIrregularWhitespace. The rule now spends much less time in files that contain no irregular whitespace. -
#12094
4e50a11Thanks @dyc3! - Added the nursery ruleuseConsistentBlockLang, which enforces the languages that the top-level blocks of Vue and Svelte components use. Theblocksoption configures the allowed languages per block, and the rule doesn’t check anything until it’s configured.For example, with
{ "blocks": { "script": { "lang": ["ts"] } } }, the following is reported:<script lang="js"></script> -
#12114
3743a53Thanks @dyc3! - Added the recommended nursery rulenoArgumentsCallerOrCallee, which disallowsarguments.callerandarguments.callee. For example,arguments.callee()now produces a diagnostic; refer to the function by name for recursion. -
#12360
c2cc18dThanks @dyc3! - Improved the performance ofnoTsIgnore. The rule now spends much less time in files that contain no@ts-ignorecomment. -
#12092
d7cf132Thanks @dyc3! - Added the nursery rulenoSvelteUselessDerivedBy, which reports$derived.by()calls whose function only returns a single expression, such as$derived.by(() => count * 2), and suggests$derived(count * 2)instead. -
#12133
2405c76Thanks @dyc3! - Added the nursery ruleuseNamedFunction, which requires functions written with thefunctionkeyword to have a name. For example,Foo.prototype.bar = function () {};is now reported. -
#12116
b52fee2Thanks @dyc3! - Added the new nursery rulenoUnsafeUnaryMinus, which uses type information to report unary-applied to values that aren’t anumberorbigint.declare const value: string;-value; -
#12072
c35b067Thanks @dyc3! - Added the nursery rulenoSvelteObjectInTextMustaches, which disallows object, array, function, and class literals in Svelte text mustaches, where they are rendered as strings such as[object Object].<!-- Invalid: renders "[object Object]" -->{{ name }} -
#12082
914dca7Thanks @dyc3! - Added the nursery rulenoUselessCall, which reports.call()and.apply()calls that can be replaced with a regular function call.obj.foo.call(obj, 1, 2);foo.apply(null, [1, 2]); -
#12067
21fb018Thanks @dyc3! - Added the nursery rulenoSvelteInspect, which reports uses of the Svelte$inspectrune, such as$inspect(count)or$inspect.trace(), left over from debugging. -
#12199
1004290Thanks @siketyan! - Fixed CSS metavariables in compound selectors, complex selectors, and property names in GritQL plugins andbiome search. Patterns such as`$tag:hover { color: red; }`,`$parent .child {}`and`$property: red`now match the intended rules and declarations, whereas they previously failed to parse or matched the wrong nodes. -
#12093
3c6331fThanks @dyc3! - Added the nursery ruleuseUnaryMinus, which reports multiplying or dividing by-1instead of using the unary minus operator.const inverted = value * -1; -
#12107
81773adThanks @dyc3! - Added the nursery rulenoUselessAssignment, which reports assignments whose value is never read before the variable is reassigned or stops being used.let id = "x1234"; // this value is never readid = generateId();doSomethingWith(id); -
#12115
47c3084Thanks @dyc3! - Improved type inference for template literals. Biome now infers untagged template literals as strings, so type-aware rules such asnoUselessTypeConversionnow report code likeString(`hello ${name}`). -
#12468
62d69dcThanks @dyc3! - Improved performance of thebiome searchcommand. -
#12272
84f62f2Thanks @dyc3! - ThenoTailwindRawColorsdiagnostic now lists up to three classes to use instead. Each one sets a color from your Tailwind CSS theme that looks similar to the reported palette color. Settailwind.stylesheetto the CSS file that holds your theme to get the list. Biome now scans your project when this rule is enabled, so that it can read that stylesheet.For example, with
--color-danger: oklch(0.58 0.24 27)in the theme, the diagnostic forbg-red-600/50listsbg-danger/50. -
#12402
cf6e36cThanks @dyc3! - FixeduseVueDefineMacrosOrdermissing misplaced bare macro calls and reporting the wrong macro for assigned calls. Its unsafe fix now orders all macro statements in one application and preserves their comments and statement boundaries. -
#12353
505e2b4Thanks @Netail! - Improved the quality of diagnostics emitted by the following rules:noAccessKeynoApproximativeNumericConstantnoArgumentsnoAsyncPromiseExecutornoAutofocusnoBarrelFilenoBeforeInteractiveScriptOutsideDocumentnoClassAssignnoCommentTextnoCommonJsnoCompareNegZeronoConfusingVoidTypenoConstantBinaryExpressionsnoDangerouslySetInnerHtmlnoDebuggernoDeletenoDocumentCookienoDuplicateAtImportRulesnoDuplicateCasenoDuplicateClassMembersnoDuplicateElseIfnoDuplicateFieldsnoDuplicateJsxPropsnoDuplicateSelectorsnoEmptyBlocknoEmptyInterfacenoEmptyPatternnoEmptySourcenoEmptyTypeParametersnoEqualsToNullnoExcessiveLinesPerFilenoExplicitAnynoExportsInTestnoExtraNonNullAssertionnoGlobalAssignnoGlobalEvalnoGlobalIsFinitenoGlobalIsNannoImplicitBooleannoImplicitCoercionsnoImportantInKeyframenoImportCyclesnoInferrableTypesnoInvalidBuiltinInstantiationnoInvalidDirectionInLinearGradientnoInvalidFileInputAcceptnoIrregularWhitespacenoJsxPropsBindnoLabelVarnoLabelWithoutControlnoMissingVarFunctionnoNegationElsenoNoninteractiveElementInteractionsnoNonNullAssertionnoOctalEscapenoPrecisionLossnoReactPropAssignmentsnoRedundantAltnoRedundantRolesnoRenderReturnValuenoRestrictedElementsnoRestrictedGlobalsnoRestrictedImportsnoRestrictedTypesnoSubstrnoUndeclaredEnvVarsnoUndeclaredVariablesnoUnknownFunctionnoUnknownMediaFeatureNamenoUnknownPropertynoUnknownPseudoClassnoUnknownTypeSelectornoUnknownUnitnoUnnecessaryConditionsnoUnsafeDeclarationMergingnoUnsafeNegationnoUnsafeOptionalChainingnoUntrustedLicensesnoUnusedExpressionsnoUnusedPrivateClassMembersnoUnusedTemplateLiteralnoUnwantedPolyfillionoUselessConstructornoUselessContinuenoUselessElsenoUselessLabelnoUselessRenamenoVoidElementsWithChildrenuseAdjacentOverloadSignaturesuseAriaPropsForRoleuseAriaPropsSupportedByRoleuseBlockStatementsuseCollapsedElseIfuseCollapsedIfuseConsistentArrayTypeuseConsistentArrowReturnuseConsistentBuiltinInstantiationuseConsistentGraphqlDescriptionsuseConstuseErrorCauseuseErrorMessageuseExplicitLengthCheckuseExponentiationOperatoruseFilenamingConventionuseGenericFontNamesuseGetterReturnuseGroupedAccessorPairsuseIsNanuseLiteralEnumMembersuseLiteralKeysuseNullishCoalescinguseNumberToFixedDigitsArgumentuseObjectSpreaduseOptionalChainuseSelfClosingElementsuseSemanticElementsuseShorthandAssignuseSimpleNumberKeysuseSimplifiedLogicExpressionuseSingleVarDeclaratoruseSolidForComponentuseSpreadOverApplyuseTailwindSortedClassesuseTemplateuseUnifiedTypeSignaturesuseValidAriaPropsuseValidAriaRoleuseValidAriaValuesuseValidAutocompleteuseValidForDirectionuseValidLanguseYield
-
#11093
78c992fThanks @dyc3! - Fixed a performance regression in type-aware JavaScript lint rules by inferring only requested types and memoizing export resolution. -
#12280
80a9204Thanks @dyc3! - Fixed #12278:noUnusedImportsnow recognizes Svelte imports used only through$storesubscriptions in markup or another script block. -
#11093
78c992fThanks @dyc3! - Added support for Svelte declaration tags usingletandconst. Biome can now parse, format, and lint bindings declared in these tags. -
#12394
eca05e8Thanks @florian-lefebvre! - Fixes a parser error for Astro shorthand attributes that use an expression instead of a bare identifier, such as{object?.something}:<div {object?.something}></div> -
#12171
271d9b2Thanks @dyc3! - ImproveduseBetterDomTraversingto offer its fix when the reported expression is followed by a comment, such aselement.childNodes[0] /* first */. The fix keeps the comment. -
#11961
6d419d4Thanks @dyc3! - Added the nursery ruleuseTailwindStaticClassStringsto the Tailwind domain. The rule reports class names assembled from fragments, such asclassName={"text-" + color}in JSX andclass="bg-{color}"in Svelte. -
#11801
81cccb0Thanks @dyc3! - Added the nursery rulenoTailwindRestyledComponents, which reports Tailwind appearance overrides on JSX and HTML components, such as<Button className="rounded-none" />. No appearance categories are allowed by default. Layout utilities without a category, such asw-fullandmt-4, are ignored. -
#12122
d87ecd3Thanks @dyc3! - Added the nursery rulenoProcessExit, which disallows callingprocess.exit(). For example,process.exit(1);is now reported. -
#12249
5fa646cThanks @dyc3! - Fixed #12247: type inference now infers array literals withoutas constas arrays, as TypeScript does. For example,[1, "a"]is inferred as(string | number)[]instead of a tuple. As a result,useArraySortComparenow reportssort()andtoSorted()calls on arrays without a type annotation.const numbers = [1, 2, 3, 10, 20, 30];numbers.sort(); -
#12434
8cfb294Thanks @fe-dudu! - Fixed #12187:noIrregularWhitespaceno longer reports irregular whitespace inside CSS and SCSS strings. It avoids duplicate diagnostics in nested rules and checks embedded CSS snippets. -
#12014
915dc9dThanks @ematipico! - FixednoDescendingSpecificitycomputing the wrong specificity for nested selectors, and ignoring nested selectors inside@containerand@starting-styleblocks. The following code is now reported, becausehtml body & .dresolves tohtml body .x .y .d, which is more specific than.x .y .d:.x {.y {html body & .d {}}}.x .y .d {} -
#12392
60211cbThanks @ematipico! - Fixed #12358: rules from a domain set tononenow remain disabled when an override configures another rule in the same group. -
#12070
6a8fb01Thanks @dyc3! - Added the nursery rulenoSvelteAddEventListener, which reportsaddEventListenercalls in Svelte files and suggests theonfunction fromsvelte/eventsinstead.<script>window.addEventListener("resize", handler);</script> -
#12089
dba2a37Thanks @ternaus! - Fixed #12088: false positives innoUnknownAttributefor React 19 transition event handlers.onTransitionCancel,onTransitionRun,onTransitionStart, and their capture variants are recognized when the React dependency range allows React 19 or later. -
#11093
78c992fThanks @dyc3! - Improved the performance of Biome formatter up to ~7% across the board. -
#12194
a3944f7Thanks @dyc3! - Added theallowedCategoriesandallowedClassesoptions to the nursery rulenoTailwindArbitraryValue. They allow arbitrary values in categories of utilities, such aslayout, or in specific classes, such asp-[13px].The rule no longer reports arbitrary modifiers, so
bg-black/[0.5]andtext-sm/[18px]are now valid. -
#12120
a1197acThanks @dyc3! - Added the nursery rulenoInvalidThis, which reportsthiswhere it isundefined: at the top level of a module, and in functions that aren’t methods or constructors.function foo() {this.a = 0;} -
#11093
78c992fThanks @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. -
#12052
1a6fb41Thanks @dyc3! - Vue rules that check props, such asnoVueReservedProps, now detect props declared insidewithDefaults(), for examplewithDefaults(defineProps<{ key?: string }>(), {}). -
#12292
4eadd57Thanks @ematipico! - Fixed a parse error in HTML and Svelte files when an attribute named?came right before the end of a tag.<div a ?>now has the attributesaand?, as it already did in Astro and Vue files. -
#12080
6e2ee70Thanks @dyc3! - Fixed #12079: the formatter no longer puts the parameters of a Svelte{#snippet}block on separate lines when they fit on one line.{#snippet children(item,)}{#snippet children(item)} -
#12346
ab77fa8Thanks @ematipico! - Fixed errors that the Biome language server sent to the editor with an empty message. For example, when a nested configuration file sets"root": true, the editor logs now show “Found a nested root configuration, but there’s already a root configuration.” instead of an empty line. -
#12090
79ed984Thanks @dyc3! - Added the nursery rulenoVueRequiredPropWithDefault, which reports Vue props that are marked as required but also have a default value.<script setup lang="ts">const props = withDefaults(defineProps<{ name: string }>(), {name: "World",});</script> -
#11967
4c1612bThanks @dyc3! - Added the nursery ruleuseBigintLiterals, which enforces bigint literals overBigInt()calls with a literal argument.// Invalidconst bigint = BigInt(1);const hex = BigInt("0xFF");// Validconst bigint = 1n;const hex = 0xFFn;const computed = BigInt(getSomeNumber()); -
#12014
915dc9dThanks @ematipico! - FixednoDuplicateSelectorsignoring nested selectors inside@containerand@starting-styleblocks. The following duplicate is now reported:.card {@container (min-width: 1px) {& > p {}& > p {}}} -
#12340
edbe9d7Thanks @maroKanatani! - Fixed #12320:useReactCompilernow analyzes files that contain an exported type alias, interface, or enum declaration, such asexport type Props = { id: string };. Previously, the rule silently skipped these files.
Copyright (c) 2023-present Biome Developers and Contributors.