Commit 418bf4d
authored
chore(deps): update dependency @biomejs/biome to v2.3.6 (#294)
This PR contains the following updates:
| Package | Type | Update | Change | OpenSSF |
|---|---|---|---|---|
| [@biomejs/biome](https://biomejs.dev)
([source](https://redirect.github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome))
| devDependencies | patch | [`2.3.5` ->
`2.3.6`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/2.3.5/2.3.6)
| [](https://securityscorecards.dev/viewer/?uri=github.com/biomejs/biome)
|
---
> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.
---
### Release Notes
<details>
<summary>biomejs/biome (@​biomejs/biome)</summary>
###
[`v2.3.6`](https://redirect.github.com/biomejs/biome/blob/HEAD/packages/@​biomejs/biome/CHANGELOG.md#236)
[Compare
Source](https://redirect.github.com/biomejs/biome/compare/@biomejs/biome@2.3.5...@biomejs/biome@2.3.6)
##### Patch Changes
- [#​8100](https://redirect.github.com/biomejs/biome/pull/8100)
[`82b9a8e`](https://redirect.github.com/biomejs/biome/commit/82b9a8eb3ddeb396c9c4615fb316bdd1eb3c7a49)
Thanks [@​Netail](https://redirect.github.com/Netail)! - Added the
nursery rule [`useFind`](https://biomejs.dev/linter/rules/use-find/).
Enforce the use of Array.prototype.find() over Array.prototype.filter()
followed by \[0] when looking for a single result.
**Invalid:**
```js
[1, 2, 3].filter((x) => x > 1)[0];
[1, 2, 3].filter((x) => x > 1).at(0);
```
- [#​8118](https://redirect.github.com/biomejs/biome/pull/8118)
[`dbc7021`](https://redirect.github.com/biomejs/biome/commit/dbc7021016e2314344893b371de1a43f13c0c03b)
Thanks
[@​hirokiokada77](https://redirect.github.com/hirokiokada77)! -
Fixed
[#​8117](https://redirect.github.com/biomejs/biome/issues/8117):
[`useValidLang`](https://biomejs.dev/linter/rules/use-valid-lang/) now
accepts valid [BCP 47 language
tags](https://developer.mozilla.org/en-US/docs/Glossary/BCP_47_language_tag)
with script subtags.
**Valid:**
```html
<html lang="zh-Hans-CN"></html>
```
- [#​7672](https://redirect.github.com/biomejs/biome/pull/7672)
[`f1d5725`](https://redirect.github.com/biomejs/biome/commit/f1d5725d0660ffb1e29c3694cd100b1c37bf50d5)
Thanks [@​Netail](https://redirect.github.com/Netail)! - Added the
nursery rule
[`useConsistentGraphqlDescriptions`](https://biomejs.dev/linter/rules/use-consistent-graphql-descriptions/),
requiring all descriptions to follow the same style (either block or
inline) inside GraphQL files.
**Invalid:**
```graphql
enum EnumValue {
"this is a description"
DEFAULT
}
```
**Valid:**
```graphql
enum EnumValue {
"""
this is a description
"""
DEFAULT
}
```
- [#​8026](https://redirect.github.com/biomejs/biome/pull/8026)
[`f102661`](https://redirect.github.com/biomejs/biome/commit/f10266193d9fd0bdb51eda3001b4068defb78a66)
Thanks [@​matanshavit](https://redirect.github.com/matanshavit)! -
Fixed
[#​8004](https://redirect.github.com/biomejs/biome/issues/8004):
[`noParametersOnlyUsedInRecursion`](https://biomejs.dev/linter/rules/no-parameters-only-used-in-recursion/)
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):
```js
function notRecursive(arg) {
return arg;
}
const obj = {
notRecursive(arg) {
return notRecursive(arg); // This calls the outer function, not the
method itself
},
};
```
Biome now properly distinguishes between these cases and will not report
false positives.
- [#​8097](https://redirect.github.com/biomejs/biome/pull/8097)
[`5fc5416`](https://redirect.github.com/biomejs/biome/commit/5fc5416ae1a64dfae977241eb3f30601999039b7)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`noVueVIfWithVFor`](https://biomejs.dev/linter/rules/no-vue-v-if-with-v-for/).
This rule disallows `v-for` and `v-if` on the same element.
```vue
<!-- Invalid -->
<div v-for="item in items" v-if="item.isActive">
{{ item.name }}
</div>
```
- [#​8085](https://redirect.github.com/biomejs/biome/pull/8085)
[`7983940`](https://redirect.github.com/biomejs/biome/commit/798394072bc757443501224b22f943d5e052220b)
Thanks [@​Netail](https://redirect.github.com/Netail)! - Added the
nursery rule [`noForIn`](https://biomejs.dev/linter/rules/no-for-in/).
Disallow iterating using a for-in loop.
**Invalid:**
```js
for (const i in array) {
console.log(i, array[i]);
}
```
- [#​8086](https://redirect.github.com/biomejs/biome/pull/8086)
[`2b41e82`](https://redirect.github.com/biomejs/biome/commit/2b41e82de4f2735446599b2f73353ecd8382438f)
Thanks [@​matanshavit](https://redirect.github.com/matanshavit)! -
Fixed
[#​8045](https://redirect.github.com/biomejs/biome/issues/8045):
The
[`noNestedTernary`](https://biomejs.dev/linter/rules/no-nested-ternary/)
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 like `foo ? (bar ?
1 : 2) : 3` because the parentheses prevented detection. The rule now
looks through parentheses to identify nested conditionals.
**Previously not detected (now flagged):**
```js
const result = foo ? (bar ? 1 : 2) : 3;
```
**Still valid (non-nested with parentheses):**
```js
const result = foo ? bar : baz;
```
- [#​8075](https://redirect.github.com/biomejs/biome/pull/8075)
[`e403868`](https://redirect.github.com/biomejs/biome/commit/e403868e2231b4e4e956ff3d9443c7e55adab247)
Thanks [@​YTomm](https://redirect.github.com/YTomm)! - Fixed
[#​7948](https://redirect.github.com/biomejs/biome/issues/7948):
The `useReadonlyClassProperties` code fix when `checkAllProperties` is
enabled will no longer insert a newline after `readonly` and the class
property.
- [#​8102](https://redirect.github.com/biomejs/biome/pull/8102)
[`47d940e`](https://redirect.github.com/biomejs/biome/commit/47d940e30c78fff2519c72a0c51f6cd0633a7d2b)
Thanks [@​lucasweng](https://redirect.github.com/lucasweng)! -
Fixed
[#​8027](https://redirect.github.com/biomejs/biome/issues/8027).
[`useReactFunctionComponents`](https://biomejs.dev/linter/rules/use-react-function-components/)
no longer reports class components that implement `componentDidCatch`
using class expressions.
The rule now correctly recognizes error boundaries defined as class
expressions:
```jsx
const ErrorBoundary = class extends Component {
componentDidCatch(error, info) {}
render() {
return this.props.children;
}
};
```
- [#​8097](https://redirect.github.com/biomejs/biome/pull/8097)
[`5fc5416`](https://redirect.github.com/biomejs/biome/commit/5fc5416ae1a64dfae977241eb3f30601999039b7)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`useVueHyphenatedAttributes`](https://biomejs.dev/linter/rules/use-vue-hyphenated-attributes/),
which encourages using kebab case for attribute names, per the Vue style
guide's recommendations.
```vue
<!-- Invalid -->
<MyComponent myProp="value" />
<!-- Valid -->
<MyComponent my-prop="value" />
```
- [#​8108](https://redirect.github.com/biomejs/biome/pull/8108)
[`0f0a658`](https://redirect.github.com/biomejs/biome/commit/0f0a65884b615109a1282e88f18efbaca3d223b0)
Thanks [@​Netail](https://redirect.github.com/Netail)! - Added the
nursery rule
[`noSyncScripts`](https://biomejs.dev/linter/rules/no-sync-scripts/).
Prevent the usage of synchronous scripts.
**Invalid:**
```jsx
<script src="https://third-party-script.js" />
```
**Valid:**
```jsx
<script src="https://third-party-script.js" async />
<script src="https://third-party-script.js" defer />
```
- [#​8098](https://redirect.github.com/biomejs/biome/pull/8098)
[`1fdcaf0`](https://redirect.github.com/biomejs/biome/commit/1fdcaf0336a92cde9becbf8cba502ac0091b2b1d)
Thanks [@​Jayllyz](https://redirect.github.com/Jayllyz)! - Added
documentation URLs to rule descriptions in the JSON schema.
- [#​8097](https://redirect.github.com/biomejs/biome/pull/8097)
[`5fc5416`](https://redirect.github.com/biomejs/biome/commit/5fc5416ae1a64dfae977241eb3f30601999039b7)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed an
issue with the HTML parser where it would treat Vue directives with
dynamic arguments as static arguments instead.
- [#​7684](https://redirect.github.com/biomejs/biome/pull/7684)
[`f4433b3`](https://redirect.github.com/biomejs/biome/commit/f4433b34e3ad9686bdde08727453e3caf0409412)
Thanks
[@​vladimir-ivanov](https://redirect.github.com/vladimir-ivanov)!
- Changed
[`noUnusedPrivateClassMembers`](https://biomejs.dev/linter/rules/no-unused-private-class-members/)
to align more fully with meaningful reads.
This rule now distinguishes more carefully between writes and reads of
private class members.
- A *meaningful 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)***
```ts
class UsedMember {
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)***
```js
class Foo {
#usedOnlyInWriteStatement = 5;
method() {
// This counts as a meaningful read because we both read and write the
value.
this.#usedOnlyInWriteStatement += 42;
}
}
```
- [#​7684](https://redirect.github.com/biomejs/biome/pull/7684)
[`f4433b3`](https://redirect.github.com/biomejs/biome/commit/f4433b34e3ad9686bdde08727453e3caf0409412)
Thanks
[@​vladimir-ivanov](https://redirect.github.com/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)***
```ts
type YesNo = "yes" | "no";
export class SampleYesNo {
private yes: () => void;
private no: () => void;
private dontKnow: () => void; // <- will now report as unused
on(action: YesNo): void {
this[action]();
}
}
```
- [#​7681](https://redirect.github.com/biomejs/biome/pull/7681)
[`b406db6`](https://redirect.github.com/biomejs/biome/commit/b406db667f2dddd177f7c45ecc9e98a83b796a0a)
Thanks [@​kedevked](https://redirect.github.com/kedevked)! - Added
the new lint rule,
[`useSpread`](https://biomejs.dev/linter/rules/use-spread/), ported from
the ESLint rule
[`prefer-spread`](https://eslint.org/docs/latest/rules/prefer-spread).
This rule enforces the use of the **spread syntax** (`...`) over
`Function.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
```js
Math.max.apply(Math, args);
foo.apply(undefined, args);
obj.method.apply(obj, args);
```
##### Valid
```js
Math.max(...args);
foo(...args);
obj.method(...args);
// Allowed: cases where the `this` binding is intentionally changed
foo.apply(otherObj, args);
```
- [#​7287](https://redirect.github.com/biomejs/biome/pull/7287)
[`aa55c8d`](https://redirect.github.com/biomejs/biome/commit/aa55c8d57231e21a1b00318c0a226335ddda4792)
Thanks [@​ToBinio](https://redirect.github.com/ToBinio)! - Fixed
[#​7205](https://redirect.github.com/biomejs/biome/issues/7205):
The
[`noDuplicateTestHooks`](https://biomejs.dev/linter/rules/no-duplicate-test-hooks/)
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:
```js
describe("foo", () => {
describe.for([])("baz", () => {
beforeEach(() => {});
});
describe.todo("qux", () => {
beforeEach(() => {});
});
describe.todo.each([])("baz", () => {
beforeEach(() => {});
});
});
```
- [#​8013](https://redirect.github.com/biomejs/biome/pull/8013)
[`0c0edd4`](https://redirect.github.com/biomejs/biome/commit/0c0edd4311610a5e064f99e13824d0b4c5a9f873)
Thanks [@​Jayllyz](https://redirect.github.com/Jayllyz)! - Added
the GraphQL nursery rule
[`useUniqueGraphqlOperationName`](https://biomejs.dev/linter/rules/use-unique-graphql-operation-name).
This rule ensures that all GraphQL operations within a document have
unique names.
**Invalid:**
```graphql
query user {
user {
id
}
}
query user {
user {
id
email
}
}
```
**Valid:**
```graphql
query user {
user {
id
}
}
query userWithEmail {
user {
id
email
}
}
```
- [#​8084](https://redirect.github.com/biomejs/biome/pull/8084)
[`c2983f9`](https://redirect.github.com/biomejs/biome/commit/c2983f9776d23045c7ea7a092e5eb71d18abf2e0)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​8080](https://redirect.github.com/biomejs/biome/issues/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.
```vue
<p v-else class="flex">World</p>
<!-- Fixed: class now gets parsed as it's own attribute -->
```
- [#​8104](https://redirect.github.com/biomejs/biome/pull/8104)
[`041196b`](https://redirect.github.com/biomejs/biome/commit/041196bc2a1d62f2cde758884e85d180491ff2da)
Thanks [@​Conaclos](https://redirect.github.com/Conaclos)! - Fixed
[`noInvalidUseBeforeDeclaration`](https://biomejs.dev/linter/rules/no-invalid-use-before-declaration/).
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:
```ts
CONSTANT;
declare const CONSTANT: number;
```
- [#​8060](https://redirect.github.com/biomejs/biome/pull/8060)
[`ba7b076`](https://redirect.github.com/biomejs/biome/commit/ba7b0765894522a3436f00df9355255f8678f9d6)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`useVueValidVBind`](https://biomejs.dev/linter/rules/use-vue-valid-v-bind/),
which enforces the validity of `v-bind` directives in Vue files.
Invalid `v-bind` usages include:
```vue
<Foo v-bind />
<!-- Missing argument -->
<Foo v-bind:foo />
<!-- Missing value -->
<Foo v-bind:foo.bar="baz" />
<!-- Invalid modifier -->
```
- [#​8113](https://redirect.github.com/biomejs/biome/pull/8113)
[`fb8e3e7`](https://redirect.github.com/biomejs/biome/commit/fb8e3e76776b891f037edf308179fc64e4865a4d)
Thanks [@​Conaclos](https://redirect.github.com/Conaclos)! - Fixed
[`noInvalidUseBeforeDeclaration`](https://biomejs.dev/linter/rules/no-invalid-use-before-declaration/).
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:
```js
new C();
class C {}
```
- [#​8077](https://redirect.github.com/biomejs/biome/pull/8077)
[`0170dcb`](https://redirect.github.com/biomejs/biome/commit/0170dcb1f1aa99ae80c042ab38c94ed4bdcdc936)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
rule
[`useVueValidVElseIf`](https://biomejs.dev/linter/rules/use-vue-valid-v-else-if/)
to enforce valid `v-else-if` directives in Vue templates. This rule
reports invalid `v-else-if` directives with missing conditional
expressions or when not preceded by a `v-if` or `v-else-if` directive.
- [#​8077](https://redirect.github.com/biomejs/biome/pull/8077)
[`0170dcb`](https://redirect.github.com/biomejs/biome/commit/0170dcb1f1aa99ae80c042ab38c94ed4bdcdc936)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
rule
[`useVueValidVElse`](https://biomejs.dev/linter/rules/use-vue-valid-v-else/)
to enforce valid `v-else` directives in Vue templates. This rule reports
`v-else` directives that are not preceded by a `v-if` or `v-else-if`
directive.
- [#​8077](https://redirect.github.com/biomejs/biome/pull/8077)
[`0170dcb`](https://redirect.github.com/biomejs/biome/commit/0170dcb1f1aa99ae80c042ab38c94ed4bdcdc936)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
rule
[`useVueValidVHtml`](https://biomejs.dev/linter/rules/use-vue-valid-v-html/)
to enforce valid usage of the `v-html` directive in Vue templates. This
rule reports `v-html` directives with missing expressions, unexpected
arguments, or unexpected modifiers.
- [#​8077](https://redirect.github.com/biomejs/biome/pull/8077)
[`0170dcb`](https://redirect.github.com/biomejs/biome/commit/0170dcb1f1aa99ae80c042ab38c94ed4bdcdc936)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
rule
[`useVueValidVIf`](https://biomejs.dev/linter/rules/use-vue-valid-v-if/)
to enforce valid `v-if` directives in Vue templates. It disallows
arguments and modifiers, and ensures a value is provided.
- [#​8077](https://redirect.github.com/biomejs/biome/pull/8077)
[`0170dcb`](https://redirect.github.com/biomejs/biome/commit/0170dcb1f1aa99ae80c042ab38c94ed4bdcdc936)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
rule
[`useVueValidVOn`](https://biomejs.dev/linter/rules/use-vue-valid-v-on/)
to enforce valid `v-on` directives in Vue templates. This rule reports
invalid `v-on` / shorthand `@` directives with missing event names,
invalid modifiers, or missing handler expressions.
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At 12:00 AM through 04:59 AM and 10:00
PM through 11:59 PM, Monday through Friday ( * 0-4,22-23 * * 1-5 ), Only
on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - At any time
(no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/settlemint/settlemint-action).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Updated devDependency @biomejs/biome to 2.3.6 to include new lint rules
and multiple fixes. No app code changes; lint output may change.
<sup>Written for commit 3c7d1ae.
Summary will update automatically on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>1 parent 273a4da commit 418bf4d
1 file changed
+35
-35
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments