Version History
Version 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.
Copyright (c) 2023-present Biome Developers and Contributors.