Packages

@biomejs/biome

2.6.8 · 15 Nov 2026MIT OR Apache-2.030.3M / weekRepositoryHomepagenpmAtom feed

Your version

2.6.4

28 Oct 2026Where it was published

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 a console.log(), console.debug(), console.info(), console.warn(), or console.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 than 1 passed as the depth of Array.prototype.flat() unless a comment inside the parentheses explains them.

    const items = array.flat(2);
  • Added the nursery rule noNull, which reports uses of the null literal and suggests undefined instead. Strict comparisons such as foo === null are allowed.

    let foo = null;
  • Added the nursery rule noReturnArrayPush, which reports code that uses the return value of push() or unshift(). 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 the data function of a Vue component. Vue runs data before it sets up computed properties, so the value read there is undefined.

    <script>
    export default {
      data() {
        return { total: this.doubled };
      },
      computed: {
        doubled() {
          return 2;
        },
      },
    };
    </script>
  • Added the nursery rule noVueDeprecatedDeleteSet, which reports calls to the $set and $delete functions, Vue.set and Vue.delete, and set and del imported from vue. 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 the tag prop on RouterLink. 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 the scope attribute on <template> elements in Vue files. Vue no longer supports this attribute, so use v-slot to 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 needs html.experimentalFullSupportEnabled to be true.

    <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 reports createEventDispatcher() 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 with defineOptions() 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 by defineProps() in Vue <script setup> blocks. It also reports withDefaults(), 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 requires useTemplateRef() instead of ref() or shallowRef() 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 the props option, defineProps(), or defineModel(). 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 an update: listener that only writes the new value back, and suggests v-model instead.

    <template>
      <MyComponent :title="title" @update:title="title = $event" />
    </template>
  • Added the nursery rule useVueValidDefineEmits, which enforces valid usage of Vue's defineEmits macro in <script setup>.

    For example, the following code is now reported, because defineEmits declares 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 reports defineProps() calls that Vue can't compile or that declare props incorrectly. For example, it reports a component that calls defineProps() twice, or whose defineProps() argument uses a variable declared in <script setup>:

    <script setup>
    const definition = { msg: String };
    defineProps(definition);
    </script>
  • Added the nursery rule useVueValidVIs, which reports v-is directives 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-is directive has no value:

    <template>
      <tr v-is></tr>
    </template>
  • Added the nursery rule useVueValidVMemo, which reports invalid v-memo directives in Vue templates. A v-memo directive must have an array value, can't have an argument or modifiers, and doesn't work inside an element with v-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 reports v-model directives 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-model directives are invalid:

    <template>
      <div v-model="foo"></div>
      <input v-model="foo + bar" />
    </template>
  • Added the new nursery rule useVueValidVShow, which reports v-show directives 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 malformed v-slot directives 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 as while (true) and for (;;) that start with an if statement containing only a break, and moves that condition into the while statement.

    while (true) {
      if (!hasMore()) {
        break;
      } // reported
      processNext();
    }
  • Updated useSortedProperties to follow stylelint-config-recess-order 7.9.0, adding sorting support for scroll-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 lint by 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-server run. 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 noBaseToString no longer reports slug below 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
    +   - b
  • Fixed 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-musl binary not using jemalloc, which it already ships: it fell back to musl's allocator, and biome check on several threads could take minutes instead of seconds, for example in Alpine-based CI images.

  • Fixed #12679: when markdown.parser.frontmatter and markdown.formatter.formatEmbeds are 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 bracketSpacing to formatter.bracketSpacing, both at the top level and inside overrides. JSON and GraphQL files are now formatted with the same bracket spacing as JavaScript files.

  • Fixed useSortedProperties to withhold sorting fixes that would change the effective values of overlapping declarations, physical/logical border or corner properties, or declarations followed by all.
    Updated noShorthandPropertyOverrides to recognize logical border, corner shape, position-try, text-box, and transition-behavior overrides.

  • Improved the performance of biome lint, biome check, and biome ci on files where rules report diagnostics with code fixes, by up to 12% with the default rules.

  • Fixed Biome processing pnpm-lock.yaml files. These generated lockfiles are now protected from processing.

  • Fixed an issue where the CLI, when it ran with --use-server alongside 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 noVueVIfWithVFor now also reports v-else-if and v-else on the same element as v-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-for bindings. 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" /> and this.$listeners inside 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.