Repository navigation
Commit 64393af
authored
Update dependency @biomejs/biome to v2.5.15 (#287)
This PR contains the following updates:
| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@biomejs/biome](https://biomejs.dev)
([source](https://redirect.github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome))
| [`2.5.14` →
`2.5.15`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/2.5.14/2.5.15)
|

|

|
---
### Release Notes
<details>
<summary>biomejs/biome (@​biomejs/biome)</summary>
###
[`v2.5.15`](https://redirect.github.com/biomejs/biome/blob/HEAD/packages/@biomejs/biome/CHANGELOG.md#2515)
[Compare
Source](https://redirect.github.com/biomejs/biome/compare/@biomejs/biome@2.5.14...@biomejs/biome@2.5.15)
##### Patch Changes
- [#​10634](https://redirect.github.com/biomejs/biome/pull/10634)
[`b436ba0`](https://redirect.github.com/biomejs/biome/commit/b436ba00de298d5002a3d3bb1fae1d2a882f6d58)
Thanks [@​subaru-hello](https://redirect.github.com/subaru-hello)!
- Added the new nursery rule
[`noReactObjectTypeAsDefaultProp`](https://biomejs.dev/linter/rules/no-react-object-type-as-default-prop/),
which disallows array, object, and function values as default props in
React components.
For example, the following snippet triggers the rule.
```jsx
function Component({ items = [] }) {
return items;
}
```
- [#​11956](https://redirect.github.com/biomejs/biome/pull/11956)
[`faa8b37`](https://redirect.github.com/biomejs/biome/commit/faa8b374da7e196c937258c5442b4f773b4ba574)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`noSvelteExportLet`](https://biomejs.dev/linter/rules/no-svelte-export-let/),
which disallows declaring Svelte component props with the legacy `export
let` syntax. Use the `$props()` rune instead.
```svelte
<script>
export let name;
</script>
```
- [#​10816](https://redirect.github.com/biomejs/biome/pull/10816)
[`1b9479e`](https://redirect.github.com/biomejs/biome/commit/1b9479e4c85dd11af68ec14cbe43a5000edce86e)
Thanks [@​Th3S4mur41](https://redirect.github.com/Th3S4mur41)! -
Added a new nursery rule
[`useLogicalProperties`](https://biomejs.dev/linter/rules/use-logical-properties)
that enforces the use of logical properties in CSS, promoting better
internationalization and accessibility practices. The rule supports a
`direction` option with `"ltr"` as the default and `"rtl"` as the
alternative.
This is a first rule covering parts of
[#​9034](https://redirect.github.com/biomejs/biome/issues/9034)
```json
{
"linter": {
"rules": {
"nursery": {
"useLogicalProperties": {
"level": "warn",
"options": {
"direction": "rtl"
}
}
}
}
}
}
```
- [#​11960](https://redirect.github.com/biomejs/biome/pull/11960)
[`1fdb5c2`](https://redirect.github.com/biomejs/biome/commit/1fdb5c2609fbb64bd3442099f88c40b814405931)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`useSvelteKitRuneImports`](https://biomejs.dev/linter/rules/use-svelte-kit-rune-imports/),
which reports imports from the deprecated `$app/stores` module and
suggests `$app/state` instead.
```js
import { page } from "$app/stores";
```
- [#​11723](https://redirect.github.com/biomejs/biome/pull/11723)
[`3b429d1`](https://redirect.github.com/biomejs/biome/commit/3b429d182588aa19d35190a935e4dcdc5b693e5e)
Thanks [@​m1handr](https://redirect.github.com/m1handr)! - Fixed
[#​11656](https://redirect.github.com/biomejs/biome/issues/11656):
[`noAstroSetHtmlDirective`](https://biomejs.dev/linter/rules/no-astro-set-html-directive/)
now correctly reports `set:html` directives inside Astro template
expressions.
- [#​12023](https://redirect.github.com/biomejs/biome/pull/12023)
[`874d5ae`](https://redirect.github.com/biomejs/biome/commit/874d5aed43b2ae15e62e28b1909545eba5918f0b)
Thanks [@​codspeed](https://redirect.github.com/apps/codspeed)! -
Improved the performance of the HTML formatter up to 4x.
- [#​11761](https://redirect.github.com/biomejs/biome/pull/11761)
[`a3462fe`](https://redirect.github.com/biomejs/biome/commit/a3462fee0a32a764dd30dbc01f24c072fafea75a)
Thanks
[@​saberoueslati](https://redirect.github.com/saberoueslati)! -
Fixed
[#​11351](https://redirect.github.com/biomejs/biome/issues/11351):
[`useSimplifiedLogicExpression`](https://biomejs.dev/linter/rules/use-simplified-logic-expression/)
no longer reports boolean literals on the right side of `||` and `&&`
outside boolean contexts, because removing them can change the result of
the expression. For example, `y = x || false` is no longer reported,
while `if (x || false)` still is.
- [#​11732](https://redirect.github.com/biomejs/biome/pull/11732)
[`ff4c4dd`](https://redirect.github.com/biomejs/biome/commit/ff4c4dd922c360fdc9386495d617e63821cc43ee)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`noMeaninglessVoidOperator`](https://biomejs.dev/linter/rules/no-meaningless-void-operator/),
which reports unnecessary uses of `void`, such as `void log()` when
`log` returns `void`. The rule allows discarded call results, thenables,
`void 0`, and calls returning `never`.
- [#​11975](https://redirect.github.com/biomejs/biome/pull/11975)
[`40dd3fb`](https://redirect.github.com/biomejs/biome/commit/40dd3fb86d22ba155d0e1d081302abbcba0aa4ee)
Thanks [@​ematipico](https://redirect.github.com/ematipico)! -
Fixed the indentation of multiline Astro expressions, in templates and
attribute values, when running `biome check --write`. Biome now formats
Astro expressions with `biome format` too, and places them at the column
of the surrounding markup.
```diff
<div>
{items.map((item) => (
- <span>{item}</span>
-))}
+ <span>{item}</span>
+ ))}
</div>
```
- [#​12016](https://redirect.github.com/biomejs/biome/pull/12016)
[`09d4000`](https://redirect.github.com/biomejs/biome/commit/09d4000ae7414226a10bcd968765f42ebb9ed13c)
Thanks [@​codspeed](https://redirect.github.com/apps/codspeed)! -
Improved the performance of indexing and analysis of big files up to 2x.
The improvements are mostly visible in projects that make use of project
and types lint rules.
- [#​11750](https://redirect.github.com/biomejs/biome/pull/11750)
[`089bde0`](https://redirect.github.com/biomejs/biome/commit/089bde07e3849bd88ac24bf604ab0231672371b0)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`useStrictBooleanExpressions`](https://biomejs.dev/linter/rules/use-strict-boolean-expressions/),
which reports ambiguous truthiness checks such as `if (value)` when
`value` has type `number | undefined`. Non-nullable strings and numbers
and nullable objects are allowed; the rule has no options.
- [#​11494](https://redirect.github.com/biomejs/biome/pull/11494)
[`ad5b362`](https://redirect.github.com/biomejs/biome/commit/ad5b362fd17e488f50934306534cc2742b0cf84e)
Thanks [@​jp-knj](https://redirect.github.com/jp-knj)! - Added the
nursery rule
[`noAstroConflictingSetDirectives`](https://biomejs.dev/linter/rules/no-astro-conflicting-set-directives/),
which reports Astro elements with multiple content sources, such as
`set:html`, `set:text`, and child content.
For example, `<div set:html={html}>content</div>` triggers the rule.
- [#​11878](https://redirect.github.com/biomejs/biome/pull/11878)
[`84d1b3b`](https://redirect.github.com/biomejs/biome/commit/84d1b3b045e8acfef730b4e5010baad4b7725d8f)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11748](https://redirect.github.com/biomejs/biome/issues/11748):
[`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/)
now reports missing cases for values created with the mapping overload
of `Array.from`, including arrays imported from another module.
- [#​11802](https://redirect.github.com/biomejs/biome/pull/11802)
[`7d1f37e`](https://redirect.github.com/biomejs/biome/commit/7d1f37ec11a58e2d972329cf89b5d91758b06f6b)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Tailwind
classes will now be detected in Svelte, Vue, and Astro class attribute
expressions that don't use a class merging function.
- [#​11910](https://redirect.github.com/biomejs/biome/pull/11910)
[`9e50ea2`](https://redirect.github.com/biomejs/biome/commit/9e50ea2537c3d541f5b99dc3d4a6eb5120b1ba69)
Thanks [@​ematipico](https://redirect.github.com/ematipico)! -
Fixed
[#​11504](https://redirect.github.com/biomejs/biome/issues/11504),
a regression where Biome would silently ignore errors in the
configuration file. Now errors are correctly retained and checked before
executing any command.
- [#​11921](https://redirect.github.com/biomejs/biome/pull/11921)
[`d568632`](https://redirect.github.com/biomejs/biome/commit/d56863253fbed960b102f58e8fef475c22889301)
Thanks [@​hirehamir](https://redirect.github.com/hirehamir)! -
Fixed
[#​10846](https://redirect.github.com/biomejs/biome/issues/10846):
when plugins fail to load, Biome now prints each failing plugin's path
on its own line, instead of concatenating bare messages like `Cannot
read file.Cannot read file.`.
- [#​11930](https://redirect.github.com/biomejs/biome/pull/11930)
[`82ea5a6`](https://redirect.github.com/biomejs/biome/commit/82ea5a6175840bc2df0114c16fab0f6d6de06edd)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11927](https://redirect.github.com/biomejs/biome/issues/11927):
The HTML formatter no longer duplicates comments around Svelte blocks.
This affected a comment after a block such as `{#if}` or `{#each}` at
the end of an element, and a comment on the same line as the last
element inside a block, before `{:else}`, `{/if}`, or a similar tag.
- [#​11931](https://redirect.github.com/biomejs/biome/pull/11931)
[`0cc46d8`](https://redirect.github.com/biomejs/biome/commit/0cc46d8d7c300452159fa65546d1b576efadd605)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed the
indentation of comments at the end of a Svelte block's contents. A
comment before `{:else}`, `{:then}`, `{/if}`, or a similar tag is now
indented with the block's contents instead of with the tag.
```diff
{#if condition}
<span>Text</span>
-<!-- comment -->
+ <!-- comment -->
{/if}
```
- [#​12031](https://redirect.github.com/biomejs/biome/pull/12031)
[`ef0edd4`](https://redirect.github.com/biomejs/biome/commit/ef0edd4a2fe3eaf29b2c52d5c9eb0c67f85e2ab5)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​12027](https://redirect.github.com/biomejs/biome/issues/12027):
Biome's test rules no longer mistake regular method calls named `test`,
`it`, or `describe` for tests. For example,
[`useValidTestTitle`](https://biomejs.dev/linter/rules/use-valid-test-title/)
used to report the following regular expression check as a test with an
invalid title:
```js
const isComment = /^\s*#/.test(line);
```
- [#​11959](https://redirect.github.com/biomejs/biome/pull/11959)
[`8477e61`](https://redirect.github.com/biomejs/biome/commit/8477e610a8ba787234ee2d21efc05680a72beec2)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11950](https://redirect.github.com/biomejs/biome/issues/11950):
[`noUnusedVariables`](https://biomejs.dev/linter/rules/no-unused-variables/)
now reports arrow functions with expression bodies that only reference
themselves, such as `let h = () => h();`.
- [#​11915](https://redirect.github.com/biomejs/biome/pull/11915)
[`3260602`](https://redirect.github.com/biomejs/biome/commit/3260602e03dd44b79afbd36ec77a71a1e87b7ed7)
Thanks [@​ematipico](https://redirect.github.com/ematipico)! -
Fixed
[#​11841](https://redirect.github.com/biomejs/biome/issues/11841),
where suppression comments had no effect on some parts of HTML-ish files
and on snippets embedded in JavaScript files.
Now the following suppression works as expected:
```vue
<!-- biome-ignore lint/correctness/noUndeclaredVariables: intentionally
external -->
<div :title="missingValue"></div>
```
- [#​11952](https://redirect.github.com/biomejs/biome/pull/11952)
[`b51040e`](https://redirect.github.com/biomejs/biome/commit/b51040ee3ab66880c925298977229294248dc636)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11951](https://redirect.github.com/biomejs/biome/issues/11951):
the GritQL formatter no longer inserts a space after a `within` pattern
without an `until` clause.
```diff
-$arg <: within `bar($_)` ,
+$arg <: within `bar($_)`,
```
- [#​11794](https://redirect.github.com/biomejs/biome/pull/11794)
[`429cf95`](https://redirect.github.com/biomejs/biome/commit/429cf950d29cfa852dfcbcdd9fdb219b2a01af9b)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`noTailwindRawColors`](https://biomejs.dev/linter/rules/no-tailwind-raw-colors/)
for JavaScript and HTML. It disallows Tailwind palette colors such as
`bg-pink-500` and `text-white`, encouraging design system color
utilities such as `bg-primary`.
- [#​11837](https://redirect.github.com/biomejs/biome/pull/11837)
[`f5e249b`](https://redirect.github.com/biomejs/biome/commit/f5e249b27d2ddf21f92fdd3a531adfd6c411c633)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11836](https://redirect.github.com/biomejs/biome/issues/11836):
`biome check --write` no longer adds invalid parentheses around Svelte
`{@const}` declarations when experimental HTML support and formatting
are enabled.
- [#​11978](https://redirect.github.com/biomejs/biome/pull/11978)
[`8be0b9e`](https://redirect.github.com/biomejs/biome/commit/8be0b9ed7617ccc53fd2554fb42c855b222b5a43)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11817](https://redirect.github.com/biomejs/biome/issues/11817):
Biome no longer crashes when its output is piped to a program that exits
early, such as `head`. Output to the closed pipe is now discarded and
Biome exits normally.
- [#​11868](https://redirect.github.com/biomejs/biome/pull/11868)
[`3841c26`](https://redirect.github.com/biomejs/biome/commit/3841c26f45fa13998f6201921ee5ccd0b0063fb7)
Thanks [@​ematipico](https://redirect.github.com/ematipico)! -
Fixed
[#​8986](https://redirect.github.com/biomejs/biome/issues/8986):
Biome's language server now scopes all watched-file patterns to each
workspace folder, falling back to the deprecated `rootUri` when no
workspace folders are provided. Clients without relative-pattern support
receive compatible absolute glob patterns.
- [#​11928](https://redirect.github.com/biomejs/biome/pull/11928)
[`0015681`](https://redirect.github.com/biomejs/biome/commit/001568183912d1a14bd22d0d20a46e7c7f6bcbb5)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Restricted
access to the Unix daemon socket to the user running Biome. The socket
now lives in a `biome-daemon` directory inside Biome's cache directory
that only this user can access, and the socket itself has mode `0600`.
- [#​11835](https://redirect.github.com/biomejs/biome/pull/11835)
[`589ca1a`](https://redirect.github.com/biomejs/biome/commit/589ca1a0dd9f93a3ef3f3dac98d01720ae78bdcf)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Updated
[`useReactCompiler`](https://biomejs.dev/linter/rules/use-react-compiler/):
Biome now reports React Compiler diagnostics regardless of the React
version declared in `package.json`.
- [#​11907](https://redirect.github.com/biomejs/biome/pull/11907)
[`b7d9037`](https://redirect.github.com/biomejs/biome/commit/b7d903781c7968517675de39d3f086184d83faf7)
Thanks [@​posido](https://redirect.github.com/posido)! - Fixed
[withastro/compiler-rs#194](https://redirect.github.com/withastro/compiler-rs/issues/194):
the HTML parser no longer treats a regex literal that starts with `>` as
the end of a self-closing tag. Astro frontmatter such as `const escaped
= s.replace(/>/g, ">");` no longer swallows the closing `---` fence,
and the same regex inside a template expression no longer runs past its
closing `}`. A regex literal after a keyword such as `return`, as in
`return />'/.test(s)`, is now recognized too.
- [#​12021](https://redirect.github.com/biomejs/biome/pull/12021)
[`59cc595`](https://redirect.github.com/biomejs/biome/commit/59cc595c62882861ac1b1d166da155762a826abb)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Type
inference performance has been significantly improved. Some popular
libraries like Zod, Valibot, Arktype, Effect, Kysely, and Drizzle have
gained a \~2-240x speedup in our benchmarks. This improvement affects
all rules that use type information.
- [#​12044](https://redirect.github.com/biomejs/biome/pull/12044)
[`c73fb91`](https://redirect.github.com/biomejs/biome/commit/c73fb915eb80f843cf6b2ff7f68f8ad3850be1b4)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​12042](https://redirect.github.com/biomejs/biome/issues/12042):
the HTML formatter no longer removes the space between text and an
inline element on the next line when it joins the lines.
```diff
- <p>a <em>b</em> c<u>d</u></p>
+ <p>a <em>b</em> c <u>d</u></p>
```
- [#​11965](https://redirect.github.com/biomejs/biome/pull/11965)
[`f90bf38`](https://redirect.github.com/biomejs/biome/commit/f90bf384bd4d4237e74618e48704933915fa8a78)
Thanks [@​ematipico](https://redirect.github.com/ematipico)! -
Fixed module resolution in long-running workspaces so imports reflect
package manifest and TypeScript path-mapping changes without requiring
the importing file to be edited.
- [#​11860](https://redirect.github.com/biomejs/biome/pull/11860)
[`0884e29`](https://redirect.github.com/biomejs/biome/commit/0884e294b47a3486bbaf190792aecd095443d664)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Removed the
`attributes` and `functions` options from the nursery rule
[`noTailwindArbitraryValue`](https://biomejs.dev/linter/rules/no-tailwind-arbitrary-value/).
The rule now uses the same Tailwind detection as
[`useTailwindShorthandClasses`](https://biomejs.dev/linter/rules/use-tailwind-shorthand-classes/).
- [#​11969](https://redirect.github.com/biomejs/biome/pull/11969)
[`865cd30`](https://redirect.github.com/biomejs/biome/commit/865cd30770b8e3060b7a5fdbcc09a44d25ed15d5)
Thanks [@​AlbinoGeek](https://redirect.github.com/AlbinoGeek)! -
Fixed
[#​11962](https://redirect.github.com/biomejs/biome/issues/11962):
[`noUnknownTypeSelector`](https://biomejs.dev/linter/rules/no-unknown-type-selector/)
no longer reports view transition names inside view transition
pseudo-elements, such as `page` in `::view-transition-group(page)`.
- [#​11914](https://redirect.github.com/biomejs/biome/pull/11914)
[`06ff47b`](https://redirect.github.com/biomejs/biome/commit/06ff47b16dee1dd3c0a7768b390074055d6d4afc)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11897](https://redirect.github.com/biomejs/biome/issues/11897):
the safe fix for
[`noUselessStringConcat`](https://biomejs.dev/linter/rules/no-useless-string-concat/)
now escapes embedded double quotes when combining literals, preserving
valid JavaScript and existing escape sequences.
- [#​11997](https://redirect.github.com/biomejs/biome/pull/11997)
[`af7825f`](https://redirect.github.com/biomejs/biome/commit/af7825fd24783f4a41ed845b44dca5ce36ae59f8)
Thanks
[@​github-actions](https://redirect.github.com/apps/github-actions)!
- The
[noRestrictedDependencies](https://biomejs.dev/linter/rules/no-restricted-dependencies/)
rule has been updated with new module replacement data, it should now
detect for more relevant replacements.
- [#​11827](https://redirect.github.com/biomejs/biome/pull/11827)
[`31bb662`](https://redirect.github.com/biomejs/biome/commit/31bb6627e5c54c6840e51eb61c0aec9f0da6113e)
Thanks
[@​dfedoryshchev](https://redirect.github.com/dfedoryshchev)! -
Fixed
[#​11566](https://redirect.github.com/biomejs/biome/issues/11566):
[`useNamingConvention`](https://biomejs.dev/linter/rules/use-naming-convention/)
no longer reports a `namespace` declared inside `declare global` or
inside an external module declaration. Both positions are documented as
always ignored, and the rule offered a safe fix, so `biome check
--write` renamed the declaration:
```ts
export {}
declare global {
// no longer renamed to `Jsx`
namespace JSX {}
}
```
- [#​11814](https://redirect.github.com/biomejs/biome/pull/11814)
[`23ba25f`](https://redirect.github.com/biomejs/biome/commit/23ba25f191eb8ff91114f6b44bdb81cab5d6900e)
Thanks [@​siketyan](https://redirect.github.com/siketyan)! - Fixed
type inference through generic type aliases that instantiate another
generic type with a nested generic argument, such as `type Nested<T> =
Box<Wrapper<T>>`. Type-aware rules now resolve members of such types:
```ts
declare const nested: Nested<number>;
// noUnnecessaryConditions now reports that `??` is unnecessary.
const inner = nested.value.inner ?? 1;
```
- [#​11908](https://redirect.github.com/biomejs/biome/pull/11908)
[`dd5a5ce`](https://redirect.github.com/biomejs/biome/commit/dd5a5cedf0e5bfdce8af0cd4f2b250a9f82848a4)
Thanks [@​siketyan](https://redirect.github.com/siketyan)! - Fixed
[#​11880](https://redirect.github.com/biomejs/biome/issues/11880):
Biome no longer misparses a `<<` expression followed by a later `>>>` as
TypeScript type arguments. For example, `const mask = 1 << bits`
followed by `const m = mask >>> 0` on the next line now parses
correctly.
- [#​11882](https://redirect.github.com/biomejs/biome/pull/11882)
[`28c817d`](https://redirect.github.com/biomejs/biome/commit/28c817d16375bd451d29d1b18c2cf4419cf22ef8)
Thanks [@​mikehasa](https://redirect.github.com/mikehasa)! - Fixed
a bug in
[`noOctalEscape`](https://biomejs.dev/linter/rules/no-octal-escape/)
where the safe fix could silently change a string's value. A legacy
octal escape is at most two digits when the leading digit is `4`-`7`, so
`"\751"` is `"\75"` + `"1"` (i.e. `"=1"`) but was rewritten to the
single character `ǩ`; it is now rewritten to `"\x3d1"`.
- [#​11861](https://redirect.github.com/biomejs/biome/pull/11861)
[`81b0adb`](https://redirect.github.com/biomejs/biome/commit/81b0adb8dc80a99bddc47f80cae61edfecdda214)
Thanks [@​Netail](https://redirect.github.com/Netail)! - Added the
new nursery rule
[`noSelfImport`](https://biomejs.dev/linter/rules/no-self-import/),
which forbids a module from importing itself.
```js
// foo.js
import foo from "./foo.js";
```
- [#​12041](https://redirect.github.com/biomejs/biome/pull/12041)
[`5e14509`](https://redirect.github.com/biomejs/biome/commit/5e1450901a405d1d62d1716789996e301ab5de22)
Thanks [@​ematipico](https://redirect.github.com/ematipico)! -
Fixed a stack overflow in type-aware lint rules, such as
[`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/)
and
[`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/),
when generic types in files that import each other reference one another
in their type parameters.
```ts
// entity.ts
import type { Repository } from "./repository";
export interface Entity<R extends Repository<any> = Repository<any>> {}
// repository.ts
import type { Entity } from "./entity";
export interface Repository<E extends Entity<any> = Entity<any>> {}
```
- [#​11838](https://redirect.github.com/biomejs/biome/pull/11838)
[`9bbff0c`](https://redirect.github.com/biomejs/biome/commit/9bbff0cdf3a5268db87a0d378dd9ffaaf04a3595)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`usePromiseRejectErrors`](https://biomejs.dev/linter/rules/use-promise-reject-errors/),
which requires Error objects as Promise rejection reasons.
```js
Promise.reject("Request failed");
new Promise((resolve, reject) => reject(42));
```
- [#​11917](https://redirect.github.com/biomejs/biome/pull/11917)
[`717db8c`](https://redirect.github.com/biomejs/biome/commit/717db8c25737bacd0456c17bef9dda66f3c082c5)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Added the
nursery rule
[`noMisplacedListElements`](https://biomejs.dev/linter/rules/no-misplaced-list-elements/)
for HTML and JSX, which requires `<li>` elements with an HTML element
parent to be children of `<ul>`, `<ol>`, or `<menu>`. For example,
`<div><li>Item</li></div>` is invalid.
- [#​11919](https://redirect.github.com/biomejs/biome/pull/11919)
[`8d0b990`](https://redirect.github.com/biomejs/biome/commit/8d0b990cb3dbb95354839e61561df8c14b86a273)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11899](https://redirect.github.com/biomejs/biome/issues/11899):
disabling a domain no longer disables rules that also belong to another
enabled domain. For example, with `"domains": { "react": "all", "next":
"none" }`,
[`useExhaustiveDependencies`](https://biomejs.dev/linter/rules/use-exhaustive-dependencies/)
and
[`useHookAtTopLevel`](https://biomejs.dev/linter/rules/use-hook-at-top-level/)
are now enabled.
Rules enabled explicitly in the configuration also stay enabled when one
of their domains is set to `"none"`.
- [#​11814](https://redirect.github.com/biomejs/biome/pull/11814)
[`23ba25f`](https://redirect.github.com/biomejs/biome/commit/23ba25f191eb8ff91114f6b44bdb81cab5d6900e)
Thanks [@​siketyan](https://redirect.github.com/siketyan)! - Fixed
[#​11810](https://redirect.github.com/biomejs/biome/issues/11810)
and
[#​11813](https://redirect.github.com/biomejs/biome/issues/11813):
type-aware rules such as
[`noUnnecessaryConditions`](https://biomejs.dev/linter/rules/no-unnecessary-conditions/)
and
[`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/)
no longer take several seconds when a member is accessed on a recursive
generic type alias, such as react-hook-form's `FieldPathValue` or
zustand's `Mutate`.
- [#​11983](https://redirect.github.com/biomejs/biome/pull/11983)
[`cc39794`](https://redirect.github.com/biomejs/biome/commit/cc3979413d3ab043f29764ba4502f7e20b460928)
Thanks [@​AlbinoGeek](https://redirect.github.com/AlbinoGeek)! -
Fixed
[#​11939](https://redirect.github.com/biomejs/biome/issues/11939):
the fix of
[`useRegexLiterals`](https://biomejs.dev/linter/rules/use-regex-literals/)
no longer escapes a slash that is already escaped. `new RegExp("\\/")`
is now fixed to `/\//` instead of the invalid `/\\//`.
- [#​11869](https://redirect.github.com/biomejs/biome/pull/11869)
[`3a21c80`](https://redirect.github.com/biomejs/biome/commit/3a21c80bd00808685b88e03f477114d9f2a96251)
Thanks [@​ematipico](https://redirect.github.com/ematipico)! -
Fixed [`#9105`](https://redirect.github.com/biomejs/biome/issues/9105):
`vcs.useIgnoreFile` now evaluates parent directory patterns when
matching child paths, preserving re-included directories such as `!/src`
while ignoring their excluded siblings.
- [#​11875](https://redirect.github.com/biomejs/biome/pull/11875)
[`2cdd220`](https://redirect.github.com/biomejs/biome/commit/2cdd220cd8fc1303d045241d50d6ed33aa3213c2)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11867](https://redirect.github.com/biomejs/biome/issues/11867):
[`noUndeclaredVariables`](https://biomejs.dev/linter/rules/no-undeclared-variables/)
incorrectly reported Vue slot props declared with `v-slot` or its `#`
shorthand, including destructured props.
- [#​12021](https://redirect.github.com/biomejs/biome/pull/12021)
[`59cc595`](https://redirect.github.com/biomejs/biome/commit/59cc595c62882861ac1b1d166da155762a826abb)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Type
inference accuracy has been improved significantly. More global types,
like `Array`, `Map`, `Set`, etc., are now fully defined. This should
decrease false positives on all typed rules, since less types will be
unknown.
- [#​11929](https://redirect.github.com/biomejs/biome/pull/11929)
[`aef690d`](https://redirect.github.com/biomejs/biome/commit/aef690d673e657c6f783127cdf572175c7165f0e)
Thanks [@​Th3S4mur41](https://redirect.github.com/Th3S4mur41)! -
Fixed
[`noUnknownProperty`](https://biomejs.dev/linter/rules/no-unknown-property/)
to recognize the `frame-sizing` CSS property.
- [#​12022](https://redirect.github.com/biomejs/biome/pull/12022)
[`6233eb2`](https://redirect.github.com/biomejs/biome/commit/6233eb2ad0a5e8e920e21123475fd137e3ab24b7)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​12020](https://redirect.github.com/biomejs/biome/issues/12020):
the HTML parser now reports an error for a mismatched closing tag like
the `</span>` in `<p>two</span></p>`. Previously, it accepted `</span>`
as the end of `<p>` because `span` contains the letter `p`, and the
formatter deleted everything after it. HTML tag names are matched
case-insensitively, so `<DIV></div>` is no longer reported as
mismatched.
A closing tag with no opening tag at the top level of a file, like the
second `</p>` in `<p>a</p></p><p>b</p>`, is now also reported as an
error, instead of the formatter deleting it and everything after it.
- [#​12037](https://redirect.github.com/biomejs/biome/pull/12037)
[`48cdbb8`](https://redirect.github.com/biomejs/biome/commit/48cdbb86486cd21959352e945103d5fa0a3a746f)
Thanks [@​ff1451](https://redirect.github.com/ff1451)! - Fixed
[#​11898](https://redirect.github.com/biomejs/biome/issues/11898):
[`noUselessReturn`](https://biomejs.dev/linter/rules/no-useless-return/)
no longer offers a safe fix for a `return;` that is the body of an
unbraced `if`, `else`, or label, because removing it produced invalid
code. The safe fix now also keeps comments placed before or after the
removed `return;`.
```js
function foo() {
// Still reported, but the return is no longer removed
if (aborted) return;
}
```
- [#​12030](https://redirect.github.com/biomejs/biome/pull/12030)
[`4ff83dd`](https://redirect.github.com/biomejs/biome/commit/4ff83dd3ed3f265c9ae1e0c41e7a655511f1b264)
Thanks [@​ematipico](https://redirect.github.com/ematipico)! -
Fixed
[#​9155](https://redirect.github.com/biomejs/biome/issues/9155):
Biome no longer reports a parse error for typed slot props in Vue files,
such as `v-slot="{ value }: { value: ValueType }"`. Types used in slot
props annotations are now correctly detected as used by
[`noUnusedVariables`](https://biomejs.dev/linter/rules/no-unused-variables/).
- [#​11955](https://redirect.github.com/biomejs/biome/pull/11955)
[`088164f`](https://redirect.github.com/biomejs/biome/commit/088164f398f5edcf4c1c763514d4916d46c37119)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11946](https://redirect.github.com/biomejs/biome/issues/11946):
[`noUnreachable`](https://biomejs.dev/linter/rules/no-unreachable/) and
[`useGetterReturn`](https://biomejs.dev/linter/rules/use-getter-return/)
now recognize `while` and `do...while` loops with truthy literal
conditions as infinite unless control flow exits the loop.
- [#​11958](https://redirect.github.com/biomejs/biome/pull/11958)
[`6964bfc`](https://redirect.github.com/biomejs/biome/commit/6964bfc8a13c4bceed358da57d17f4ff4a728d8c)
Thanks [@​erenbati](https://redirect.github.com/erenbati)! - Fixed
[#​11924](https://redirect.github.com/biomejs/biome/issues/11924):
[`noFocusedTests`](https://biomejs.dev/linter/rules/no-focused-tests/)
no longer reports chained method calls such as
`builder.image(url).fit("max")` as focused tests.
- [#​11908](https://redirect.github.com/biomejs/biome/pull/11908)
[`dd5a5ce`](https://redirect.github.com/biomejs/biome/commit/dd5a5cedf0e5bfdce8af0cd4f2b250a9f82848a4)
Thanks [@​siketyan](https://redirect.github.com/siketyan)! - Fixed
parsing of left shifts between TypeScript instantiation expressions.
Biome now parses `f<T> << f<T>` as a left shift of two instantiation
expressions, matching TypeScript, instead of reporting a parse error.
- [#​11877](https://redirect.github.com/biomejs/biome/pull/11877)
[`5a53b2c`](https://redirect.github.com/biomejs/biome/commit/5a53b2c87191ea531f6c426dc5e166241b6db621)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11278](https://redirect.github.com/biomejs/biome/issues/11278):
[`noUnnecessaryConditions`](https://biomejs.dev/linter/rules/no-unnecessary-conditions/)
no longer incorrectly reports optional chaining on `RegExp.exec()`
results, including patterns created with `new RegExp()`. Biome now
infers the nullable `RegExpExecArray | null` return type, preserving
necessary checks such as `new RegExp(pattern).exec(input)?.[1]`.
- [#​11906](https://redirect.github.com/biomejs/biome/pull/11906)
[`b87822d`](https://redirect.github.com/biomejs/biome/commit/b87822d8b92d96fe226dc582b309a609a0c82974)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
[#​11900](https://redirect.github.com/biomejs/biome/issues/11900):
[`useForOf`](https://biomejs.dev/linter/rules/use-for-of/) no longer
reports loops that update their index inside the body, including `i +=
1` and `argv[++i]`.
- [#​11834](https://redirect.github.com/biomejs/biome/pull/11834)
[`f89dd4f`](https://redirect.github.com/biomejs/biome/commit/f89dd4f2d52e4919133429fa4550912510517a9a)
Thanks [@​dyc3](https://redirect.github.com/dyc3)! - Fixed
incorrect type inference when generic parameters are reused across
inherited types or swapped in recursive types.
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- 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.
---
- [ ] <!-- 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/CodeForBreakfast/commy).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>1 parent 7d26db4 commit 64393af
2 files changed
Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments