Repository navigation
Releases
Biome CLI v2.6.6
2.6.6
Patch Changes
-
#12887
da0422eThanks @dyc3! - Added the new nursery rulenoArrayMethodsOnArguments. It reports calls to array methods on theargumentsobject, which isn't an array, so these calls throw aTypeErrorwhen the code runs.function sum() { return arguments.reduce((total, value) => total + value, 0); }
-
#12877
cd9e10fThanks @dyc3! - Added the nursery rulenoConstantComparisons, which reports&&and||conditions that can never be true, are always true, or contain a check with no effect.if (statusCode <= 400 && statusCode > 500) {}
-
#12876
a7c9586Thanks @dyc3! - Added the nursery rulenoErasingOperation, which disallows operations with0that always result in zero: multiplying by0, a bitwise AND with0, and dividing0by a number. The other value in these operations has no effect on the result, which usually means the code has a mistake.const total = price * 0;
-
#12841
e954f55Thanks @dyc3! - Added the nursery rulenoNegatedArrayPredicate, which reports negated calls toArray#some()andArray#every()and suggests moving the negation into the callback function.// Invalid: use `array.every((item) => !isUnicorn(item))` instead. const isMissing = !array.some((item) => isUnicorn(item));
-
#12888
15039f7Thanks @dyc3! - Added the new nursery rulenoNumberArgumentOutOfRange, which reports number literal arguments oftoString(),toFixed(),toExponential()andtoPrecision()that are outside the range the method accepts. These calls throw aRangeErrorat runtime.value.toString(64);
-
#12889
1cd7520Thanks @dyc3! - Added the nursery rulenoSharedBranchCode, which reports code that is repeated at the start or end of every branch of anifstatement. That code runs no matter which branch is taken, so it can be moved before or after theifstatement.if (condition) { doSomething(); cleanup(); } else { doSomethingElse(); cleanup(); }
-
#12842
d47fcfdThanks @dyc3! - Added the new nursery rulenoSubtractionComparison, which reports subtracting two values only to compare the difference with0, and suggests comparing the values directly.if (a - b > 0) {}
-
#12866
7c1cd5fThanks @dyc3! - Added the nursery rulenoSvelteIgnoredUnsubscribe, which reports calls to a store'ssubscribe()method when the returned function is ignored. Without that function, the subscription can never be stopped, which causes a memory leak.<script> import { count } from "./stores.js"; count.subscribe((value) => console.log(value)); </script>
-
#12890
6b73fcfThanks @dyc3! - Added the new nursery rulenoUninvokedArrayCallback, which reports array methods such asmap()andforEach()called with a callback on an array that only has empty slots. The callback never runs in this case.const list = new Array(5).map(() => createElement());
-
#12886
3bb18d8Thanks @dyc3! - Added the nursery ruleuseNextScriptForGoogleAnalytics, which reports<script>elements that load Google Analytics or Google Tag Manager. Use theGoogleAnalyticsandGoogleTagManagercomponents from@next/third-parties/googleinstead, which load these scripts after the page becomes interactive.<script async src="https://www.googletagmanager.com/gtag/js?id=G-XYZ" />
The rule belongs to the
nextdomain. -
#12309
0538e30Thanks @dyc3! - Added the new nursery ruleusePackageJsonCpu, which reportspackage.jsonfiles that have nocpufield. Thecpufield lists the processor types that the package supports.The following
package.jsonfile satisfies the rule:{ "name": "my-package", "version": "1.0.0", "cpu": ["x64", "arm64"] } -
#12310
191111dThanks @dyc3! - Added the nursery ruleusePackageJsonEngines, which reportspackage.jsonfiles that have noenginesfield.A
package.jsonpasses the rule once it declares the field:{ "name": "my-package", "engines": { "node": ">=20" } } -
#12986
cc929afThanks @dyc3! - Fixed #12954, where configuring rules in groups with more than 256 rules could enable or disable the wrong rule. -
#12931
fe9248eThanks @dyc3! - Improved the performance of linting. Each lint pass now spends less time stepping over syntax nodes that no enabled rule looks at. -
#12969
22d27e8Thanks @vibbix! - Improved the performance of CSS linting. Rules that compare selectors, such asnoDescendingSpecificityandnoDuplicateSelectors, now make fewer memory allocations. -
#12973
5a06df5Thanks @vibbix! - FixeduseGenericFontNamesreportingfont-familyinside@font-palette-values. There,font-familynames the font families the palette applies to, so it doesn't take a generic family.@font-palette-values --palette { font-family: Bixa; override-colors: 0 red; }
-
#12930
ce71284Thanks @dyc3! - Fixed #12073:useExhaustiveSwitchCasesnow reports non-exhaustive switches over values read fromfor...ofloops overArray.prototype.entries(),Map, andSet, and over properties of array elements indexed by anumbervariable.noMisusedPromisesnow also reports Promise-returning callbacks passed to array methods such asfindandevery. -
#12983
2987b54Thanks @ashokram-si! - Fixed #12957: Biome now correctly parses SCSS negative interpolation list items as separate values instead of an invalid subtraction operator.-margin: -#{$s} - #{$s} - #{$s} auto; +margin: -#{$s} -#{$s} -#{$s} auto;
What's Changed
Biome CLI v2.6.5
2.6.5
Patch Changes
-
#12755
bbc4887Thanks @dyc3! - Added the new nursery rulenoArrayForEach, which reportsforEach()calls that can be written asfor...ofloops. Values known not to be arrays, such as aMapor aSet, are ignored.array.forEach((element) => { bar(element); });
-
#12777
ba692e4Thanks @dyc3! - Added the new nursery rulenoAwaitInPromiseMethods, which reportsawaitinside the array passed toPromise.all(),Promise.allSettled(),Promise.any(), orPromise.race(). Theawaitpauses the code before the method is called, so the promises no longer run at the same time.Promise.all([await promise, anotherPromise]);
-
#12765
af84fb4Thanks @dyc3! - Added the new nursery rulenoChainedComparison, which reports comparisons chained likea < b < cora === b === c. JavaScript comparesawithbfirst, and then compares the resultingtrueorfalsewithc, so3 > 2 > 1isfalse.if (a < b < c) {}
-
#12547
0a2073dThanks @dyc3! - Added the nursery rulenoDynamicDelete, which disallows usingdeletewith a property name that is computed at runtime. Fixed property names written as string or number literals are allowed.delete container[name];
-
#12481
ed7adc2Thanks @dyc3! - Added the nursery rulenoLateEventControl, which reports calls topreventDefault(),stopPropagation(), andstopImmediatePropagation()that run after the browser has finished handling the event, where they have no effect.element.addEventListener("click", async (event) => { a 8000 wait save(); event.preventDefault(); });
-
#12795
179666dThanks @dyc3! - Added the nursery rulenoMapSpread, which disallows spreading objects or arrays in the values returned bymap()andflatMap()callbacks. Each spread copies a whole object or array for every item, which is slow for large arrays. Its unsafe fix replaces an object that starts with a spread withObject.assign().const users = getUsers(); const rows = users.map((user) => ({ ...user, role: getRole(user) }));
-
#12793
d9a99fdThanks @dyc3! - Added the nursery rulenoMismatchedMapKey, which reportsget()andset()calls that use a different key than thehas()check before them. Checking one key and then using another is usually a copy-paste mistake.if (map.has(key)) { map.get(otherKey); // reported }
-
#12342
1db7c0dThanks @vibbix! - Added the nursery rulenoMissingScssInterpolation, which disallows Sass variables and function calls in custom property values without#{}interpolation. Sass copies these values into the CSS unchanged, so the browser receives$gapormath.div(8px, 2)instead of their results. Its unsafe fix wraps variables in#{}.:root { --gap: $gap; --half: math.div(8px, 2); }
-
#12792
de86b37Thanks @dyc3! - Added the nursery rulenoMissingThrow, which reports errors that are created withnewbut never thrown. Its unsafe fix adds the missingthrowkeyword.function check(value) { if (!value) { new Error("Missing value"); } }
-
#12790
c23e4c3Thanks @dyc3! - Added the new nursery rulenoObjectLiteralComparison, which reports comparisons with an empty object{}or an empty array[]. These comparisons never check whether a value is empty, because objects and arrays are compared by reference.if (value === {}) {}
-
#12450
793f07dThanks @dyc3! - Added the new nursery rulenoPlaywrightUnsafeReferences, which reports functions passed topage.evaluate()orpage.addInitScript()that use variables declared outside of them. Playwright runs these functions in the browser page, where those variables don't exist.const x = 7; await page.evaluate(() => x * 2); // reported: `x` must be passed as an argument
-
#12388
a0160a4Thanks @vibbix! - Added the nursery rulenoPseudoElementInFunctionalPseudoClass, which disallows pseudo-elements inside:is(),:where(),:not()and:has(). Browsers drop these selectors, so the styles never apply to the pseudo-element..card:is(::before, ::after) { content: ""; }
-
#12779
bc1befbThanks @dyc3! - Added the new nursery rulenoSinglePromiseInPromiseMethods, which reports an array with a single element passed toPromise.all(),Promise.any(), orPromise.race(). The rule offers a fix that awaits the value directly or usesPromise.resolve().const result = await Promise.all([promise]);
-
#12241
d96de1dThanks @dyc3! - Added the nursery rulenoSvelteBindValueOnCheckableInputs, which reportsbind:valueon checkbox and radio inputs in Svelte files. Users change whether these inputs are checked, not theirvalue, sobind:valuedoes not track their choice.<input type="checkbox" bind:value={accepted} />
-
#12764
e166d08Thanks @dyc3! - Added the new nursery rulenoSyncMethods, which reports calls to functions whose names end withSync, such asfs.readFileSync(). These calls block the program until they finish. TheallowAtRootLeveloption allows them outside of functions, and theignoreoption allows specific function names.const contents = fs.readFileSync("data.txt");
-
#12515
c0a4174Thanks @dyc3! - Added the nursery rulenoTanstackQueryVoidQueryFn, which disallows TanStack Query functions that don't return any data. TanStack Query doesn't acceptundefinedas the data of a query, so the query fails with an error.import { useQuery } from "@tanstack/react-query"; useQuery({ queryKey: ["todos"], queryFn: async () => { await fetch("/api/todos"); }, });
The rule belongs to the
tanstackQueryandtypesdomains. -
#12482
1e6e407Thanks @dyc3! - Added the nursery rulenoUnnecessaryStringTrim, which reportstrim()calls beforestartsWith()orendsWith()when only one side of the string matters. UsetrimStart()ortrimEnd()instead.value.trim().startsWith("-");
...
Biome CLI v2.6.4
2.6.4
Patch Changes
-
#12261
19fbfb2Thanks @dyc3! - Added the new nursery rulenoConsoleSpaces, which reports a leading or trailing space in aconsole.log(),console.debug(),console.info(),console.warn(), orconsole.error()argument that sits next to another argument. These methods already put a space between arguments, so such a space prints twice.console.log("abc ", "def");
-
#12469
cd716d3Thanks @dyc3! - Added the new nursery rulenoMagicArrayFlatDepth, which reports number literals other than1passed as the depth ofArray.prototype.flat()unless a comment inside the parentheses explains them.const items = array.flat(2);
-
#12470
92c9e81Thanks @dyc3! - Added the nursery rulenoNull, which reports uses of thenullliteral and suggestsundefinedinstead. Strict comparisons such asfoo === nullare allowed.let foo = null;
-
#12483
9bd3527Thanks @dyc3! - Added the nursery rulenoReturnArrayPush, which reports code that uses the return value ofpush()orunshift(). These methods return the new length of the array, not the added item or the array.function add(item) { return items.push(item); }
-
#12477
a384892Thanks @dyc3! - Added the nursery rulenoUnreadableIife, which reports arrow functions that are called right where they are defined and whose body is wrapped in parentheses.const foo = (bar => (bar ? bar.baz : baz))(getBar());
-
#12447
0a963e4Thanks @dyc3! - Added the nursery rulenoUselessRecursion, which reports functions that return a call to themselves when a loop can do the same work. Too many nested calls can crash the program with a stack overflow error.function findRoot(node) { if (node.parent) { return findRoot(node.parent); } return node; }
-
#12554
2eddda9Thanks @dyc3! - Added the nursery rulenoVueComputedPropertiesInData, which reports computed properties used inside thedatafunction of a Vue component. Vue runsdatabefore it sets up computed properties, so the value read there isundefined.<script> export default { data() { return { total: this.doubled }; }, computed: { doubled() { return 2; }, }, }; </script>
-
#12586
824df15Thanks @dyc3! - Added the nursery rulenoVueDeprecatedDeleteSet, which reports calls to the$setand$deletefunctions,Vue.setandVue.delete, andsetanddelimported fromvue. Vue 3 removed these functions, so calling them throws an error.<script> export default { mounted() { this.$set(this.user, "name", "Alice"); }, }; </script>
-
#12648
6fc1a51Thanks @dyc3! - Added the nursery rulenoVueDeprecatedRouterLinkTagProp, which disallows thetagprop onRouterLink. Vue Router 4 ignores this prop, so the link still renders as an<a>element.<template> <RouterLink tag="li" to="/">Home</RouterLink> </template>
-
#12631
de1188fThanks @dyc3! - Added the new nursery rulenoVueDeprecatedScopeAttribute, which reports thescopeattribute on<template>elements in Vue files. Vue no longer supports this attribute, so usev-slotto receive slot props instead.<template> <ListComponent> <template scope="props">{{ props.title }}</template> </ListComponent> </template>
-
#12562
5d7553bThanks @dyc3! - Added the new nursery rulenoVueMultipleSlotArgs, which disallows passing more than one argument to a Vue slot from a render function. Slot content written in a template receives only the first argument.<script> export default { render() { return this.$slots.default(item, index); // reported }, }; </script>
-
#12513
2e520d8Thanks @dyc3! - Added the nursery rulenoVueMutatingProps, which reports code that changes the props of a Vue component, in the script or in the template. Props belong to the parent component, so the child should emit an event or copy the value instead.<script setup> const props = defineProps({ items: Array }); props.items.push("new item"); </script>
-
#12567
144b786Thanks @dyc3! - Added the nursery rulenoVueSideEffectsInComputed, which reports Vue computed properties that change state. Vue decides when to run a computed property, so changes made inside one happen at unpredictable times.<script setup> import { computed, ref } from "vue"; const items = ref([]); // `reverse()` changes `items.value` in place. const reversedItems = computed(() => items.value.reverse()); </script>
-
#12603
861b288Thanks @dyc3! - Added the new nursery rulenoVueUnusedRefs, which reports template refs in Vue components that nothing reads through$refs,useTemplateRef(), or a variable of the same name in<script setup>. The rule needshtml.experimentalFullSupportEnabledto betrue.<template> <input ref="input" /> </template>
-
#12285
68770e0Thanks @dyc3! - Added the new nursery rulenoYamlBooleanKeys, which disallows boolean values as keys in YAML. For example, the following key is a boolean instead of text, so it is reported:true: enabled
-
#12338
f46411bThanks @dyc3! - Added the nursery ruleuseSvelteEventDispatcherTypes, which reportscreateEventDispatcher()calls that don't declare the types of their events in Svelte components written in TypeScript.The rule accepts a call that declares its events:
<script lang="ts"> import { createEventDispatcher } from "svelte"; const dispatch = createEventDispatcher<{ save: string }>(); </script>
-
#12615
ade9845Thanks @dyc3! - Added the nursery ruleuseVueDefineOptions, which reports the default export of a plain<script>block in Vue components that also use<script setup>, and suggests setting those options withdefineOptions()instead.<script> export default { name: "MyComponent" }; // reported </script> <script setup> const props = defineProps(["title"]);...
Biome CLI v2.6.3
2.6.3
Patch Changes
-
#12275
807e616Thanks @dyc3! - Added the new nursery rulenoArraySortForMinMax, which reports sorting an array only to read its smallest or largest value. UseMath.min()orMath.max()instead.const minimum = array.toSorted((a, b) => a - b)[0];
-
#12432
cf61682Thanks @dyc3! - Added the nursery rulenoBooleanSortComparator, which reports sort comparators that return a boolean instead of a number. For example,array.sort((a, b) => a > b)never puts the first item before the second, so the array isn't sorted correctly. -
#12304
b4654c5Thanks @dyc3! - Added the new nursery rulenoEagerArrayMethodsInLoops, which reports.map()and.filter()calls in the header offor...ofloops. These calls build a new array that is only used by the loop.for (const name of users.map((user) => user.name)) { console.log(name); }
-
#12121
66c3791Thanks @dyc3! - Added the nursery rulenoNewRequire, which disallows callingrequirewithnew, such asnew require("app-header"). -
#12316
34b520dThanks @dyc3! - Added the new nursery rulenoObsoleteAttributes, which disallows obsolete attributes on HTML elements and suggests what to use instead.<table bgcolor="#ffffff" cellpadding="5"></table>
-
#12258
cce2385Thanks @dyc3! - Added the nursery rulenoPathConcat, which disallows building file paths and URLs by joining strings to__dirname,__filename,import.meta.dirname,import.meta.filename, orimport.meta.url.const fullPath = __dirname + "/foo.js"; // reported
-
#12287
e12ad78Thanks @dyc3! - Added the new nursery rulenoPlaywrightNthMethods, which disallows selecting Playwright elements by position withfirst(),last(), andnth(). A test that relies on the position of an element can act on a different element when the page changes.await page.locator("button").first().click();
-
#12343
62ad123Thanks @vibbix! - Added the nursery rulenoSelfNestedLayer, which disallows nesting a cascade layer inside a layer with the same name. Layer names inside an@layerblock are relative to it, so the inner layer below creates the sublayercomponents.componentsinstead of adding tocomponents.@layer components { @layer components { .button { color: red; } } }
-
#12289
bbbd95dThanks @dyc3! - Added the nursery rulenoShortTimeValues, which reports CSS animation and transition times that are shorter than the configuredminimumnumber of milliseconds. The rule does nothing untilminimumis set.For example, the following code is invalid when
minimumis100:a { transition-duration: 80ms; }
-
#12431
f748ec0Thanks @dyc3! - Added the nursery rulenoSvelteInternal, which disallows importing fromsvelte/internaland its submodules. These modules are private to Svelte and can change or disappear in any release.import { get_current_component } from "svelte/internal";
-
#12270
8ae35c4Thanks @dyc3! - Added the nursery rulenoTanstackQueryRestDestructuring, which disallows rest destructuring and object spread on TanStack Query results. Both read every property of the result, so the component updates on every change to the query.import { useQuery } from "@tanstack/react-query"; const { data, ...rest } = useQuery({ queryKey: ["todos"], queryFn: fetchTodos });
The rule belongs to the new
tanstackQuerydomain. -
#12308
372af2aThanks @dyc3! - Added the new nursery rulenoUnreadableForOfExpression, which reportsfor...ofandfor await...ofloops that go through the result of a complex expression instead of a variable, a property, or a short call.for (const item of getItems(createArgument(seed))) {} // reported
-
#12422
0be8d10Thanks @dyc3! - Added the new nursery rulenoUnsafeReturn, which disallows returning a value typed asanyfrom a function.function parse(text: string) { return JSON.parse(text); // reported }
-
#12311
8434c92Thanks @dyc3! - Added the nursery rulenoUselessSplice, which reportssplice()calls that have a simpler alternative. For example,array.splice(0, 1)can be written asarray.shift(). -
#12293
eaa4a2bThanks @dyc3! - Added the nursery rulenoVueUnusedEmitDeclarations, which reports events that a Vue component declares but never emits.For example, the following component never emits
close:<script setup> const emit = defineEmits(["change", "close"]); emit("change"); </script>
-
#12386
f01ebb0Thanks @dyc3! - Added the nursery rulenoVueVTextVHtmlOnComponent, which disallowsv-textandv-htmlon Vue components. These directives replace everything inside the component's root element instead of filling its slot.<template> <MyComponent v-html="html"></MyComponent> </template>
-
#12385
7bd38b7Thanks @dyc3! - Added the new nursery rulenoVueWatchAfterAwait, which disallows creating watchers after anawaitin a Vue component'ssetup()function. Vue doesn't stop these watchers when the component is removed. A watcher is allowed when the function it returns is stored, so that function can be called later to stop the watcher.<script> import { watch } from "vue"; export default { async setup() { await fetchUser(); watch(source, () => {}); }, }; </script>
-
#12286
50d2a4eThanks @dyc3! - Added the nursery rulenoZeroLengthUnit, which disallows units on zero lengths in CSS. Biome can remove the unit.a { top: 0px; }
-
#12300
ab2eb9eThanks @dyc3! - Added the nursery rule [useBlockStatementOverIife](https://biom...
JavaScript APIs v6.1.0
6.1.0
Minor Changes
-
#9940
1aefcb1Thanks @regseb! - AddedspanInBytesToSpanInCodeUnitshelper function in subpath exports of@biomejs/js-api.import { spanInBytesToSpanInCodeUnits } from "@biomejs/js-api/nodejs"; // Or: // import { spanInBytesToSpanInCodeUnits } from "@biomejs/js-api/bundler"; // import { spanInBytesToSpanInCodeUnits } from "@biomejs/js-api/web"; const [start, end] = spanInBytesToSpanInCodeUnits( diagnostic.location.span, content ); const text = content.slice(start, end); // Correctly extracts the text
-
#8912
e9785d8Thanks @dyc3! - Added GritQL search to@biomejs/js-api. Parse a pattern withparsePattern(), search content withsearchContent(), and release the pattern withdropPattern(). Matches are returned as UTF-8 byte offsets; usespanInBytesToSpanInCodeUnits()to convert them before slicing the content.const patternId = biome.parsePattern("`console.log($message)`", { defaultLanguage: "js", }); const { matches } = biome.searchContent(projectKey, content, { filePath: "example.js", patternId, }); biome.dropPattern(patternId);
Patch Changes
- Updated dependencies []:
- @biomejs/wasm-bundler@2.6.0
- @biomejs/wasm-nodejs@2.6.0
- @biomejs/wasm-web@2.6.0
What's Changed
- feat(js-api): add spanInBytesToSpanInCodeUnits in subpath exports by @regseb in #9940
- feat(useSortedAttributes): add sortFirst option by @thibaut-pro in #10631
- chore: merge main into next by @ematipico in #11044
- feat(plugins): add resolutionKind for object-syntax plugin entries by @soconnor-seeq in #10711
- feat(cli): output files information via biome rage by default by @christymcgrory in #6886
- feat: add partitionByNewLine option to useSortedInterfaceMembers by @LinusU in #10424
- ch
8BD0
ore:
mainintonextby @dyc3 in #11093 - feat(html): support .htm files by @Punisheroot in #11126
- chore: mege main into next by @ematipico in #11241
- feat(cli): add profiler for type inference by @ematipico in #11244
- feat(useSortedClasses): add support for html files by @gameroman in #11102
- chore: merge main into next by @ematipico in #11380
- feat(languages): support Google Apps Script (.gs) files by @JamBalaya56562 in #10837
- chore: merge main to next by @ematipico in #11433
- chore: merge main into next by @ematipico in #11490
- feat(cli): inspect config command by @ematipico in #11432
- feat(cli): enable Git VCS integration during init by @nhedger in #11477
- feat(cli): add
--gitflag to init command by @nhedger in #11479 - feat: enable markdown by @ematipico in #11394
- feat(plugin): distribution and loading by @ematipico in #11408
- chore: merge main into next by @ematipico in #11635
- feat: enable YAML and Markdown embedding by @ematipico in #11451
- feat(cli): biome inspect file command by @ematipico in #11709
- feat(grit): support range patterns by @dyc3 in #11713
- chore: marge main into next by @ematipico in #11811
- feat: yaml quotes and bracket spacing by @ematipico in #11832
- fix(cli): inspect plugins by @ematipico in #11634
- chore: yaml linting by @Netail in #11804
- chore: disable linting md code blocks by @ematipico in #12015
- chore: add more clarity to needs-repro bot message by @dyc3 in #12046
- chore: merge main into next by @ematipico in #12035
- feat: biome migrate stylelint by @Netail in #11742
- feat(npm): add Android (Termux) support to the npm distribution by @dlecan in #11133
- fix(grit): backtrack into contains when later conditions fail by @dyc3 in #12063
- feat(xtask): export unsupported rule metadata as JSON by @dyc3 in #12062
- fix(js_analyze): don't apply noAdjacentSpacesInRegex fix inside character classes by @santichausis in #11563
- fix(migrate): update upstream rule scope metadata by @dyc3 in #12066
- feat(migrate): additional unsupported rule reasons by @dyc3 in #12069
- docs: sync configuration rework by @yanthomasdev in #11629
- feat(lint/js/vue): add noVueBooleanDefault by @dyc3 in #12052
- fix(format/html): group snippet definitions so they only line break when necessary by @dyc3 in #12080
- feat(lint/js): add useBigintLiterals by @dyc3 in #11967
- fix(noUnknownAttribute): recognize React 19 transition events by @ternaus in #12089
- feat(lint/js): add
noZeroFractionsby @dyc3 in #9817 - fix(noDuplicateFontNames): allow monospace, monospace duplicate exception by @GreedyC in #12068
- perf(noUnknownAttribute): use binary searches instead of linear scans by @dyc3 in #12091
- fix(css_parser): distinguish legacy and modern if() syntax by @denbezrukov in #12047
- feat(css): support expression-based at-root queries by @denbezrukov in #12048
- fix(css_parser): parse unary and identifier-led SCSS list expressions by @denbezrukov in #12096
- chore: add sass spec to coverage by @ematipico in #12097
- ci: breakdown conformance job in groups by @ematipico in #12099
- chore: improve docs skill by @ematipico in #12100
- fix(migrate): support empty nested configuration by @tionway in #12075
- feat(type_inference): support mapped keyof types by @dyc3 in #11854
- chore: update rule metadata by @dyc3 in #12102
- fix(useImportExtensions): take html modules into account by @dyc3 in #12104
- docs: improve lint rules and code actions by @ematipico in #12101
- feat(lint/js): add noIteratorProperty by @dyc3 in #12083
- feat(lint/js/svelte): add noSvelteInspect by @dyc3 in #12067
- feat(lint): add noProcessExit by @dyc3 in #12122
- feat(lint/html): add noRestrictedElements to HTML by @dyc3 in #12084
- feat: promote rules by @ematipico in #12108< 10000 /li>
- chore: use agents all over by @ematipico in #12125
- docs(lint): document the noImplicitReturns caveat of noUselessReturn by @ff1451 in #12054
- feat(css): support dynamic supports heads by @denbezrukov in #12127
- docs: improve docs for useButtonType by @dyc3 in #12051
- chore(deps): update rust crate libc to 0.2.190 by @renovate[bot] in #12139
- fix(css): support percentage steps in SCSS bodies by @denbezrukov in #12128
- fix(migrate): apply upstream lint rule scope decisions by @dyc3 in #12141
- revert: "feat(lint/js): add noIteratorProperty (#12083)" by @dyc3 in #12148
- feat(migrate): new unsupported rule reasons by @dyc3 in #12142
- feat(lint): update useLogicalProperties rule to include values by @Th3S4mur41 in #11953
- fix(parse/tailwind): parse css selectors that start with
[by @dyc3 in #12152 - feat(tailwind): add top-level detection configuration by @dyc3 in #11386
- ci: disallow pr titles to end with
…(one character, not 3) by @dyc3 in #12153 - feat(lint): add
ignoreElementsoption tonoRedundantRolesby @dyc3 in #12033 - feat(migrate): migrate noRestrictedElements options from react, vue, and svelte rules by @dyc3 in #12086
- chore(deps): update github-actions by @renovate[bot] in https://github.com/biom...
Biome CLI v2.6.2
2.6.2
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 { ADMIN USER } 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.
biome lint --profile-type-inference
profiler ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ i Type inference profile (Biome <version>) src/index.ts Requests (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:noLoopFuncnoJsxLeakedDollar10BC8noReactStringRefs(recommended)useScopedStyles(recommended)noReactNativeDeepImports(recommended, error severity)noDrizzleDeleteWithoutWhere(recommended, error severity)noDrizzleUpdateWithoutWhere(recommended, error severity)noConditionalExpectuseExpectnoIdenticalTestTitle(recommended)- [`no...
Biome CLI v2.5.15
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](https://github...
Biome CLI v2.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 callback Promise.resolve(1).finally(() => { return 2 }) // Valid: no return in finally callback Promise.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 Svelte> 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>
Biome CLI v2.5.13
2.5.13
Patch Changes
-
#11379
07a0073Thanks @Netail! - Added the nursery ruleuseLayeredStyles, which enforces that style rules are defined within a cascade layer and import rules to import its styles into a cascade layer./* Invalid */ @import 'foo.css'; .my-style { color: red; } /* Valid */ @import 'foo.css' layer(base); @layer base { .my-style { color: red; } }
-
#11667
e997900Thanks @devtechedge! - Added the nursery ruleuseBetterDomTraversing, which prefers.firstChild,.firstElementChild,.closest(), and merged.querySelector()calls over positional DOM traversal.element.childNodes[0]; element.children[0]; element.parentElement.parentElement; element.querySelector(< 8 /span>
"a").querySelector("b"); -
#11620
20e513aThanks @jakeleventhal! - Fixed #11610, #11611, #11612, #11615, and #11616: Biome no longer fully infers an imported generic declaration just to apply its type arguments, restoring type-aware lint performance for large libraries such as Zod. This improvesuseRegexpExec,noFloatingPromises,noMisusedPromises,useNullishCoalescing, andnoUnsafePlusOperands. -
#11657
e322040Thanks @ematipico! - Fixed #7495:noUselessConstructornow ignores TypeScript constructors that forward at least one argument tosuper, preserving constructors that narrow the subclass's accepted parameter types. The exemption also applies when the parent and child signatures are identical; JavaScript and zero-argument forwarding behavior are unchanged. -
#11670
4969ee1Thanks @ematipico! - Fixed #7076:useAriaPropsForRoleanduseFocusableInteractiveno longer report non-focusable elements withrole="separator". A separator with an explicittabIndexortabindexstill requiresaria-valuenow. -
#11627
23aad6dThanks @ematipico! - Fixed #6571 so Grit plugins can capture and inspect multiple named import specifiers. -
#11631
00dbd3aThanks @ematipico! - Reduced unnecessary type inference when type-aware lint rules inspect members of namespace imports from libraries such as Zod. Fixed type inference so blanket re-exports do not expose default exports. -
#11628
a2f8ff7Thanks @dyc3! - Added the nursery rulenoXorAsExponentiation, which reports the bitwise XOR operator^between two decimal integer literals, where the exponentiation operator**was likely intended.const kibibyte = 2 ^ 10; // 8, not 1024
-
#11670
4969ee1Thanks @ematipico! - Fixed #7192:noUnusedPrivateClassMembersnow considers compound assignments such as??=to read and use private class members. -
#11676
840a52aThanks @dyc3! - Fixed #11672 and #11671 by disabling the experimental capitalized-call and effect-dependency checks inuseReactCompiler, matching their exclusion from upstream's recommended lint preset. Valid calls such asIntl.NumberFormat()and captures of variables declared inside effects no longer produce these diagnostics. -
#11660
49485edThanks @ematipico! - Fixed #11653: Astro template suppression comments ({/* biome-ignore lint: reason */}) now suppress matching HTML lint diagnostics on the following line when full HTML support is enabled. -
#11664
9a73b9cThanks @dyc3! - Improved the performance ofuseRegexpExec. -
#11661
5341b3fThanks @ematipico! - Fixed #7479.noUnusedVariablesnow treats Unicode escapes in identifiers as the same binding as their decoded spelling. -
#11630
62e1fc5Thanks @dyc3! - Fixed the HTML formatter inserting whitespace between adjacent Svelte expressions when their combined length exceeds the line width.<span> - {head.median - base.median >= 0 ? "+" : "−"} - {formatMs(Math.abs(head.median - base.median))} + {head.median - base.median >= 0 ? "+" : "−"}{formatMs(Math.abs(head.median - base.median))} </span>
-
#11658
ed4bfa4Thanks @fredrikblau! - Fixed #11644:useHeadingContentno longer reports headings that render their text with a directive:set:htmlandset:textin Astro files,v-htmlandv-textin Vue files.<h1 set:html={heading} /> <h2 set:text={heading}></h2>
<template> <h1 v-html="heading"></h1> <h2 v-text="heading"></h2> </template>
-
#11613
47d7383Thanks @ematipico! - Improved the performance of Biome Formatter up to ~50% in some cases. -
#11655
fd8fc74Thanks @ematipico! - Fixed #6974, wherenoUnusedPrivateClassMembersincorrectly reported TypeScript private constructor properties read through object destructuring fromthisas unused. -
#11618
21a10cfThanks @siketyan! - Fixed #11605: Type inference now infers the type of an unannotated callback parameter from the signature of the function the callback is passed to, and honours explicit type arguments on call expressions. This improves type-aware analysis fornoBaseToString,noFloatingPromises,noMisleadingReturnType,noMisusedPromises, [noUnnecessaryConditions](https://biomejs.dev/linter/r...
Biome CLI v2.5.12
2.5.12
Patch Changes
-
#11440
b88f1eaThanks @Princesseuh! - Fixed Astro attribute expressions rejecting TypeScript and JSX syntax that is accepted in text expressions.<Component icon={<Icon />} count={total as number} onSelect={(e: Event) => e} />
-
#11440
b88f1eaThanks @Princesseuh! - Fixed Astro attribute names being split on:and.inside an expression, such as{x && <button x-on:keyup.enter={go} client:load.foo />}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed a bare>in the children of an Astro expression being treated as markup, such as{x && <div>a > b</div>}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed HTML comments inside an Astro expression failing to parse. They are now read as trivia, wherever they appear among the children.{x && <div><!-- first -->text<!-- last --></div>} {cond && <a></a><!-- c --><b></b>}
-
#11440
b88f1eaThanks @Princesseuh! - Fixedis:rawchildren inside an Astro expression being read as JSX, such as{x && <div is:raw>{not js} < & text</div>}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed an apostrophe or quote in the text of a JSX element inside an Astro expression ending the expression early, such as{items.map((i) => <li>it's {i}</li>)}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed the children of a<script>or<style>inside an Astro expression being read as JSX. Their contents are text, so braces and comparisons no longer have to be escaped.{cond && <style>a { color: red }</style>} {cond && <script>let x = {a: 1};</script>}
-
#11440
b88f1eaThanks @Princesseuh! - Added support for template literal attribute values inside an Astro expression, such as{x && <C data-x=`t${x}` />}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed unquoted attribute values being rejected inside an Astro expression, such as{x && <a class=foo maxlength=255 href=/about>go</a>}. -
#11440
b88f1eaThanks @Princesseuh! - Fixed a template literal nested inside${}breaking the rest of an Astro file, such asconst href = `/blog${page === 0 ? '' : `/${page + 1}`}`;. -
#11440
b88f1eaThanks @Princesseuh! - Fixed a quote inside a regex character class breaking the rest of an Astro file, such asconst unsafe = /[/"]/;. -
#11508
54f3a2eThanks @dyc3! - Added the nursery ruleuseFlatMathMinMax. BecauseMath.min()andMath.max()accept any number of arguments, the rule reports unnecessary nested calls to the same method:Math.max(Math.max(a, b), c);
The fix flattens this expression to
Math.max(a, b, c). -
#11585
c5c8315Thanks @Netail! - Fixed #11475:noUnresolvedImportsno longer reports Bun runtime built-in modules (bun,bun:bundle,bun:ffi,bun:jsc,bun:sqlite,bun:test). -
#11368
52a57b3Thanks @Austin1serb! - Fixed #6830: Biome now reports a diagnostic for excessively deep syntax instead of overflowing the native stack while releasing the parsed tree. -
#11596
1fc42edThanks @dyc3! - Added the nursery rulenoThisOutsideOfClass. The rule reportsthisoutside class members and TypeScript functions with an explicitthisparameter.function Person(name) { this.name = name; }
-
#11555
2516335Thanks @dyc3! - Fixed #11529, wherenoFloatingPromisesmissed unhandled Promise chains when the imported function's module belonged to an import cycle. Cyclic modules now preserve types for exports that do not participate in recursive type dependencies. -
#11518
0fee70cThanks @HarperZ9! - Fixed #11500: the formatter now prints thedeclaremodifier before accessibility modifiers on class properties.private declare readonly name: stringis now formatted asdeclare private readonly name: string, matching Prettier and TypeScript's canonical modifier order. -
#11580
1277af2Thanks @ematipico! - Fixed #5091: Biome no longer moves comments next to the<of a generic, which causes invalid TypeScript syntax:- Generic<// a comment + Generic< + // a comment
-
#11577
42995d2Thanks @ematipico! - Fixed #4592. Biome no longer crashes while parsing malformeddeleteexpressions. -
#11590
67963b4Thanks @ematipico! - Fixed #6427 so Grit plugins can usefunction = ...as a node argument. -
#11600
a689cb5Thanks @ematipico! - Fixed #6644:noUnusedVariablesnow recognizes all interface declarations in a TypeScript declaration-merging group when the interface is referenced.The following snippet no longer triggers the rule.
interface Things { foo: string; } interface Things { bar: string; } export type Key = keyof Things; interface Things { baz: string; }
-
#11591
d4a0716Thanks @ematipico! - Fixed #6615.noDuplicatePropertiesno longer reports declarations nested in block at-rules as duplicates of declarations in their parent block. -
#11492
f2a07aaThanks @santichausis! - Fixed #11454:noMisplacedAssertionnow recognises@fast-check/vitest'stest.prop(...)(and.concurrent.prop,.skip.prop, etc.) as a test function, the same way it already recognisestest.each. The JS formatter picks up the same recognition, so a curriedtest.prop(...)(...)call is now formatted with the regular breakable argument layout used fortest.each/test.for, inste...
6D39
ul>