@biomejs/biome
2.6.8 · 15 Nov 2026MIT OR Apache-2.030.3M / weekRepositoryHomepagenpmAtom feed
2.6.9 is the newest release of 2.x.
In short
30 new24 fixed
Release note
The section about @biomejs/biome of a note shared by several packages.
Patch Changes
Added the new nursery rule
noConsoleSpaces, 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");Added the new nursery rule
noMagicArrayFlatDepth, 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);
Added the nursery rule
noNull, which reports uses of thenullliteral and suggestsundefinedinstead. Strict comparisons such asfoo === nullare allowed.let foo = null;
Added the nursery rule
noReturnArrayPush, 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); }Added the nursery rule
noUnreadableIife, 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());
Added the nursery rule
noUselessRecursion, 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; }Added the nursery rule
noVueComputedPropertiesInData, 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>Added the nursery rule
noVueDeprecatedDeleteSet, 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>Added the nursery rule
noVueDeprecatedRouterLinkTagProp, 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>
Added the new nursery rule
noVueDeprecatedScopeAttribute, 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>Added the new nursery rule
noVueMultipleSlotArgs, 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>Added the nursery rule
noVueMutatingProps, 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>Added the nursery rule
noVueSideEffectsInComputed, 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>Added the new nursery rule
noVueUnusedRefs, 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>
Added the new nursery rule
noYamlBooleanKeys, 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
Added the nursery rule
useSvelteEventDispatcherTypes, 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>Added the nursery rule
useVueDefineOptions, 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"]); </script>Added the nursery rule
useVueDefinePropsDestructuring, which requires destructuring the props returned bydefineProps()in Vue<script setup>blocks. It also reportswithDefaults(), because destructured props can set their default values directly.<script setup lang="ts"> const props = defineProps<{ foo?: string }>(); </script>Added the nursery rule
useVueTemplateRef, which requiresuseTemplateRef()instead ofref()orshallowRef()to access elements of the template in<script setup>.<template> <input ref="input" /> </template> <script setup> import { ref } from "vue"; const input = ref(); // reported </script>Added the nursery rule
useVueTypedProps, which reports Vue props declared without a type, in thepropsoption,defineProps(), ordefineModel(). Without a type, Vue accepts any value for the prop and can't warn when a component receives the wrong kind of value.<script setup> defineProps(["title"]); </script>
Added the nursery rule
useVueVModel, which reports a prop binding on a Vue component paired with anupdate:listener that only writes the new value back, and suggestsv-modelinstead.<template> <MyComponent :title="title" @update:title="title = $event" /> </template>
Added the nursery rule
useVueValidDefineEmits, which enforces valid usage of Vue'sdefineEmitsmacro in<script setup>.For example, the following code is now reported, because
defineEmitsdeclares its events with both a type and an argument:<script setup lang="ts"> const emit = defineEmits<(e: "notify") => void>(["submit"]); </script>
Added the nursery rule
useVueValidDefineProps, which reportsdefineProps()calls that Vue can't compile or that declare props incorrectly. For example, it reports a component that callsdefineProps()twice, or whosedefineProps()argument uses a variable declared in<script setup>:<script setup> const definition = { msg: String }; defineProps(definition); </script>Added the nursery rule
useVueValidVIs, which reportsv-isdirectives that have an argument or modifiers, have no value, or are used on a component instead of a native HTML element.For example, the following
v-isdirective has no value:<template> <tr v-is></tr> </template>
Added the nursery rule
useVueValidVMemo, which reports invalidv-memodirectives in Vue templates. Av-memodirective must have an array value, can't have an argument or modifiers, and doesn't work inside an element withv-for.For example, the following value is an object instead of an array:
<template> <div v-memo="{ id }"></div> </template>Added the nursery rule
useVueValidVModel, which reportsv-modeldirectives that Vue can't use: on unsupported elements or file inputs, with an argument or unknown modifier on a native element, without a value, or with a value that can't be assigned to.For example, the following
v-modeldirectives are invalid:<template> <div v-model="foo"></div> <input v-model="foo + bar" /> </template>
Added the new nursery rule
useVueValidVShow, which reportsv-showdirectives that have an argument, a modifier, or no value, or that are placed on a<template>element.<template v-show="isVisible"><div></div></template>
Added the nursery rule
useVueValidVSlot, which reports misplaced, duplicated, or malformedv-slotdirectives in Vue templates.For example, the rule reports two
<template>elements that fill the same slot:<MyComponent> <template #header>First title</template> <template #header>Second title</template> </MyComponent>
Added the new nursery rule
useWhileLoopCondition, which reports loops such aswhile (true)andfor (;;)that start with anifstatement containing only abreak, and moves that condition into thewhilestatement.while (true) { if (!hasMore()) { break; } // reported processNext(); }Updated
useSortedPropertiesto followstylelint-config-recess-order7.9.0, adding sorting support forscroll-behavior, anchor positioning, multi-column layout, and other properties known to Biome.Improved the performance of the linter. Biome now spends less time setting up the enabled rules for each file it analyzes.
Improved the performance of
biome lintby about 1% to 3% on large projects, most noticeably with Biome's default rules and with rules that track variables or unreachable code.Fixed #12466: the Biome daemon used more memory with every
biome check --use-serverrun. The daemon now reuses the data that it stores for each file and project, and it keeps syntax trees only for the files that it read most recently.Fixed biomejs/biome-vscode#923: when a file open in the editor changed on disk, the language server replaced the editor's text with the text on disk. Biome now keeps the editor's text of open files until they are closed, so diagnostics, code actions and formatting stay at the right positions.
Fixed #12651: an imported name that the other module exports as both a type and a value now resolves to the type in type annotations, so
noBaseToStringno longer reportsslugbelow as an object.// rule-slug.ts export type RuleSlug = string; export const RuleSlug = { create: (text: string): RuleSlug => text } as const; // main.ts import { RuleSlug } from "./rule-slug"; export const label = (slug: RuleSlug): string => `rule ${slug}`;Fixed biomejs/biome-vscode#1113: the language server now shows a warning when the configuration file can't be parsed. Previously, Biome stopped processing files without telling the user why.
Fixed #12645: the Markdown formatter no longer removes the blank line between a blockquote and the list that follows it, matching Prettier.
> A note. - one - two
Fixed #12663: the Markdown formatter no longer removes the blank line between a table and the list that follows it, matching Prettier.
| Table | | ----- | | Value | - Hello
Fixed #12541: Markdown list items whose markers are indented 4 or more spaces now nest at the correct level. Previously the formatter could move such an item under the item before it, or join it to that item's text.
1. Step - a - x - - y - - b + - y + - bFixed formatting of Markdown block quotes inside deeply indented list items. With
proseWrap: "always", consecutive quote lines now wrap together within the same quote, while setext headings and fenced code blocks keep their structure.10. item - > first line - > second line + > first line second line
Fixed #12542: the Markdown formatter is no longer idempotent when it formats tables.
- | a | b | - | -------- | ----- | - | x | `y` z | - | `p` z`q` | r | + | a | b | + | --------- | ----- | + | x | `y` z | + | `p` z `q` | r |
Fixed the
linux-x64-muslbinary not using jemalloc, which it already ships: it fell back to musl's allocator, andbiome checkon several threads could take minutes instead of seconds, for example in Alpine-based CI images.Fixed #12679: when
markdown.parser.frontmatterandmarkdown.formatter.formatEmbedsare enabled, the Markdown formatter keeps the frontmatter of a fenced Markdown code block as written. Previously, it formatted the frontmatter as a thematic break and a paragraph, which removed the indentation of its YAML.```markdown --- verified: by: human --- # Policy ```
Fixed #12643 and #12669: Biome now migrates the Prettier option
bracketSpacingtoformatter.bracketSpacing, both at the top level and insideoverrides. JSON and GraphQL files are now formatted with the same bracket spacing as JavaScript files.Fixed
useSortedPropertiesto withhold sorting fixes that would change the effective values of overlapping declarations, physical/logical border or corner properties, or declarations followed byall.
UpdatednoShorthandPropertyOverridesto recognize logical border, corner shape,position-try,text-box, andtransition-behavioroverrides.Improved the performance of
biome lint,biome check, andbiome cion files where rules report diagnostics with code fixes, by up to 12% with the default rules.Fixed Biome processing
pnpm-lock.yamlfiles. These generated lockfiles are now protected from processing.Fixed an issue where the CLI, when it ran with
--use-serveralongside an editor connected to the same daemon, checked the unsaved text of the files open in the editor instead of the files on disk, and could make the editor's text get lost. The CLI now checks the files on disk, and every editor and CLI run connected to the daemon keeps its own text of the files it opens.The rule
noVueVIfWithVFornow also reportsv-else-ifandv-elseon the same element asv-for.<div v-if="loading">Loading...</div> <TodoItem v-else v-for="todo in todos" :todo="todo" />
Fixed parsing of default values in Vue
v-forbindings. Biome now parses the default value as JavaScript, so it is formatted and linted like other template expressions instead of being reported as a parse error.<div v-for="{ value = gt('v-for default') } in rows" />Fixed non-JSON files inside the global settings directories of Zed, VS Code, and Cursor being parsed as JSON.
Fixed an issue where the language server kept using the previous parser options for open files after the configuration changed. Open files are now parsed again with the new options, for example
json.parser.allowComments.Improved the performance of Biome when it processes many files by up to 7%.
Added the nursery rule
noVueDeprecatedListeners. It reports references to$listeners, which Vue 3 removed, in Vue templates and component objects. For example, Biome now reports<div v-on="$listeners" />andthis.$listenersinside a Vue component.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.