#81884ca088c Thanks@ematipico! - Fixed#7390, where Biome couldn't apply the correct configuration passed via--config-path.
If you have multipleroot configuration files, running any command with--config-path will now apply the chosen configuration file.
#817179adaea Thanks@dibashthapa! - Added the new rulenoLeakedRender. This rule helps prevent potential leaks when rendering components that use binary expressions or ternaries.
For example, the following code triggers the rule because the component would render0:
constComponent=()=>{constcount=0;return<div>{count&&<span>Count:{count}</span>}</div>;};#8116b537918 Thanks@Netail! - Added the nursery rulenoDuplicatedSpreadProps. Disallow JSX prop spreading the same identifier multiple times.
Invalid:
<div{...props}something="else"{...props}/>#8256f1e4696 Thanks@cormacrelf! - Fixed a bug where logs were discarded (the kind from--log-level=info etc.). This is a regression introduced after an internal refactor that wasn't adequately tested.
#82263f19b52 Thanks@dyc3! - Fixed#8222: The HTML parser, with Vue directives enabled, can now parsev-slot shorthand syntax, e.g.<template #foo>.
#8007182ecdc Thanks@brandonmcconnell! - Added support for dollar-sign-prefixed filenames in theuseFilenamingConvention rule.
Biome now allows filenames starting with the dollar-sign (e.g.$postId.tsx) by default to support naming conventions used by frameworks such asTanStack Start for file-based-routing.
#821891484d1 Thanks@hirokiokada77! - Added thenoMultiStr rule, which disallows creating multiline strings by escaping newlines.
Invalid:
constfoo="Line 1\n\Line 2";
Valid:
constfoo="Line 1\nLine 2";constbar=`Line 1Line 2`;
#822598ca2ae Thanks@ongyuxing! - Fixed#7806: Prefer breaking after the assignment operator for conditional types with generic parameters to match Prettier.
-type True = unknown extends Type<- "many",- "generic",- "parameters",- "one",- "two",- "three"->- ? true- : false;+type True =+ unknown extends Type<"many", "generic", "parameters", "one", "two", "three">+ ? true+ : false;
#676523f7855 Thanks@emilyinure! - Fixed#6569: Allow files to export from themselves withnoImportCycles.
This means the following is now allowed:
// example.jsexportfunctionexample(){return1;}// Re-exports all named exports from the current module under a single namespace// and then imports the namespace from the current module.// Allows for encapsulating functions/variables into a namespace instead// of using a static class.export*asExamplefrom"./example.js";import{Example}from"./example.js";#821468c052e Thanks@hirokiokada77! - Added thenoEqualsToNull rule, which enforces the use of=== and!== for comparison withnull instead of== or!=.
Invalid:
Valid:
#8219793bb9a Thanks@dyc3! - Fixed#8190: The HTML parser will now parse Vue event handlers that contain: correctly, e.g.@update:modelValue="onUpdate".
#82594a9139b Thanks@hirokiokada77! - Fixed#8254: ThenoParameterAssign rule withpropertyAssignment: "deny" was incorrectly reporting an error when a function parameter was used on the right-hand side of an assignment to a local variable's property.
The rule should only flag assignments that modify the parameter binding or its properties (L-value), not the use of its value.
Valid:
(input)=>{constlocal={property:0};local.property=input;};#8201cd2edd7 Thanks@Netail! - Added the nursery rulenoTernary. Disallow ternary operators.
Invalid:
constfoo=isBar ?baz :qux;
#8172de98933 Thanks@JeremyMoeglich! - Fixed#8145: handling of large hex literals, which previously caused both false positives and false negatives.
This affectsnoPrecisionLoss andnoConstantMathMinMaxClamp.
#82107b44e9e Thanks@Netail! - Corrected rule source reference.biome migrate eslint should do a bit better detecting rules in your eslint configurations.
#8213e430555 Thanks@ruidosujeira! - Fixed#8209: Recognized formatting capability when either range or on-type formatting is supported, not only full-file formatting. This ensures editors and the language server correctly detect formatting support in files like JSONC.
#82026f49d95 Thanks@hirokiokada77! - Fixed#8079: Properly handlename andvalue metavariables forJsxAttribute GritQL queries.
The followingbiome search command no longer throws an error:
biome search 'JsxAttribute($name, $value) as $attr where { $name <: "style" }'
#8276f7e836f Thanks@hirokiokada77! - Added thenoProto rule, which disallows the use of the__proto__ property for getting or setting the prototype of an object.
Invalid:
obj.__proto__=a;constb=obj.__proto__;
Valid:
consta=Object.getPrototypeOf(obj);Object.setPrototypeOf(obj,b);
#81697fdcec8 Thanks@arendjr! - Fixed#7999: Correctly placeawait after leading comment in auto-fix action fromnoFloatingPromises rule.
#815712d5b42 Thanks@Conaclos! - Fixed#8148.noInvalidUseBeforeDeclaration no longer reports some valid use before declarations.
The following code is no longer reported as invalid:
classclassA{C=C;}constC=0;#81786ba4157 Thanks@dyc3! - Fixed#8174, where the HTML parser would parse 2 directives as a single directive because it would not reject whitespace in Vue directives. This would cause the formatter to erroneously merge the 2 directives into one, resulting in broken code.
- <Component v-else:property="123" />+ <Component v-else :property="123" />
#80880eb08e8 Thanks@db295! - Fixed#7876: ThenoUnusedImports rule now ignores imports that are used by@linkcode and@linkplain (previously supported@link and@see).
The following code will no longer be a false positive:
importtype{a}from"a"/** * {@​linkcode a} */functionfunc(){}#81198d64655 Thanks@ematipico! - Improved the detection of the rulenoUnnecessaryConditions. Now the rule isn't triggered for variables that are mutated inside a module.
This logic deviates from the original rule, hencenoUnnecessaryConditions is now marked as "inspired".
In the following example,hey starts asfalse, but then it's assigned to a string. The rule isn't triggered inside theif check.
lethey=false;functiontest(){hey="string";}if(hey){}#8149e0a02bf Thanks@Netail! - Fixed#8144: ImprovenoSyncScripts, ignore script tags withtype="module" as these are always non-blocking.
#8182e9f068e Thanks@hirokiokada77! - Fixed#7877: Range suppressions now handle suppressed categories properly.
Valid:
// biome-ignore-start lint: explanationconstfoo=1;// biome-ignore-end lint: explanation
#8111bf1a836 Thanks@ryan-m-walker! - Added support for parsing and formatting theCSS if function.
Example
.basic-style {color:if(style(--scheme: dark):#eeeeee; else:#​000000;);}#81737fc07c1 Thanks@ematipico! - Fixed#8138 by reverting an internal refactor that caused a regression to the rulenoUnusedPrivateClassMembers.
#81198d64655 Thanks@ematipico! - Improved the type inference engine, by resolving types for variables that are assigned to multiple values.
#8158fb1458b Thanks@dyc3! - Added theuseVueValidVText lint rule to enforce validv-text directives. The rule reports whenv-text has an argument, has modifiers, or is missing a value.
Invalid:
<divv-text /><!-- missing value--><divv-text:aaa="foo" /><!-- has argument--><divv-text.bbb="foo" /><!-- has modifier-->
#8158fb1458b Thanks@dyc3! - FixeduseVueValidVHtml so that it will now flag empty strings, e.g.v-html=""
#7078bb7a15c Thanks@emilyinure! - Fixed#6675: Now only flags
noAccumulatingSpread on Object.assign when a new object is being allocated on
each iteration. Before, all cases using Object.assign with reduce parameters
were warned despite not making new allocations.
The following code will no longer be a false positive:
foo.reduce((acc,bar)=>Object.assign(acc,bar),{});The following cases whichdo make new allocations will continue to warn:
foo.reduce((acc,bar)=>Object.assign({},acc,bar),{});#81750c8349e Thanks@ryan-m-walker! - Fixed CSS formatting of dimension units to use correct casing forQ,Hz andkHz.
Before:
.cssUnits {a:1Q;b:1Hz;c:1kHz;}After:
.cssUnits {a:1Q;b:1Hz;c:1kHz;}
#810082b9a8e Thanks@Netail! - Added the nursery ruleuseFind. Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result.
Invalid:
[1,2,3].filter((x)=>x>1)[0];[1,2,3].filter((x)=>x>1).at(0);
#8118dbc7021 Thanks@hirokiokada77! - Fixed#8117:useValidLang now accepts validBCP 47 language tags with script subtags.
Valid:
<htmllang="zh-Hans-CN"></html>
#7672f1d5725 Thanks@Netail! - Added the nursery ruleuseConsistentGraphqlDescriptions, requiring all descriptions to follow the same style (either block or inline) inside GraphQL files.
Invalid:
enumEnumValue {"this is a description" DEFAULT}Valid:
enumEnumValue {""" this is a description """ DEFAULT}#8026f102661 Thanks@matanshavit! - Fixed#8004:noParametersOnlyUsedInRecursion now correctly detects recursion by comparing function bindings instead of just names.
Previously, the rule incorrectly flagged parameters when a method had the same name as an outer function but called the outer function (not itself):
functionnotRecursive(arg){returnarg;}constobj={notRecursive(arg){returnnotRecursive(arg);// This calls the outer function, not the method itself},};Biome now properly distinguishes between these cases and will not report false positives.
#80975fc5416 Thanks@dyc3! - Added the nursery rulenoVueVIfWithVFor. This rule disallowsv-for andv-if on the same element.
<!-- Invalid--><divv-for="iteminitems"v-if="item.isActive"> {{ item.name }}</div>#80857983940 Thanks@Netail! - Added the nursery rulenoForIn. Disallow iterating using a for-in loop.
Invalid:
for(constiinarray){console.log(i,array[i]);}#80862b41e82 Thanks@matanshavit! - Fixed#8045: ThenoNestedTernary rule now correctly detects nested ternary expressions even when they are wrapped in parentheses (e.g.foo ? (bar ? 1 : 2) : 3).
Previously, the rule would not flag nested ternaries likefoo ? (bar ? 1 : 2) : 3 because the parentheses prevented detection. The rule now looks through parentheses to identify nested conditionals.
Previously not detected (now flagged):
constresult=foo ?(bar ?1 :2) :3;
Still valid (non-nested with parentheses):
constresult=foo ?bar :baz;
#8075e403868 Thanks@YTomm! - Fixed#7948: TheuseReadonlyClassProperties code fix whencheckAllProperties is enabled will no longer insert a newline afterreadonly and the class property.
#810247d940e Thanks@lucasweng! - Fixed#8027.useReactFunctionComponents no longer reports class components that implementcomponentDidCatch using class expressions.
The rule now correctly recognizes error boundaries defined as class expressions:
constErrorBoundary=classextendsComponent{componentDidCatch(error,info){}render(){returnthis.props.children;}};#80975fc5416 Thanks@dyc3! - Added the nursery ruleuseVueHyphenatedAttributes, which encourages using kebab case for attribute names, per the Vue style guide's recommendations.
<!-- Invalid--><MyComponent myProp="value" /><!-- Valid--><MyComponent my-prop="value" />
#81080f0a658 Thanks@Netail! - Added the nursery rulenoSyncScripts. Prevent the usage of synchronous scripts.
Invalid:
<scriptsrc="https://third-party-script.js"/>
Valid:
<scriptsrc="https://third-party-script.js"async/><scriptsrc="https://third-party-script.js"defer/>
#80981fdcaf0 Thanks@Jayllyz! - Added documentation URLs to rule descriptions in the JSON schema.
#80975fc5416 Thanks@dyc3! - Fixed an issue with the HTML parser where it would treat Vue directives with dynamic arguments as static arguments instead.
#7684f4433b3 Thanks@vladimir-ivanov! - ChangednoUnusedPrivateClassMembers to align more fully with meaningful reads.
This rule now distinguishes more carefully between writes and reads of private class members.
- Ameaningful read is any access that affects program behavior.
- For example,
this.#x += 1 both reads and writes#x, so it counts as usage. - Pure writes without a read (e.g.
this.#x = 1 with no getter) are no longer treated as usage.
This change ensures that private members are only considered “used” when they are actually read in a way that influences execution.
Invalid examples (previously valid)
classUsedMember{set #x(value){doSomething(value);}foo(){// This assignment does not actually read #x, because there is no getter.// Previously, this was considered a usage, but now it’s correctly flagged.this.#x=1;}}Valid example (Previously invalid)
classFoo{ #usedOnlyInWriteStatement=5;method(){// This counts as a meaningful read because we both read and write the value.this.#usedOnlyInWriteStatement+=42;}}#7684f4433b3 Thanks@vladimir-ivanov! -Improved detection of used private class members
The analysis for private class members has been improved: now the tool only considers a private member “used” if it is actually referenced in the code.
- Previously, some private members might have been reported as used even if they weren’t actually accessed.
- With this change, only members that are truly read or called in the code are counted as used.
- Members that are never accessed will now be correctly reported as unused.
This makes reports about unused private members more accurate and helps you clean up truly unused code.
Example (previously valid)
typeYesNo="yes"|"no";exportclassSampleYesNo{privateyes:()=>void;privateno:()=>void;privatedontKnow:()=>void;// <- will now report as unusedon(action:YesNo):void{this[action]();}}#7681b406db6 Thanks@kedevked! - Added the new lint rule,useSpread, ported from the ESLint ruleprefer-spread.
This rule enforces the use of thespread syntax (...) overFunction.prototype.apply() when calling variadic functions, as spread syntax is generally more concise and idiomatic in modern JavaScript (ES2015+).
The rule provides a safe fix.
Math.max.apply(Math,args);foo.apply(undefined,args);obj.method.apply(obj,args);
#7287aa55c8d Thanks@ToBinio! - Fixed#7205: ThenoDuplicateTestHooks rule now treats chained describe variants (e.g., describe.each/for/todo) as proper describe scopes, eliminating false positives.
The following code will no longer be a false positive:
describe("foo",()=>{describe.for([])("baz",()=>{beforeEach(()=>{});});describe.todo("qux",()=>{beforeEach(()=>{});});describe.todo.each([])("baz",()=>{beforeEach(()=>{});});});#80130c0edd4 Thanks@Jayllyz! - Added the GraphQL nursery ruleuseUniqueGraphqlOperationName. This rule ensures that all GraphQL operations within a document have unique names.
Invalid:
queryuser {user {id }}queryuser {user {idemail }}Valid:
queryuser {user {id }}queryuserWithEmail {user {idemail }}#8084c2983f9 Thanks@dyc3! - Fixed#8080: The HTML parser, when parsing Vue, can now properly handle Vue directives with no argument, modifiers, or initializer (e.g.v-else). It will no longer treat subsequent valid attributes as bogus.
<pv-else>World</p><!-- Fixed: class now gets parsed as it's own attribute-->
#8104041196b Thanks@Conaclos! - FixednoInvalidUseBeforeDeclaration.
The rule no longer reports a use of an ambient variable before its declarations.
The rule also completely ignores TypeScript declaration files.
The following code is no longer reported as invalid:
CONSTANT;declareconstCONSTANT:number;
#8060ba7b076 Thanks@dyc3! - Added the nursery ruleuseVueValidVBind, which enforces the validity ofv-bind directives in Vue files.
Invalidv-bind usages include:
<Foov-bind /><!-- Missing argument--><Foov-bind:foo /><!-- Missing value--><Foov-bind:foo.bar="baz" /><!-- Invalid modifier-->
#8113fb8e3e7 Thanks@Conaclos! - FixednoInvalidUseBeforeDeclaration.
The rule now reports invalid use of classes, enums, and TypeScript's import-equals before their declarations.
The following code is now reported as invalid:
#80770170dcb Thanks@dyc3! - Added the ruleuseVueValidVElseIf to enforce validv-else-if directives in Vue templates. This rule reports invalidv-else-if directives with missing conditional expressions or when not preceded by av-if orv-else-if directive.
#80770170dcb Thanks@dyc3! - Added the ruleuseVueValidVElse to enforce validv-else directives in Vue templates. This rule reportsv-else directives that are not preceded by av-if orv-else-if directive.
#80770170dcb Thanks@dyc3! - Added the ruleuseVueValidVHtml to enforce valid usage of thev-html directive in Vue templates. This rule reportsv-html directives with missing expressions, unexpected arguments, or unexpected modifiers.
#80770170dcb Thanks@dyc3! - Added the ruleuseVueValidVIf to enforce validv-if directives in Vue templates. It disallows arguments and modifiers, and ensures a value is provided.
#80770170dcb Thanks@dyc3! - Added the ruleuseVueValidVOn to enforce validv-on directives in Vue templates. This rule reports invalidv-on / shorthand@ directives with missing event names, invalid modifiers, or missing handler expressions.
Uh oh!
There was an error while loading.Please reload this page.
This PR contains the following updates:
2.3.5->2.3.8Release Notes
biomejs/biome (@biomejs/biome)
v2.3.8Compare Source
Patch Changes
#8188
4ca088cThanks@ematipico! - Fixed#7390, where Biome couldn't apply the correct configuration passed via--config-path.If you have multipleroot configuration files, running any command with
--config-pathwill now apply the chosen configuration file.#8171
79adaeaThanks@dibashthapa! - Added the new rulenoLeakedRender. This rule helps prevent potential leaks when rendering components that use binary expressions or ternaries.For example, the following code triggers the rule because the component would render
0:#8116
b537918Thanks@Netail! - Added the nursery rulenoDuplicatedSpreadProps. Disallow JSX prop spreading the same identifier multiple times.Invalid:
#8256
f1e4696Thanks@cormacrelf! - Fixed a bug where logs were discarded (the kind from--log-level=infoetc.). This is a regression introduced after an internal refactor that wasn't adequately tested.#8226
3f19b52Thanks@dyc3! - Fixed#8222: The HTML parser, with Vue directives enabled, can now parsev-slotshorthand syntax, e.g.<template #foo>.#8007
182ecdcThanks@brandonmcconnell! - Added support for dollar-sign-prefixed filenames in theuseFilenamingConventionrule.Biome now allows filenames starting with the dollar-sign (e.g.
$postId.tsx) by default to support naming conventions used by frameworks such asTanStack Start for file-based-routing.#8218
91484d1Thanks@hirokiokada77! - Added thenoMultiStrrule, which disallows creating multiline strings by escaping newlines.Invalid:
Valid:
#8225
98ca2aeThanks@ongyuxing! - Fixed#7806: Prefer breaking after the assignment operator for conditional types with generic parameters to match Prettier.#6765
23f7855Thanks@emilyinure! - Fixed#6569: Allow files to export from themselves withnoImportCycles.This means the following is now allowed:
#8214
68c052eThanks@hirokiokada77! - Added thenoEqualsToNullrule, which enforces the use of===and!==for comparison withnullinstead of==or!=.Invalid:
Valid:
#8219
793bb9aThanks@dyc3! - Fixed#8190: The HTML parser will now parse Vue event handlers that contain:correctly, e.g.@update:modelValue="onUpdate".#8259
4a9139bThanks@hirokiokada77! - Fixed#8254: ThenoParameterAssignrule withpropertyAssignment: "deny"was incorrectly reporting an error when a function parameter was used on the right-hand side of an assignment to a local variable's property.The rule should only flag assignments that modify the parameter binding or its properties (L-value), not the use of its value.
Valid:
#8201
cd2edd7Thanks@Netail! - Added the nursery rulenoTernary. Disallow ternary operators.Invalid:
#8172
de98933Thanks@JeremyMoeglich! - Fixed#8145: handling of large hex literals, which previously caused both false positives and false negatives.This affects
noPrecisionLossandnoConstantMathMinMaxClamp.#8210
7b44e9eThanks@Netail! - Corrected rule source reference.biome migrate eslintshould do a bit better detecting rules in your eslint configurations.#8213
e430555Thanks@ruidosujeira! - Fixed#8209: Recognized formatting capability when either range or on-type formatting is supported, not only full-file formatting. This ensures editors and the language server correctly detect formatting support in files like JSONC.#8202
6f49d95Thanks@hirokiokada77! - Fixed#8079: Properly handlenameandvaluemetavariables forJsxAttributeGritQL queries.The following
biome searchcommand no longer throws an error:#8276
f7e836fThanks@hirokiokada77! - Added thenoProtorule, which disallows the use of the__proto__property for getting or setting the prototype of an object.Invalid:
Valid:
v2.3.7Compare Source
Patch Changes
#8169
7fdcec8Thanks@arendjr! - Fixed#7999: Correctly placeawaitafter leading comment in auto-fix action fromnoFloatingPromisesrule.#8157
12d5b42Thanks@Conaclos! - Fixed#8148.noInvalidUseBeforeDeclarationno longer reports some valid use before declarations.The following code is no longer reported as invalid:
#8178
6ba4157Thanks@dyc3! - Fixed#8174, where the HTML parser would parse 2 directives as a single directive because it would not reject whitespace in Vue directives. This would cause the formatter to erroneously merge the 2 directives into one, resulting in broken code.#8088
0eb08e8Thanks@db295! - Fixed#7876: ThenoUnusedImportsrule now ignores imports that are used by@linkcode and@linkplain (previously supported@link and@see).The following code will no longer be a false positive:
#8119
8d64655Thanks@ematipico! - Improved the detection of the rulenoUnnecessaryConditions. Now the rule isn't triggered for variables that are mutated inside a module.This logic deviates from the original rule, hence
noUnnecessaryConditionsis now marked as "inspired".In the following example,
heystarts asfalse, but then it's assigned to a string. The rule isn't triggered inside theifcheck.#8149
e0a02bfThanks@Netail! - Fixed#8144: ImprovenoSyncScripts, ignore script tags withtype="module"as these are always non-blocking.#8182
e9f068eThanks@hirokiokada77! - Fixed#7877: Range suppressions now handle suppressed categories properly.Valid:
#8111
bf1a836Thanks@ryan-m-walker! - Added support for parsing and formatting theCSS if function.Example
#8173
7fc07c1Thanks@ematipico! - Fixed#8138 by reverting an internal refactor that caused a regression to the rulenoUnusedPrivateClassMembers.#8119
8d64655Thanks@ematipico! - Improved the type inference engine, by resolving types for variables that are assigned to multiple values.#8158
fb1458bThanks@dyc3! - Added theuseVueValidVTextlint rule to enforce validv-textdirectives. The rule reports whenv-texthas an argument, has modifiers, or is missing a value.Invalid:
#8158
fb1458bThanks@dyc3! - FixeduseVueValidVHtmlso that it will now flag empty strings, e.g.v-html=""#7078
bb7a15cThanks@emilyinure! - Fixed#6675: Now only flagsnoAccumulatingSpread on Object.assign when a new object is being allocated on
each iteration. Before, all cases using Object.assign with reduce parameters
were warned despite not making new allocations.
The following code will no longer be a false positive:
The following cases whichdo make new allocations will continue to warn:
#8175
0c8349eThanks@ryan-m-walker! - Fixed CSS formatting of dimension units to use correct casing forQ,HzandkHz.Before:
After:
v2.3.6Compare Source
Patch Changes
#8100
82b9a8eThanks@Netail! - Added the nursery ruleuseFind. Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result.Invalid:
#8118
dbc7021Thanks@hirokiokada77! - Fixed#8117:useValidLangnow accepts validBCP 47 language tags with script subtags.Valid:
#7672
f1d5725Thanks@Netail! - Added the nursery ruleuseConsistentGraphqlDescriptions, requiring all descriptions to follow the same style (either block or inline) inside GraphQL files.Invalid:
Valid:
#8026
f102661Thanks@matanshavit! - Fixed#8004:noParametersOnlyUsedInRecursionnow correctly detects recursion by comparing function bindings instead of just names.Previously, the rule incorrectly flagged parameters when a method had the same name as an outer function but called the outer function (not itself):
Biome now properly distinguishes between these cases and will not report false positives.
#8097
5fc5416Thanks@dyc3! - Added the nursery rulenoVueVIfWithVFor. This rule disallowsv-forandv-ifon the same element.#8085
7983940Thanks@Netail! - Added the nursery rulenoForIn. Disallow iterating using a for-in loop.Invalid:
#8086
2b41e82Thanks@matanshavit! - Fixed#8045: ThenoNestedTernaryrule now correctly detects nested ternary expressions even when they are wrapped in parentheses (e.g.foo ? (bar ? 1 : 2) : 3).Previously, the rule would not flag nested ternaries like
foo ? (bar ? 1 : 2) : 3because the parentheses prevented detection. The rule now looks through parentheses to identify nested conditionals.Previously not detected (now flagged):
Still valid (non-nested with parentheses):
#8075
e403868Thanks@YTomm! - Fixed#7948: TheuseReadonlyClassPropertiescode fix whencheckAllPropertiesis enabled will no longer insert a newline afterreadonlyand the class property.#8102
47d940eThanks@lucasweng! - Fixed#8027.useReactFunctionComponentsno longer reports class components that implementcomponentDidCatchusing class expressions.The rule now correctly recognizes error boundaries defined as class expressions:
#8097
5fc5416Thanks@dyc3! - Added the nursery ruleuseVueHyphenatedAttributes, which encourages using kebab case for attribute names, per the Vue style guide's recommendations.#8108
0f0a658Thanks@Netail! - Added the nursery rulenoSyncScripts. Prevent the usage of synchronous scripts.Invalid:
Valid:
#8098
1fdcaf0Thanks@Jayllyz! - Added documentation URLs to rule descriptions in the JSON schema.#8097
5fc5416Thanks@dyc3! - Fixed an issue with the HTML parser where it would treat Vue directives with dynamic arguments as static arguments instead.#7684
f4433b3Thanks@vladimir-ivanov! - ChangednoUnusedPrivateClassMembersto align more fully with meaningful reads.This rule now distinguishes more carefully between writes and reads of private class members.
this.#x += 1both reads and writes#x, so it counts as usage.this.#x = 1with no getter) are no longer treated as usage.This change ensures that private members are only considered “used” when they are actually read in a way that influences execution.
Invalid examples (previously valid)
Valid example (Previously invalid)
#7684
f4433b3Thanks@vladimir-ivanov! -Improved detection of used private class membersThe analysis for private class members has been improved: now the tool only considers a private member “used” if it is actually referenced in the code.
This makes reports about unused private members more accurate and helps you clean up truly unused code.
Example (previously valid)
#7681
b406db6Thanks@kedevked! - Added the new lint rule,useSpread, ported from the ESLint ruleprefer-spread.This rule enforces the use of thespread syntax (
...) overFunction.prototype.apply()when calling variadic functions, as spread syntax is generally more concise and idiomatic in modern JavaScript (ES2015+).The rule provides a safe fix.
Invalid
Valid
#7287
aa55c8dThanks@ToBinio! - Fixed#7205: ThenoDuplicateTestHooksrule now treats chained describe variants (e.g., describe.each/for/todo) as proper describe scopes, eliminating false positives.The following code will no longer be a false positive:
#8013
0c0edd4Thanks@Jayllyz! - Added the GraphQL nursery ruleuseUniqueGraphqlOperationName. This rule ensures that all GraphQL operations within a document have unique names.Invalid:
Valid:
#8084
c2983f9Thanks@dyc3! - Fixed#8080: The HTML parser, when parsing Vue, can now properly handle Vue directives with no argument, modifiers, or initializer (e.g.v-else). It will no longer treat subsequent valid attributes as bogus.#8104
041196bThanks@Conaclos! - FixednoInvalidUseBeforeDeclaration.The rule no longer reports a use of an ambient variable before its declarations.
The rule also completely ignores TypeScript declaration files.
The following code is no longer reported as invalid:
#8060
ba7b076Thanks@dyc3! - Added the nursery ruleuseVueValidVBind, which enforces the validity ofv-binddirectives in Vue files.Invalid
v-bindusages include:#8113
fb8e3e7Thanks@Conaclos! - FixednoInvalidUseBeforeDeclaration.The rule now reports invalid use of classes, enums, and TypeScript's import-equals before their declarations.
The following code is now reported as invalid:
#8077
0170dcbThanks@dyc3! - Added the ruleuseVueValidVElseIfto enforce validv-else-ifdirectives in Vue templates. This rule reports invalidv-else-ifdirectives with missing conditional expressions or when not preceded by av-iforv-else-ifdirective.#8077
0170dcbThanks@dyc3! - Added the ruleuseVueValidVElseto enforce validv-elsedirectives in Vue templates. This rule reportsv-elsedirectives that are not preceded by av-iforv-else-ifdirective.#8077
0170dcbThanks@dyc3! - Added the ruleuseVueValidVHtmlto enforce valid usage of thev-htmldirective in Vue templates. This rule reportsv-htmldirectives with missing expressions, unexpected arguments, or unexpected modifiers.#8077
0170dcbThanks@dyc3! - Added the ruleuseVueValidVIfto enforce validv-ifdirectives in Vue templates. It disallows arguments and modifiers, and ensures a value is provided.#8077
0170dcbThanks@dyc3! - Added the ruleuseVueValidVOnto enforce validv-ondirectives in Vue templates. This rule reports invalidv-on/ shorthand@directives with missing event names, invalid modifiers, or missing handler expressions.Configuration
📅Schedule: Branch creation - At any time (no schedule defined), Automerge - "before 4am" (UTC).
🚦Automerge: Enabled.
♻Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated byMend Renovate. View therepository job log.