chore(deps): update dependency @biomejs/biome to v2.3.6 #904
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.3.4->2.3.6Release Notes
biomejs/biome (@biomejs/biome)
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 valid BCP 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 the spread 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.v2.3.5Compare Source
Patch Changes
#8023
96f3e77Thanks @ematipico! - Added support Svelte syntax{@​html}. Biome now is able to parse and format the Svelte syntax{@​html}:The contents of the expressions inside the
{@​html <expression>}aren't formatted yet.#8058
5f68bccThanks @ematipico! - Fixed a bug where the Biome Language Server would enable its project file watcher even when no project rules were enabled.Now the watching of nested configuration files and nested ignore files is delegated to the editor, if their LSP spec supports it.
#8023
96f3e77Thanks @ematipico! - Added support Svelte syntax{@​render}. Biome now is able to parse and format the Svelte syntax{@​render}:The contents of the expressions inside the
{@​render <expression>}aren't formatted yet.#8006
f0612a5Thanks @Bertie690! - Updated documentation and diagnostic forlint/complexity/noBannedTypes. The rule should have a more detailed description and diagnostic error message.#8039
da70d8bThanks @PFiS1737! - Biome now keeps a blank line after the frontmatter section in Astro files.#8042
b7efa6fThanks @dyc3! - The CSS Parser, withtailwindDirectivesenabled, will now accept at rules like@mediaand@supportsin@custom-variantshorthand syntax.#8064
3ff9d45Thanks @dibashthapa! - Fixed #7967: Fixed the issue with support for advanced SVG props#8023
96f3e77Thanks @ematipico! - Added support Svelte syntax{@​attach}. Biome now is able to parse and format the Svelte syntax{@​attach}:The contents of the expressions inside the
{@​attach <expression>}aren't formatted yet.#8001
6e8a50eThanks @ematipico! - Added support Svelte syntax{#key}. Biome now is able to parse and format the Svelte syntax{#key}:The contents of the expressions inside the
{#key <expression>}aren't formatted yet.#8023
96f3e77Thanks @ematipico! - Added support Svelte syntax{@​const}. Biome now is able to parse and format the Svelte syntax{@​const}:The contents of the expressions inside the
{@​const <expression>}aren't formatted yet.#8044
8f77d4aThanks @Netail! - Corrected rule source references.biome migrate eslintshould do a bit better detecting rules in your eslint configurations.#8065
1a2d1afThanks @Netail! - Added the nursery ruleuseArraySortCompare. Require Array#sort and Array#toSorted calls to always provide a compareFunction.Invalid:
Valid:
#7673
a3a713dThanks @dyc3! - The HTML parser is now able to parse vue directives. This enables us to write/port Vue lint rules that require inspecting the<template>section. However, this more complex parsing may result in parsing errors where there was none before. For those of you that have opted in to the experimental support (akaexperimentalFullSupportEnabled), we greatly appreciate your help testing this out, and your bug reports.#8031
fa6798aThanks @ematipico! - Added support for the Svelte syntax{#if}{/if}. The Biome HTML parser is now able to parse and format the{#if}{/if} blocks:<!-- if / else-if / else --> {#if porridge.temperature > 100} -<p>too hot!</p> + <p>too hot!</p> {:else if 80 > porridge.temperature} -<p>too cold!</p> + <p>too cold!</p> {:else if 100 > porridge.temperature} -<p>too too cold!</p> + <p>too too cold!</p> {:else} -<p>just right!</p> + <p>just right!</p> {/if}#8041
beeb7bbThanks @dyc3! - The CSS parser, withtailwindDirectivesenabled, will now accept lists of selectors in@custom-variantshorthand syntax.#8028
c09e45cThanks @fmajestic! - The GitLab reporter now outputs format errors.#8037
78011b1Thanks @PFiS1737! -indentScriptAndStyleno longer indents the frontmatter in Astro files.#8009
6374b1fThanks @tmcw! - Fixed an edge case in theuseArrowFunctionrule.The rule no longer emits diagnostics for or offers to fix functions that reference
the arguments object,
because that object is undefined for arrow functions.
Valid example:
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 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 by Mend Renovate. View the repository job log.