Skip to content

All versions since 2.6.7

2.6.7

Patch Changes

  • #12906 b3375d2 Thanks @dyc3! - Added the nursery rule noAsyncPromiseFinally, which reports async functions passed to a promise’s .finally() method. If such a function fails, its error replaces the original result or error of the promise.

    promise.finally(async () => {
    await cleanup();
    });
  • #12894 e24da6f Thanks @dyc3! - Added the nursery rule noDuplicateTypeConstituents, which reports types listed more than once in a union or intersection type, and undefined in the type of an optional parameter.

    type T = string | number | string;
    function f(a?: string | undefined) {}
  • #12899 6c15027 Thanks @dyc3! - Added the nursery rule noExcessiveSelectorComplexity, which limits how many IDs, type selectors, attribute selectors, pseudo-classes, universal selectors, compound selectors, and combinators a CSS selector can contain. It can also disallow chosen combinators, pseudo-classes, pseudo-elements, attributes, and attribute operators. The rule does nothing until an option is set.

    For example, with "maxIds": 1, the following selector is reported:

    #main #sidebar {}
  • #12897 0b8f429 Thanks @dyc3! - Added the new nursery rule noInvalidFetchOptions, which reports a body in the options of fetch() and new Request() when the method is GET or HEAD. These calls throw a TypeError at runtime. When no method is given, the request uses GET.

    await fetch("/", { method: "GET", body: "foo=bar" });
  • #12926 9b6b9f4 Thanks @dyc3! - Added the nursery rule noNewArray, which reports new Array() calls with a single argument. Such a call creates an empty array of the given length when the argument is a number, and an array that holds the argument otherwise.

    const array = new Array(length);
  • #12895 739440f Thanks @dyc3! - Added the new nursery rule noRedundantTypeConstituents, which reports members of union and intersection types that have no effect, such as a literal type next to its primitive type, or never in a union.

    type Status = "active" | string;
  • #12810 71ab61b Thanks @dyc3! - Added the nursery rule noSvelteAsyncStore, which disallows passing async functions to the writable(), readable(), and derived() stores from svelte/store.

    import { writable } from "svelte/store";
    const user = writable(null, async (set) => {
    set(await fetchUser());
    });
  • #12917 37d9f41 Thanks @dyc3! - Added the new nursery rule noUnresolvedDefaultImport, which reports default imports from modules that have no default export. The rule is part of the project domain.

    // foo.js only contains `export function foo() {}`
    import foo from "./foo.js";
  • #12892 f16842e Thanks @dyc3! - Added the nursery rule noUselessFallbackInSpread, which reports empty object fallbacks when spreading a value into an object. Spreading null, undefined, or another falsy value into an object adds no properties, so the fallback has no effect.

    const object = { ...(options || {}) };
  • #12785 c198be2 Thanks @dyc3! - Added the new nursery rule noUselessParameterPropertyAssignment, which reports constructor assignments such as this.name = name when name is a parameter property. TypeScript already sets the property to the parameter’s value, so the assignment does nothing.

    class User {
    constructor(public name: string) {
    this.name = name;
    }
    }
  • #12900 a4d1b0f Thanks @dyc3! - Added the nursery rule noUselessSpread, which reports spread syntax that has no effect. For example, [first, ...[second]] can be written as [first, second], and new Set([...items]) can be written as new Set(items).

  • #12902 d7d755b Thanks @dyc3! - Added the nursery rule noVueExposeAfterAwait, which reports expose() and defineExpose() calls that come after an await in a Vue component’s setup code. These calls run too late, so a parent component might not receive the exposed properties.

    <script setup>
    await fetchUser();
    defineExpose({ reload });
    </script>
  • #12596 d33e56e Thanks @dyc3! - Added the nursery rule useAtomicUpdates, which reports assignments in async functions and generators that can be based on an outdated value because the function paused at an await or yield after reading it.

    let total = 0;
    async function addToTotal(getAmount) {
    total += await getAmount(); // reported
    }
  • #12901 48e3572 Thanks @dyc3! - Added the new nursery rule useConsistentBooleanName. It requires variables, parameters, and functions that hold or return a boolean to start with a prefix such as is or has, and reports names with those prefixes that don’t hold or return a boolean.

    const completed = progress === 100;
    const hasName = "Sindre";
  • #12905 5b00387 Thanks @dyc3! - Added the nursery rule useConsistentFontWeightNotation, which enforces writing font weights either as numbers or as the keywords normal and bold where possible. It checks the font-weight and font properties, and its safe fix converts between normal/bold and 400/700.

    a { font-weight: bold; }
  • #12922 8d33c85 Thanks @dyc3! - Added the nursery rule useConsistentTupleLabels, which reports tuple type elements without a label when other elements of the same tuple have one.

    type Point = [x: number, number];
  • #12925 7252cbd Thanks @dyc3! - Added the new nursery rule useGlobalRegexInMatchAll, which reports calls to matchAll() with a regular expression that doesn’t have the g flag. These calls throw a TypeError at runtime.

    text.matchAll(/pattern/);
  • #12891 e781bc3 Thanks @dyc3! - Added the nursery rule useGlobalRegexInReplaceAll, which reports regular expressions without the g flag passed to replaceAll(). These calls throw a TypeError instead of replacing text.

    withSpaces.replaceAll(/\s+/, ",");
  • #12896 a968e1a Thanks @dyc3! - Added the new nursery rule useValidCharacterComparison, which reports comparisons between a single character and a string that has more than one character. Such comparisons are always false, or always true with !== and !=.

    text.charAt(0) === "ab";
  • #13085 7a795d0 Thanks @ematipico! - Fixed withastro/compiler-rs#221 so Astro template expressions containing comment-only JSX expression children, such as <span>{<!-- x -->}</span>, parse without diagnostics.

  • #12621 79ce388 Thanks @latin-1! - Fixed #12413 and #12414: useSortedProperties now sorts consecutive groups of properties independently, preserving the positions of nested rules, at-rules, and SCSS variable declarations.

  • #13065 bd9faae Thanks @ematipico! - Fixed #5848: running useSortedKeys or useSortedSelectionSet as an editor source action no longer corrupts nested objects or selection sets.

  • #13056 98f4d53 Thanks @ematipico! - Fixed #10607: noUndeclaredDependencies no longer reports imports resolved through TypeScript’s compilerOptions.paths mappings.

  • #13033 7638393 Thanks @GBra-4-669! - Fixed #12980: the CSS parser no longer panics on a composes declaration whose value contains a non-identifier token, such as composes: 1px;. It reports a diagnostic instead.

  • #12917 37d9f41 Thanks @dyc3! - Fixed noUnresolvedImports: it now reports default imports from modules that only forward exports with export * from "...". export * never re-exports a default export, so import foo from "./barrel.js" fails when ./barrel.js contains only export * from "./foo.js".

  • #12596 d33e56e Thanks @dyc3! - Fixed noUnreachableSuper ignoring the default values of constructor parameters. Using this in a default value is now reported, because it runs before super(), and calling super() in a default value is now recognized.

    class Child extends Parent {
    constructor(options = this.defaults()) { // reported
    super(options);
    }
    }
  • #12596 d33e56e Thanks @dyc3! - Fixed noUselessAssignment ignoring variables that are used in the iterated value of a for...of or for...in loop, in the default values of a destructuring declaration or of parameters, or in the body of an arrow function written as a single expression. These variables are now checked too.

    function process(first, second) {
    let list = first; // reported: this value is never read
    list = second;
    for (const item of list) {
    handle(item);
    }
    }
  • #12805 2468384 Thanks @vibbix! - Fixed #12332: noUnknownUnit no longer reports hex colors that start with a digit in SCSS custom properties or in unquoted legacy IE filter values. The rule now accepts --accent: #4566a8; instead of reporting the unknown unit a8.

  • #12549 7fdb28f Thanks @pkallos! - Fixed #10464: useNullishCoalescing no longer reports a ternary or if statement that checks only null or only undefined when the type can also be the other, because ?? would change its behavior.

  • #12952 d1896a0 Thanks @arendjr! - Added grit() queries to JavaScript plugins. A rule can now use a GritQL pattern to select the nodes passed to run() instead of listing syntax kinds with ast().

    For example:

    export const noConsole = defineRule({
    query: grit("`console.log($args)`"),
    run(element) {
    if (element.kind !== "JS_CALL_EXPRESSION") return;
    registerDiagnostic(element, "warning", "Unexpected console.log.");
    },
    });

    Usage of Grit patterns can be particularly useful when it would take several checks to verify the shape of a snippet that involves multiple AST nodes.

    Grit sequence patterns call run() for each matched node. Matching on leaf tokens is also supported for patterns, while patterns containing rewrites are rejected. Plugins using GritQL patterns should report diagnostics from run() as usual.

    Plugins using Grit queries can still request the semantic model as well:

    export const rule = defineRule({
    query: grit("function $fn($args) { $body }", { semantic: true }),
    run(node, { model }) {
    // You can use `model` here similar to a query specified using `ast(..., { semantic: true })`.
    },
    });
  • #13022 81d0187 Thanks @arendjr! - Fixed an issue where GritQL patterns wouldn’t match snippets if they contain a trailing list separator.

    For example, the pattern `a, b` wouldn’t match the arguments in function(a, b,), whereas now they do.

  • #12999 ace98cf Thanks @deepsingh132! - Fixed #12953: the Markdown formatter no longer removes the blank line between a blockquote that ends a list item and the block that follows it, matching Prettier. Removing that line could also move a following paragraph into the blockquote. The same applies to a list item that ends with a hard line break.

    - a
    > b
    #### Heading
  • #13067 45c8c4d Thanks @ematipico! - Added the nursery rule noDisabledAttribute, which warns when buttons and other form controls use the native disabled attribute. A disabled control can’t be reached with the Tab key, so the rule suggests aria-disabled or readonly instead.

    <button disabled>Save</button>
    <input type="email" disabled />
  • #12923 0668c8f Thanks @dyc3! - Added the new nursery rule noScssNullComparison. It reports comparisons to null in Sass @if and @else if conditions, because null already counts as false in a condition.

    a {
    @if $value == null {}
    }
  • #12955 e1ef913 Thanks @ematipico! - Fixed an issue where Biome could silently skip configured plugins. Biome now reports an error when those plugins are unavailable during analysis.

  • #12997 419aa5d Thanks @Riccardo-bit-cpu! - Fixed #12475: noSwitchDeclarations no longer reports var declarations inside switch clauses, matching ESLint’s no-case-declarations.

  • #12867 6a25d72 Thanks @dyc3! - Added the nursery rule noUselessQualifier, which reports namespace and enum names that are repeated before a member inside that same namespace or enum. Biome provides a fix that removes the repeated name.

    namespace Shapes {
    export type Point = { x: number; y: number };
    const origin: Shapes.Point = { x: 0, y: 0 };
    }
  • #12050 60f4695 Thanks @dor-sr! - Fixed #11933: useUnicodeRegex no longer offers to add the u flag to patterns that become invalid or change meaning in Unicode mode, such as /{/, /\-/ or /[\d-z]/. The rule still reports them.

  • #13035 478e056 Thanks @dyc3! - Fixed #13026: the Markdown formatter no longer indents the rows of a table inside a blockquote when the table follows a paragraph of two or more lines. Previously, every run of the formatter indented the rows further until they were joined onto the header line.

    > First line of a paragraph,
    > second line of it.
    >
    > | A | B |
    > | --- | --- |
    > | x | y |
    > | --- | --- |
    > | x | y |
  • #13066 f6cf28e Thanks @arendjr! - Removed the semantic() query function from the JavaScript plugin API. Pass { semantic: true } to ast() instead to provide the semantic model to a rule.

    export const rule = defineRule({
    query: semantic("JS_REFERENCE_IDENTIFIER"),
    run(node, { model }) {
    // Use `model` here.
    },
    });

    Becomes:

    export const rule = defineRule({
    query: ast("JS_REFERENCE_IDENTIFIER", { semantic: true }),
    run(node, { model }) {
    // Use `model` here.
    },
    });

    This behaviour matches the grit() query function, which also accepts the { semantic: true } option.

  • #12951 014b976 Thanks @ematipico! - Fixed #10782: noUndeclaredClasses no longer appears to hang on projects with long component import chains.

  • #13073 827e610 Thanks @vibbix! - Fixed #13072: a comment before a SCSS map entry whose value is a parenthesized group no longer indents that group one level too deep. This matches Prettier 3.10 behavior now.

    $map: (
    /* comment */
    key: (
    a: 1,
    b: 2,
    ),
    a: 1,
    b: 2,
    ),
    );
  • #12928 ae0e186 Thanks @dyc3! - Improved noUselessStringConcat. The rule now reports literals joined after another value, such as foo + "a" + "b", and fixes template literals with placeholders, so `Hello, ${name}` + "!" becomes `Hello, ${name}!`.

    The rule no longer reports strings that would join into text that looks like a placeholder, such as "$" + "{name}", or into a directive such as "use strict". It also no longer reports obj.foo * "a" + "b", which its fix used to change to obj.foo * "ab".

    The fix no longer changes the value of the string in two cases. It used to change 1 + 2 + "b" + "c" to "12bc" instead of 1 + 2 + "bc". It used to change "\1" + "2" to "\12", which is a different escape sequence.

    The fix no longer joins literals that are on different lines when the concatenation ends with two literals on the same line. It also no longer puts a line break from a template literal into a string literal, which made the code invalid.

  • #13048 24734a8 Thanks @ematipico! - Fixed #13028: Biome now keeps a paragraph in its outer block quote when a quote-only blank line closes a nested block quote.

    > > b
    >
    > > c
    > c
  • #12967 bd0988e Thanks @siketyan! - Fixed #12827: noDuplicateProperties, noDuplicateCustomProperties, and noMissingVarFunction now check declarations at the top level of embedded CSS templates, such as styled.div`...`.

  • #13048 24734a8 Thanks @ematipico! - Fixed #13029: the Markdown formatter now normalizes spaces inside inline and reference link text without removing whitespace-only text.

    something [ text ]( destination)
    something [ ]( destination)
    something [ text ](destination)
    something [ ](destination)
  • #13021 05a1409 Thanks @dyc3! - Fixed #12993: Svelte {@const} tags with TypeScript type annotations, such as {@const doubled: number = item * 2}, now parse and format in components with <script lang="ts">.

  • #12968 ec0142b Thanks @siketyan! - Fixed #12826: Biome now detects CSS in styled-components templates that use .attrs(), such as styled.button.attrs({ type: "button" })`...` and styled(Component).attrs(() => ({}))`...`, so they are formatted and linted like styled.button`...`.

  • #13048 24734a8 Thanks @ematipico! - Fixed #13027: the Markdown formatter now preserves spaces around text after a code span that crosses block quote lines.

    > `a
    > b`c`d`
    > b` c `d`
  • #13055 78c744a Thanks @ematipico! - Fixed #13053: Biome now reports missing CLI paths as file-system errors without the INTERNAL tag or advice that the path was ignored by configuration. File-system diagnostics now use specific fs/* categories, with underlying I/O errors categorized as fs/io.

  • #12927 c6feec1 Thanks @dyc3! - Added the nursery rule useCatchErrorName, which requires a specific name for caught errors in try...catch statements and in the error handlers of promise.catch() and promise.then(). The name defaults to error and can be changed with the name option.

    try {} catch (err) {} // `err` should be named `error`
  • #12788 7f971ed Thanks @dyc3! - Extended useWhile to report for (;;) loops and to fix them to while (true).

  • #12967 bd0988e Thanks @siketyan! - Fixed noMissingVarFunction so it also checks declarations inside at-rules such as @page and @font-face. For example, @page { margin: --page-margin; } is now reported when --page-margin is declared in :root.

  • #13057 d9267a5 Thanks @ematipico! - Fixed #10896 so Svelte <script generics> attributes containing object type constraints parse and format as TypeScript type parameters.

  • #13048 24734a8 Thanks @ematipico! - Fixed #13038: Biome now aligns wrapped task-list paragraphs with the text following the checkbox.

    - [ ] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc varius
    malesuada eros, faucibus dapibus odio rhoncus in.
    malesuada eros, faucibus dapibus odio rhoncus in.

2.6.8

Patch Changes

  • #13080 a68137d Thanks @dyc3! - Added the nursery rule noBufferConstructor, which disallows the deprecated Node.js Buffer() and new Buffer() constructors. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead.

    new Buffer(5);
  • #12966 82651f5 Thanks @dyc3! - Added the nursery rule noConfusingArraySplice, which reports splice() and toSpliced() calls that replace a single element or insert at index -1.

    array.splice(index, 1, element); // use `array[index] = element` instead
  • #12924 0a9d204 Thanks @dyc3! - Added the nursery rule noDynamicRequire, which disallows require() calls whose module name is built at runtime. When the checkDynamicImports option is enabled, the rule also checks import() calls.

    require("./locales/" + language);
  • #12907 6f2635a Thanks @dyc3! - Added the nursery rule noLateCurrentTargetAccess, which reports reads of event.currentTarget that run after the browser has finished handling the event, when currentTarget is null.

    element.addEventListener("click", async (event) => {
    await save();
    event.currentTarget.disabled = false;
    });
  • #12904 04f30c4 Thanks @dyc3! - Added the nursery rule noMisusedSpread, which uses type information to report spreads that produce unexpected results: strings spread into arrays or arguments, and promises, functions, maps, arrays, iterables, class instances, and classes spread into objects or JSX attributes.

    declare function getUser(): Promise<{ name: string }>;
    const user = { ...getUser() };
  • #12893 5d7ca32 Thanks @dyc3! - Added the nursery rule noTripleSlashReference, which reports /// <reference path="..." /> comments and /// <reference types="..." /> comments for packages that the file also imports. The lib, path, and types options control which kinds of references are allowed.

    /// <reference path="./globals.d.ts" />
  • #12561 746c421 Thanks @dyc3! - Added the nursery rule noVueAsyncComputed, which reports asynchronous code in Vue computed properties, such as async functions, await, promises, setTimeout(), and nextTick().

    <script>
    export default {
    computed: {
    async user() {
    return fetchUser(this.userId);
    },
    },
    };
    </script>
  • #12964 149d729 Thanks @dyc3! - Added the nursery rule noVueDefineModelDefault, which disallows the default option in Vue’s defineModel(). When a parent component passes undefined with v-model, the child component uses the default value while the parent keeps undefined, so the two components show different values.

    <script setup>
    const model = defineModel({ type: String, default: "" });
    </script>
  • #13060 67bc9d5 Thanks @dyc3! - Added the nursery rule noVueDeprecatedFilter, which reports the filter syntax that Vue 3 removed.

    For example, the following template uses the currency filter:

    <template>
    <p>{{ price | currency }}</p>
    </template>
  • #12545 0bbe4f1 Thanks @dyc3! - Added the new nursery rule noVueDeprecatedVIs, which reports the deprecated Vue v-is directive. Use the is attribute with a vue: prefix instead.

    <template>
    <div v-is="'MyComponent'"></div>
    </template>
  • #12580 3fdc987 Thanks @dyc3! - Added the nursery rule noVueExportInScriptSetup, which disallows export in Vue <script setup> blocks. Vue fails to compile a component when its <script setup> block exports a value. TypeScript type exports are allowed.

    <script setup>
    export const message = "Hello";
    </script>
  • #13063 d4e90c8 Thanks @dyc3! - Added the nursery rule noYamlEmptyMapKeys, which reports YAML map entries whose key is missing, or has only a tag or an anchor. The rule is recommended.

    : value
  • #13061 97aa183 Thanks @dyc3! - Added the nursery rule noYamlEmptyMapValues, which reports keys in YAML maps that have no value.

    name:
  • #13062 6aad75f Thanks @dyc3! - Added the new nursery rule noYamlEmptySequenceEntries, which reports empty items in YAML lists.

    fruits:
    - apple
    -
    - banana
  • #13082 c1c8c85 Thanks @dyc3! - Added the nursery rule useCalledWith, which reports toHaveBeenCalled(), toBeCalled(), and toHaveBeenCalledOnce() assertions, because they don’t check the arguments that the function was called with. The rule belongs to the test domain.

    expect(sendEmail).toHaveBeenCalled();
  • #13075 acfeaf9 Thanks @dyc3! - Added the nursery rule useExpectToHaveBeenCalled, which reports tests that compare the number of calls of a mock function to zero, and suggests using toHaveBeenCalled() instead.

    expect(sendEmail).toHaveBeenCalledTimes(0);
  • #13076 cf5b1a6 Thanks @dyc3! - Added the nursery rule useExpectToHaveBeenCalledTimes, which reports tests that check the length of mock.calls with toHaveLength(), and suggests using toHaveBeenCalledTimes() instead.

    expect(onSave.mock.calls).toHaveLength(1);
  • #13020 5d28641 Thanks @dyc3! - Added the new nursery rule usePackageJsonValidLicense, which reports a license field in package.json that isn’t a valid license. The rule accepts SPDX license identifiers and expressions, UNLICENSED, and references to a license file such as SEE LICENSE IN LICENSE.md.

    For example, the rule reports the following package.json file because GPL3 isn’t an SPDX license identifier:

    {
    "name": "my-package",
    "license": "GPL3"
    }
  • #13079 058d7a1 Thanks @dyc3! - Added the nursery rule useSpyOn, which reports properties that are overwritten with jest.fn() or vi.fn(). Overwriting a property loses its original value, while jest.spyOn() and vi.spyOn() keep it so it can be restored after the test.

    Date.now = jest.fn(() => 10);
  • #13081 be58f67 Thanks @dyc3! - Added the nursery rule useTopLevelRequire, which reports require() calls that aren’t at the top level of the module, such as calls inside functions, blocks, or try statements.

    function readFile(filename, callback) {
    const fs = require("fs");
    fs.readFile(filename, callback);
    }
  • #13054 4d81f0d Thanks @dyc3! - Added the nursery rule useValidNamespaceImports, which reports names read from a namespace import that the imported module doesn’t export. It also reports assignments to members of a namespace import, and namespace imports of modules that have no exports.

    import * as utils from "./utils.js";
    utils.subtract(2, 1); // `./utils.js` doesn't export `subtract`
  • #13058 ae251e4 Thanks @dyc3! - Added the new nursery rule useVueConsistentVOnHandlerStyle, which enforces one style of event handler in Vue v-on directives. By default, it prefers the name of a method, and an inline function where a method name can’t be used.

    <template>
    <button @click="save()">Save</button>
    </template>
  • #12965 c33c03d Thanks @dyc3! - Added the nursery rule useVueRegisteredComponentNameCasing, which requires the names of components registered in the components option of a Vue component to use one casing style. By default, names must be in PascalCase. The casing option switches the rule to camelCase or kebab-case.

    <script>
    export default {
    components: {
    "todo-item": TodoItem,
    },
    };
    </script>
  • #12145 596a2b1 Thanks @ematipico! - Added type narrowing for unwritten local let/const variables and parameters after typeof, equality, nullish, and truthiness checks. Type-aware rules now use these refinements in branches, short-circuit expressions, and after early returns, including noUnnecessaryConditions and noFloatingPromises. Types such as {} no longer imply that a value is always truthy.

  • #12935 e506ff1 Thanks @dyc3! - Improved the performance of the rules noRedeclare and noUnsafeDeclarationMerging. biome lint with Biome’s default rules is now about 3% to 5% faster on large projects, and up to 11% faster on some TypeScript projects.

  • #13181 e1556ae Thanks @dyc3! - Fixed the HTML formatter printing a comment twice when it ends the line of an element’s opening tag. For example, <div><!-- comment --> followed by <i>x</i></div> on the next line is now formatted as:

    <div><!-- comment -->
    <div>
    <!-- comment -->
    <i>x</i>
    </div>
  • #13130 1b350ed Thanks @dyc3! - Fixed #13107: the unsafe fix of noDistractingElements now removes the whole element, including its closing tag and children, instead of only the opening tag. The fix is no longer offered when removing the element would produce invalid code, such as const Ticker = () => <marquee>News</marquee>;.

  • #13054 4d81f0d Thanks @dyc3! - Fixed noUnresolvedImports reporting names that a module re-exports from a CommonJS module or from a file that isn’t JavaScript, such as export { foo } from "./legacy.cjs". The rule now also reports default imports from a module that only re-exports another module with export * from, because export * from doesn’t forward the default export.

  • #12602 d5da394 Thanks @dyc3! - Fixed #12600: biome lint --suppress now adds suppression comments for diagnostics emitted by plugins, such as // biome-ignore lint/plugin/noFoo: ignored using `--suppress` .

  • #13097 3be9e3d Thanks @ashokram-si! - Fixed #13064: The noUnknownTypeSelector rule now correctly accepts the valid <selectedcontent> HTML element used in customizable select controls.

  • #13181 e1556ae Thanks @dyc3! - Fixed #13167: The HTML formatter no longer deletes comments that follow a Svelte block delimiter on the same line, such as {#if}, {:else}, or {#each}. For example, {#if a}<!-- comment --><i>x</i>{/if} is now formatted as:

    {#if a}
    <i>x</i>
    <!-- comment --><i>x</i>
    {/if}
  • #12845 e3ab04d Thanks @dyc3! - Fixed the location of Tailwind CSS diagnostics reported on unquoted object keys. In clsx({ shadow: active }), diagnostics now highlight shadow instead of starting one character later at hadow:.

  • #13098 d3be626 Thanks @ashokram-si! - Fixed #13084: The useThisInClassMethods rule now correctly recognizes this when used inside parameter default values for methods, setters, and class fields.

  • #13131 a788cac Thanks @dyc3! - Fixed #13129: the fix of useArrowFunction no longer produces invalid code when the function is in the initializer of a for statement and returns an in expression. The arrow function body is now wrapped in parentheses.

    // Before
    for (let has = function (k) { return k in cache; }; ;) {}
    // After the fix
    for (let has = (k) => (k in cache); ;) {}
  • #12840 8908627 Thanks @dyc3! - Fixed #12796: useMathMinMax no longer reports comparisons with a bigint written as an expression, such as -1n or 2n ** 62n - 1n, or with a const variable initialized with one. Its unsafe fix turned these comparisons into Math.min() or Math.max() calls, which throw a TypeError when given a bigint.

    const MAX = 2n ** 62n - 1n;
    const clamp = (x) => (x > MAX ? MAX : x);
  • #13152 61924f6 Thanks @dyc3! - Fixed noVueWatchAfterAwait, noVueLifecycleAfterAwait and noVueRestrictedCallAfterAwait, which now also check the setup() function passed as the first argument of defineComponent(). The following code is now reported:

    import { defineComponent, onMounted } from "vue";
    defineComponent(async (props) => {
    await load();
    onMounted(() => {});
    }, { props: ["id"] });

    When defineComponent() receives both a function and an options object, these rules now ignore the setup option, because Vue runs the function instead.

  • #13152 61924f6 Thanks @dyc3! - noVueDuplicateKeys now checks the properties returned by a setup() method of an options object, so return { foo } conflicts with a prop, data property, method or computed property named foo.

  • #13152 61924f6 Thanks @dyc3! - The Vue emit rules now read events declared with a function type, as in defineEmits<(e: "change", value: string) => void>(), and event names written as template literals without substitutions, as in emit(`change`). noVueUndeclaredEmits, noVueUnusedEmitDeclarations, useVueSingleEventPayload and useVueEmitValidator previously skipped events declared in these forms.

    noVueShadowNativeEvents now checks this.$emit() only where this is the component, and no longer reports $emit() called through a variable that holds this, as in const vm = this; vm.$emit("click").

  • #12947 a54965d Thanks @machadinhos! - Added the nursery rule noDrizzleDbObjectInsideTransaction, which reports a Drizzle ORM instance used inside its own transaction callback instead of the transaction object.

    await db.transaction(async (tx) => {
    await db.insert(users).values({ name: "John" });
    });
  • #13123 e7c8297 Thanks @ematipico! - Fixed #12176: type-aware rules now select the matching overload of a method declared several times in an interface or object type. For example, useAwaitThenable no longer reports await app.listen({ port: 0 }) on a Fastify server, and still reports await app.listen({ port: 0 }, callback).

  • #12059 87784c7 Thanks @dyc3! - Fixed noUnsafePlusOperands treating the negation of a bigint value as a number. Code such as -value + 1n, where value is declared as bigint, is no longer reported for mixing number and bigint.

  • #13151 be372b5 Thanks @dyc3! - Fixed Vue lint rules such as useVueVModel and useVueVOnExact treating MathML elements like <math> and <mi> as components. Biome now recognizes the MathML Core elements as native elements, and in Vue, Svelte, and Astro files it treats known hyphenated elements such as <annotation-xml> and the SVG <font-face> as native elements instead of components.

  • #12059 87784c7 Thanks @dyc3! - Type inference now evaluates conditional types such as T extends U ? X : Y, including infer and distribution over unions, instead of treating them as a union of both branches. This also applies to built-in types such as Exclude, Extract, ReturnType, Parameters, and Awaited, which improves the accuracy of type-aware rules such as noFloatingPromises.

    type Unwrap<T> = T extends Promise<infer U> ? U : T;
    // Previously inferred as `unknown | Promise<number>`, now as `number`.
    type Value = Unwrap<Promise<number>>;
  • #12602 d5da394 Thanks @dyc3! - Biome now reports an error when a GritQL plugin file name contains invalid characters that could conflict with Biome suppressions.

  • #12838 81d8d28 Thanks @dyc3! - Added the nursery rule noTailwindRestrictedClasses for JavaScript and HTML. It reports the Tailwind CSS classes and variants listed in its options with a custom message, and can replace them with a configured class or variant.

    {
    "linter": {
    "rules": {
    "nursery": {
    "noTailwindRestrictedClasses": {
    "level": "error",
    "options": {
    "classes": {
    "bg-green-500": { "message": "Use the success color.", "use": "bg-success" },
    "float-*": "Use flexbox or grid for layout."
    }
    }
    }
    }
    }
    }
    }
    <div className="hover:bg-green-500 float-left" />; // both classes are reported
  • #12932 68e6887 Thanks @dyc3! - Improved the performance of linting files that have no suppression comments by up to 61%.

  • #13136 dcb1eab Thanks @dyc3! - Improved the performance of linting JavaScript and HTML files when Tailwind rules are enabled.

  • #13094 ae66383 Thanks @dyc3! - Fixed #12994: the HTML formatter no longer moves a word onto its own line when it follows an inline element or {expression} that starts a line. Formatting such text is now stable after one pass.

    <span>
    Showing the first {shown} of
    {total}
    references
    {total} references
    </span>
  • #13162 854ff15 Thanks @Punisheroot! - Fixed #13125: noUselessThisAlias no longer reports aliases used in instance and static class field initializers, where replacing the alias with this changes which object is accessed.

  • #12059 87784c7 Thanks @dyc3! - Fixed type inference for the intersection of a primitive type and one of its literal types, such as string & "a", which Biome inferred as never instead of "a". Type-aware rules such as useExhaustiveSwitchCases and noFloatingPromises now see the literal, so the following switch is reported for missing the "a" case.

    type Kind = ("a" & string) | "b";
    function handle(kind: Kind) {
    switch (kind) {
    case "b":
    break;
    }
    }
  • #12551 ca039a1 Thanks @pkallos! - Fixed #9842: useNullishCoalescing no longer skips || and ||= inside a call to a locally declared Boolean when ignoreBooleanCoercion is enabled.

2.6.9 Latest

Patch Changes

  • #13192 d9e86ab Thanks @dyc3! - Added the nursery rule noArrayDelete. It reports the delete operator used on array elements, which leaves an empty slot in the array instead of removing the element. The rule needs type information, and offers an unsafe fix that replaces the delete with a splice() call.

    declare const array: number[];
    delete array[0];
  • #13209 4408dd4 Thanks @dyc3! - Added the nursery rule noExpectToHaveBeenCalledOnce, which reports toHaveBeenCalledOnce() and toBeCalledOnce() assertions and suggests toHaveBeenCalledTimes(1) and toBeCalledTimes(1) instead. The rule belongs to the test domain.

    expect(sendEmail).toHaveBeenCalledOnce();
  • #13217 c0dc090 Thanks @dyc3! - Added the new nursery rule noImmediateMutation, which reports arrays, objects, Sets, and Maps that are changed in the statement right after they are created, and variables that are assigned right after they are declared.

    const array = [1, 2];
    array.push(3); // reported: write `[1, 2, 3]` instead
    let foo;
    foo = 1; // reported: write `let foo = 1` instead
  • #13120 54eb224 Thanks @dyc3! - Added the nursery rule noJasmineGlobals, which reports Jasmine globals in Jest tests, such as spyOn(), fail(), pending(), and the jasmine object. Jest’s default test runner doesn’t provide them.

    jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;
  • #13122 6e2b42e Thanks @dyc3! - Added the nursery rule noReturnInTest, which reports return statements directly inside the body of a test function. The rule belongs to the test domain.

    test("adds two numbers", () => {
    return expect(add(1, 2)).toBe(3);
    });
  • #13161 37692e2 Thanks @dyc3! - Added the nursery rule noTailwindConflictingClasses, which reports Tailwind CSS classes that set the same CSS properties on an element. Only one of the conflicting classes takes effect, so the other one does nothing.

    <div className="flex grid" />;
  • #13119 0cc8548 Thanks @dyc3! - Added the nursery rule noTestGlobals, which reports Jest and Vitest APIs that are used as global variables instead of being imported.

    describe("sum", () => {});
  • #13121 5065890 Thanks @dyc3! - Added the nursery rule noTestHooks, which reports setup and teardown hooks in tests, such as beforeEach and afterAll.

    beforeEach(() => { // reported
    cart = createCart();
    });
  • #13207 328be47 Thanks @dyc3! - Added the nursery rule noUnsafeSqliteInterpolation, which reports SQL strings that insert values with ${} or use a tagged template when passed to the exec() and prepare() methods of a node:sqlite database.

    import { DatabaseSync } from "node:sqlite";
    const database = new DatabaseSync(":memory:");
    database.exec(`SELECT * FROM users WHERE id = ${id}`);
  • #12544 0d70b09 Thanks @dyc3! - Added the new nursery rule noUselessBind, which disallows .bind() calls on functions that don’t use this, and on arrow functions.

    const handler = function () {
    console.log("clicked");
    }.bind(this); // reported
  • #13216 a1c2950 Thanks @dyc3! - Added the nursery rule noUselessDefaultAssignment, which uses type information to report default values that can never be used, because the value they replace can’t be undefined.

    function greet({ name = "friend" }: { name: string }) {} // reported
  • #13101 981cd33 Thanks @dyc3! - Added the new nursery rule noUselessNestedTernary, which reports nested ternary expressions that repeat a result of the expression around them. The conditions of such expressions can be combined with && or ||.

    const result = a ? (b ? c : d) : d;
  • #13100 8ece6a5 Thanks @dyc3! - Added the nursery rule noUselessSetConstruction, which reports a new Set() that only copies a value used with a Set method such as union() or isSubsetOf(). These methods accept a Set or a Map directly, don’t change the Set they are called on, and return a new Set when they combine values.

    const selected = new Set([1, 2]);
    const other = new Set([2, 3]);
    selected.union(new Set(other));
    new Set(selected).union(other);
    new Set(selected.union(other));
  • #13164 dc11dea Thanks @dyc3! - Added the nursery rule noVueDuplicateVElseIf, which reports v-else-if conditions in Vue templates that repeat, or are covered by, earlier conditions of the same v-if / v-else-if chain.

    For example, the second element below can never be rendered:

    <template>
    <div v-if="a || b" />
    <div v-else-if="a" />
    </template>
  • #13194 9bd7f56 Thanks @dyc3! - Added the new nursery rule noVueNegationElse, which reports a negated condition in v-if or v-else-if when a v-else branch follows it. Its fix removes the negation and swaps the two branches.

    <template>
    <div v-if="!isLoading">Content</div> <!-- reported -->
    <div v-else>Loading...</div>
    </template>
  • #13271 31fad4a Thanks @dyc3! - Added the nursery rule useBiomeKindSets, which reports Biome JS plugins that check the kind of a node or token against several strings. A kind set created with nodeKinds() or tokenKinds() reads the kind natively, which is faster.

    The rule belongs to the new biomePlugin domain. Biome doesn’t enable this domain automatically, so enable it in the linter configuration of your plugin project.

    if (node.kind === "JS_CALL_EXPRESSION" || node.kind === "JS_NEW_EXPRESSION") {}
  • #13271 31fad4a Thanks @dyc3! - Added the nursery rule useBiomeTopLevelTypes, which reports the use of nodeKinds(), tokenKinds(), or union() inside a function. The rule belongs to the biomePlugin domain.

    import { defineRule, nodeKinds } from "@biomejs/runtime/plugin";
    export const rule = defineRule({
    run(node) {
    return nodeKinds("JS_CALL_EXPRESSION").has(node);
    },
    });
  • #13191 4a21426 Thanks @dyc3! - Added the new nursery rule useConsistentIndexedObjectStyle, which requires one style for object types with arbitrary keys. By default, it requires the Record type instead of index signatures and mapped types.

    // reported, prefer `Record<string, number>`
    interface Scores {
    [name: string]: number;
    }
  • #13205 adde697 Thanks @dyc3! - Added the nursery rule useDescribeFunctionTitle, which reports test suites (describe blocks) whose title is a string or a .name property that repeats the name of an imported value, and suggests passing the value itself as the title.

    import { myFunction } from "./myFunction";
    describe("myFunction", () => {}); // reported
  • #13206 32daef0 Thanks @dyc3! - Added the nursery rule useEarlyContinue, which reports an if statement that wraps the rest of a loop body and suggests skipping the iteration early with continue instead.

    for (const item of items) {
    if (item.isActive) {
    process(item);
    save(item);
    }
    }
  • #13211 aaf89d6 Thanks @dyc3! - Added the nursery rule useExpectEqualityMatcher, which reports assertions that compare two values with === or !== inside expect() and check the result against a boolean. Using an equality matcher instead makes failing tests show both values.

    // Invalid
    expect(total === 10).toBe(true);
    // Valid
    expect(total).toBe(10);
  • #13092 432e8c8 Thanks @dyc3! - Added the nursery rule useExpectToHaveLength, which reports tests that check the length property with toBe(), toEqual(), or toStrictEqual(), and suggests using toHaveLength() instead.

    expect(files.length).toBe(1);
  • #13091 6f231d0 Thanks @dyc3! - Added the nursery rule useExpectToStrictEqual, which reports tests that compare values with toEqual(), and suggests using toStrictEqual() instead. toEqual() ignores properties set to undefined, so the following test passes even though the two objects are different.

    expect({ a: "a", b: undefined }).toEqual({ a: "a" });
  • #13215 3677e52 Thanks @dyc3! - Added the new nursery rule useTanstackQueryExhaustiveDependencies, which reports TanStack Query options whose queryKey doesn’t include every value that queryFn uses. When the key misses a value, changing that value doesn’t fetch new data, and the query keeps returning data for the old value.

    function Todo({ todoId }) {
    useQuery({
    queryKey: ["todo"],
    queryFn: () => fetchTodo(todoId),
    });
    }
  • #13212 32f5c05 Thanks @dyc3! - Added the nursery rule useTanstackQueryMutationPropertyOrder, which requires onMutate to come before onError and onSettled in the options of TanStack Query’s useMutation. The type of the value that onMutate returns can be wrong in a property that comes before it.

    import { useMutation } from "@tanstack/react-query";
    useMutation({
    mutationFn: (todo) => saveTodo(todo),
    onError: (error, todo, saved) => restoreTodo(saved.previousTodo),
    onMutate: (todo) => ({ previousTodo: readTodo(todo.id) }),
    });
  • #13103 c3f850e Thanks @dyc3! - Added the nursery rule useTopLevelDescribe, which reports tests and hooks that are not inside a describe block. The maxTopLevelDescribes option also limits how many top-level describe blocks a file can have.

    test("adds two numbers", () => {});
  • #13344 60da8a9 Thanks @Jayllyz! - Improved the performance of GritQL plugins on files with many matches. Evaluation time no longer grows quadratically with the number of matches.

  • #13008 01ce2dd Thanks @ematipico! - Improved Astro cross-language JavaScript analysis by resolving embedded bindings and references through Astro scopes instead of document-wide name matching.

  • #13011 a5aa4f2 Thanks @ematipico! - Fixed #12818: useFilenamingConvention now reports a filename diagnostic once per HTML, Vue, Svelte, or Astro document instead of once per embedded JavaScript snippet.

  • #11372 6ce9395 Thanks @renovate! - Improved how Biome aligns edits in diagnostic fix previews. Suggested fixes now group nearby edits more clearly, which can change which repeated lines are shown as unchanged.

  • #13273 9add717 Thanks @tats-u! - Fixed #13267: biome migrate prettier now enables markdown.parser.frontmatter, matching Prettier’s parsing of YAML frontmatter in Markdown files.

  • #13013 e2a8e85 Thanks @ematipico! - Implemented the runtime default-export case from #11463 with the new noAstroComponentDefaultExport nursery rule. The rule reports runtime default exports in Astro component frontmatter while allowing named and type-only exports.

    ---
    export default function render() {}
    ---
  • #13010 8bdb36c Thanks @ematipico! - Fixed #12956: useImportType now distinguishes Astro template type and value uses, while useConst and noVar account for template writes. Cross-language references now prevent unsafe unused-variable rename suggestions.

  • #13015 2ec6bbe Thanks @ematipico! - Fixed #5242: the HTML-family formatter now collapses whitespace in static class attributes and formats valid style attributes as inline CSS declarations. Component props, dynamic Astro template values, and style attributes containing invalid CSS remain conservative. Embedded replacements also recompute parent layout so formatting converges in one pass.

    <div class=" card selected " style="color:red;font-size:10px"></div>
    <div class="card selected" style="color: red; font-size: 10px;"></div>
  • #13018 cfb4467 Thanks @ematipico! - Fixed #12956: React, React Native, and Next.js rules that rely on framework-specific JSX behavior no longer report Astro template expressions. Mixed-framework projects can enable those rule domains without receiving React- or Next-specific diagnostics for Astro markup such as <head>, <img>, component children props, string refs, Astro list rendering, or Polyfill.io scripts.

  • #12419 03b0edd Thanks @vibbix! - Fixed #9768: noDescendingSpecificity no longer reports nested selectors that style different elements. The following code is now valid:

    .aaa {
    ul li {
    &:hover { color: #1684fc; }
    }
    }
    .bbb {
    a {
    &:hover { background: #fff; }
    }
    }

    The rule now reports a:hover { color: red; } followed by a { color: blue; }, as Stylelint does, and ignores rules without declarations.

  • #13103 c3f850e Thanks @dyc3! - Fixed the detection of describe blocks in the test rules noIdenticalTestTitle, useTestHooksOnTop, and useTestHooksInOrder. These rules treated describe.todo, describe.shuffle, test.describe.parallel, and test.describe.serial as tests, and they didn’t recognize conditional blocks such as describe.skipIf(condition)("title", () => {}). As a result, they didn’t check the tests and hooks inside those blocks.

    For example, noIdenticalTestTitle now reports the second test:

    test.describe.serial("checkout", () => {
    test("pays", async ({ page }) => {});
    test("pays", async ({ page }) => {});
    });

    The nursery rule useValidTestTitle now also checks the titles of tagged-template tables such as test.each`table`("title", () => {}) and of conditional calls such as test.skipIf(condition)("title", () => {}).

  • #12548 c919f1c Thanks @pkallos! - Fixed useNullishCoalescing reporting inert || undefined when inert is destructured with a default value, such as { inert = false }.

  • #12419 03b0edd Thanks @vibbix! - Fixed noDuplicateSelectors missing some duplicates. The rule now reports these selectors:

    .c:is(.a .b) {}
    :is(.a .b).c {}
    [data-progress="50%"] {}
    [data-progress="50%"] {}
  • #13262 b359a58 Thanks @GBra-4-669! - Fixed #13258: the HTML parser no longer panics when a CDATA section starts with a second <![CDATA[ marker. The marker is kept as literal text.

  • #13301 d06ae5d Thanks @dyc3! - Fixed #13299: the HTML formatter no longer adds a line break between whitespace-sensitive siblings that touch in the source, such as an element next to a self-closing element, a Svelte {@render} tag, or a text expression. The line break rendered as a space that wasn’t in the source.

    <p>
    <span class="label">label</span><img src="image.png">
    <span class="hint">hint</span>
    <span class="label">label</span><img src="image.png"><span class="hint"
    >hint</span
    >
    </p>
  • #13180 ee7e535 Thanks @GBra-4-669! - Fixed #13178: the JS parser no longer panics on import.defer or import.source when either is parsed as an expression without a following parenthesized argument list. It reports a syntax error instead.

  • #13269 b6e7d37 Thanks @andrew-hesse! - Fixed #13268: the Markdown formatter no longer pairs emphasis markers across paragraphs of a blockquote.

    > a _**, b
    > a ___, b
    >
    > c 20**.
    > c 20__.
  • #13372 399f3a1 Thanks @dyc3! - Fixed #13334: the Markdown formatter now uses indentWidth to indent the content of list items, as Prettier does with tabWidth. Some content keeps its current alignment, such as blockquotes, HTML blocks, and lists inside blockquotes.

    With indentWidth set to 4:

    - parent
    second paragraph
    - child
    second paragraph
    - child
  • #13083 a0acfd5 Thanks @jfmcdowell! - Fixed a Markdown parser hang on block quote lines that contain only spaces after the >. For example, Biome no longer hangs when the second line below has two or more spaces after the >:

    - > - a
    >
  • #13375 70d6154 Thanks @garysassano! - Fixed the HTML formatter adding a line break between a Svelte block ({#if}, {#each}, {#await}, {#key}, {#snippet}) or tag ({@const}, {let}, {@debug}) and a sibling that touches it in the source. Svelte keeps that line break as a text node, so the page rendered a space that wasn’t in the source.

    <p>
    Total:
    {#each items as item}
    Total:{#each items as item}
    <b>{item}</b>
    {/each}
    .
    {/each}.
    </p>
  • #13012 ef2d71a Thanks @ematipico! - Fixed #12707: useValidAriaValues no longer reports Astro template-literal attributes that contain substitutions because their runtime value is unknown. Static template-literal attributes remain checked.

  • #13184 3f72ebe Thanks @dyc3! - Fixed noFloatingPromises, which now detects unhandled promises returned through generic class methods, such as factory.create<Promise<void>>().

  • #13342 eb51fdb Thanks @Jayllyz! - Improved the performance of GritQL plugins, especially for plugins that report many matches in large files.

  • #13009 4ea9690 Thanks @ematipico! - Fixed #12956: noUndeclaredVariables now respects Astro server and client scopes, define:vars, and type/value namespaces. noUnusedVariables, noUnusedImports, and noUnusedFunctionParameters now follow resolved Astro symbols and treat write-only template references as unused.

  • #13193 f0e63ff Thanks @dyc3! - Improved performance of all parsers. On large projects, biome lint is up to 1.7% faster.

  • #13016 5d4d474 Thanks @ematipico! - Fixed #12956: Biome now leaves the contents of unsupported <script> and <style> blocks unchanged instead of trying to format them as JavaScript or CSS. This includes embedded languages such as Less, SCSS, PostCSS, CoffeeScript, and custom lang or type values.

    <style lang="less">
    @color: red;
    .card { color: @color; }
    </style>
    <script lang="coffee">
    square = (value) -> value * value
    </script>

    Malformed Astro frontmatter, expressions, scripts, and styles also retain their original text while Biome formats the surrounding markup.

  • #13208 c4d56be Thanks @dyc3! - Added the nursery rule noCanvasToImage, which reports canvases that are converted to an image or copied pixel by pixel only to be drawn onto another canvas. Pass the canvas to drawImage() instead.

    const image = await loadImage(canvas.toDataURL());
    context.drawImage(image, 0, 0);
  • #13195 f126262 Thanks @dyc3! - Added trivia APIs to JavaScript plugins. leadingTrivia() and trailingTrivia() on nodes and tokens return the whitespace, line breaks, and comments around them, and leadingComments() and trailingComments() on tokens return only the comments. Each piece has an isComment() method. registerDiagnostic() now also accepts tokens and trivia pieces, and highlights only that element.

    const keyword = statement.declaration.token("kindToken");
    for (const comment of keyword.leadingComments()) {
    if (comment.text.includes("TODO")) {
    registerDiagnostic(comment, "warning", "Resolve this TODO.");
    }
    }
  • #12962 2ae8b51 Thanks @dyc3! - Improved the performance of linting with many rules enabled, such as Biome’s recommended rules. In exchange, Biome can use more memory, because each thread now keeps some freed memory for reuse.

  • #12937 4dc698a Thanks @b84330808! - Fixed .editorconfig section globs that have a negative number in a numeric range. [{-3..3}] now matches the files named -3 to 3, instead of only a file named {-3..3}.

  • #12960 9ff9ee4 Thanks @vibbix! - Fixed a crash when a dependency’s package.json maps an exports entry to its own package name, such as "exports": { "sass": "my-package" }. Like Node.js, Biome now rejects exports targets that don’t start with ./.

  • #12960 9ff9ee4 Thanks @vibbix! - Fixed noUnusedClasses reporting classes of SCSS partials loaded with @use, @forward or @import. Biome now resolves these loads the way Sass does, including partials such as _card.scss, index files, and import-only files, so a class in _card.scss counts as used when a component imports styles.scss, which contains @use "card".

  • #13139 103dc4e Thanks @dyc3! - Made noArrayForEach, noArraySortForMinMax, noBooleanSortComparator, noNegatedArrayPredicate, noReturnArrayPush, and useIteratorZip agree on which values are known not to be arrays. They now all ignore calls on literals, object literals, functions, classes, new expressions other than new Array() or a typed array, and variables whose type annotation, type alias, or const value is one of those or a built-in type such as Map, Set, or string | undefined. A type declared in the file with the same name as a built-in type, such as type Set<T> = T[], is no longer treated as the built-in type.

    // No longer reported by noArrayForEach
    new Collection().forEach((value) => console.log(value));
  • #12941 ea3b347 Thanks @dyc3! - Improved the performance of biome lint, biome check, and biome ci on Linux. Biome now spends less time in the operating system for each file it analyzes, so linting large projects is faster.

  • #13343 b9fdaba Thanks @ematipico! - Fixed range formatting in the editor for Vue, Svelte, and Astro files when full HTML support is disabled. Selections that end before the script block no longer format it or report an error, and edits for selections inside the script block are now applied at the selected location.

  • #13007 6981d43 Thanks @ematipico! - Recognized Astro <style define:vars> keys as custom-property declarations. The noUndeclaredCustomProperties rule now accepts statically supplied variables and avoids diagnostics when dynamic keys may provide a declaration.

  • #13001 11027d4 Thanks @ematipico! - Fixed #10547: Astro files can now place <!doctype html> after top-level elements such as inline scripts without parse errors, and formatting preserves the source order.

    <script is:inline>console.log("ready");</script>
    <script is:inline>
    console.log("ready");
    </script>
    <!doctype html>
  • #13343 b9fdaba Thanks @ematipico! - Fixed #13257: untitled VS Code documents now use their existing workspace project, retain it across workspace-folder removal and re-addition, avoid creating projects from non-file URIs, and preserve URI extensions for language detection.

  • #13345 c071912 Thanks @dyc3! - Fixed #13335: Svelte {#snippet} blocks with type parameters, such as {#snippet row<T extends string>(item: T)}, are now parsed and formatted. Invalid snippet signatures no longer make the linter panic.

  • #13343 b9fdaba Thanks @ematipico! - Fixed #12317 and #12984: VCS ignore matching now preserves logical paths for external and symlinked inputs, normalizes stdin paths, combines coexisting .gitignore and .ignore rules, respects nested ignore precedence and Git’s repository exclude file, and reloads ignore state when ignore files change.

  • #13014 0c0dfe2 Thanks @ematipico! - Fixed #12349: Biome now reads quote character references, such as &quot; and &[#39](https://github.com/biomejs/biome/issues/39);, as string quotes in the CSS of HTML and SVG style attributes. Valid values such as font-family: &quot;Rotis Sans&quot; no longer produce CSS parse diagnostics.

  • #13356 abe482c Thanks @github-actions! - Updated the Baseline data of the useBaseline rule. The rule now reports CSS features according to their latest Baseline status.