Version History
Version 2.4.15 Latest
Patch Changes
-
#9394
ba3480eThanks @dyc3! - Added the nursery ruleuseTestHooksInOrderin thetestdomain. The rule enforces that Jest/Vitest lifecycle hooks (beforeAll,beforeEach,afterEach,afterAll) are declared in the order they execute, making test setup and teardown easier to reason about. -
#10254
e0a54ccThanks @dyc3! - Added a new nursery ruleuseVueNextTickPromise, which enforces Promise syntax when using VuenextTick.For example, the following snippet triggers the rule:
import { nextTick } from "vue";nextTick(() => {updateDom();}); -
#10219
64aee45Thanks @dyc3! - Added a new nursery rulenoVueVOnNumberValues, that disallows deprecated number modifiers on Vuev-ondirectives.For example, the following snippet triggers the rule:
<input @keyup.13="submit" /> -
#10195
7b8d4e1Thanks @dyc3! - Added the new nursery ruleuseVueValidVFor, which validates Vuev-fordirectives and reports invalid aliases, missing component keys, and keys that do not use iteration variables. -
#10238
1110256Thanks @dyc3! - Added the recommended nursery rulenoVueImportCompilerMacros, which disallows importing Vue compiler macros such asdefinePropsfromvuebecause they are automatically available. -
#10201
1a08f89Thanks @realknove! - Fixed #10193:style/useReadonlyClassPropertiesno longer reports class properties as readonly-able when they are assigned inside arrow callbacks nested in class property initializers. -
#9574
3bd2b6aThanks @Conaclos! - Fixed #9530. The diagnostics oforganizeImportsare now more detailed and more precise. They are also better at localizing where the issue is. -
#10205
a704a6cThanks @Conaclos! - Fixed #10185. `organizeImports now errors when it encounters an unknown predefined group.The following configuration is now reported as invalid because
:INEXISTENT:is an unknown predefined group.{"assist": {"actions": {"source": {"organizeImports": { "options": { "groups": [":INEXISTENT:"] } }}}}} -
#10052
b565bedThanks @minseong0324! - ImprovednoMisleadingReturnType: it now flags union annotations whose extra variants are never returned, and suggests the narrower type (e.g.string | null→string).These functions are now reported because
nullandnumberare included in the return annotations but never returned:function getUser(): string | null {return "hello";} // null is never returnedfunction getCode(): string | number {return "hello";} // number is never returned -
#10213
ac30057Thanks @dyc3! - Fixed #9450: HTML and Vue element formatting now preserves child line breaks when an element contains another element child on its own line, instead of collapsing the child element onto the same line. -
#10275
9ee6c03Thanks @solithcy! - Fixed #10274: Svelte templates with missing expressions no longer parsed asHtmlBogusElement -
#10143
56798a7Thanks @minseong0324! -noMisleadingReturnTypenow detects misleading return type annotations when object literal properties are initialized withas const.This function is now reported because the return annotation widens a property initialized with
as const:function f(): { value: string } {return { value: "text" as const };} -
#10143
56798a7Thanks @minseong0324! -noUselessTypeConversionnow detects redundant conversions on object literal properties initialized withas const.This conversion is now reported because
message.valueis inferred as a string literal:const message = { value: "text" as const };String(message.value); -
#9807
0ae5840Thanks @dyc3! - Added the new nursery ruleuseThisInClassMethods, based on ESLint’sclass-methods-use-this.The rule now reports instance methods, getters, setters, and function-valued instance fields that do not use
this, andbiome migrate eslintpreserves the supportedignoreMethods,ignoreOverrideMethods, andignoreClassesWithImplementsoptions.Invalid:
class Foo {bar() {// does not use `this`, invalidconsole.log("Hello Biome");}} -
#10258
e7b18f7Thanks @ematipico! - Improved linter performance by narrowing the query nodes for several lint rules, reducing how often they are evaluated. -
#10273
04e22a1Thanks @dyc3! - Fixed #10271: The HTML parser now correctly parsesofas text content when in text contexts. -
#9838
83f7385Thanks @dyc3! - Added the nursery rulenoBaseToString, which reports stringification sites that fall back to Object’s default"[object Object]"formatting. The rule also supports theignoredTypeNamesoption. -
#10143
56798a7Thanks @minseong0324! -useExhaustiveSwitchCasesnow checks switch statements over object literal properties initialized withas const.This switch is now reported because
status.kindis inferred as the string literal"ready"but no case handles it:const status = { kind: "ready" as const };switch (status.kind) {} -
#10143
56798a7Thanks @minseong0324! -useStringStartsEndsWithnow detects string index comparisons on object literal properties initialized withas const.This comparison is now reported because
message.valueis inferred as a string literal:const message = { value: "hello" as const };message.value[0] === "h";
Copyright (c) 2023-present Biome Developers and Contributors.