Vai al contenuto
verdict:

Biome 2.4.15

digest

note: la sintesi e le note di rilascio sono in inglese

note: nessuna sintesi per questa release digest

Le release digest sono elencate senza una sintesi. Le note di rilascio originali di questa versione sono qui sotto.

release-notesgithub.com/biomejs/biome · 197 righe
  1. ## 2.4.15
  2. ### Patch Changes
  3. - [#9394](https://github.com/biomejs/biome/pull/9394) [`ba3480e`](https://github.com/biomejs/biome/commit/ba3480e62da6ac7f0f9d99126f1459a72306368b) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useTestHooksInOrder`](https://biomejs.dev/linter/rules/use-test-hooks-in-order) in the `test` domain. The rule enforces that Jest/Vitest lifecycle hooks (`beforeAll`, `beforeEach`, `afterEach`, `afterAll`) are declared in the order they execute, making test setup and teardown easier to reason about.
  4. - [#10254](https://github.com/biomejs/biome/pull/10254) [`e0a54cc`](https://github.com/biomejs/biome/commit/e0a54ccc0a0c892fff2270ae772bcecf0d34e79a) Thanks [@dyc3](https://github.com/dyc3)! - Added a new nursery rule [`useVueNextTickPromise`](https://biomejs.dev/linter/rules/use-vue-next-tick-promise/), which enforces Promise syntax when using Vue `nextTick`.
  5. For example, the following snippet triggers the rule:
  6. ```js
  7. import { nextTick } from "vue";
  8. nextTick(() => {
  9. updateDom();
  10. });
  11. ```
  12. - [#10219](https://github.com/biomejs/biome/pull/10219) [`64aee45`](https://github.com/biomejs/biome/commit/64aee454ac2db2ade31089c1438dd761c94a8d57) Thanks [@dyc3](https://github.com/dyc3)! - Added a new nursery rule [`noVueVOnNumberValues`](https://biomejs.dev/linter/rules/no-vue-v-on-number-values/), that disallows deprecated number modifiers on Vue `v-on` directives.
  13. For example, the following snippet triggers the rule:
  14. ```vue
  15. <input @keyup.13="submit" />
  16. ```
  17. - [#10195](https://github.com/biomejs/biome/pull/10195) [`7b8d4e1`](https://github.com/biomejs/biome/commit/7b8d4e161a225f14bc9e070e04cc8572ee988bb2) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useVueValidVFor`](https://biomejs.dev/linter/rules/use-vue-valid-v-for/), which validates Vue `v-for` directives and reports invalid aliases, missing component keys, and keys that do not use iteration variables.
  18. - [#10238](https://github.com/biomejs/biome/pull/10238) [`1110256`](https://github.com/biomejs/biome/commit/1110256c6d60500ebc05b9d2738fe77345c7ffd6) Thanks [@dyc3](https://github.com/dyc3)! - Added the recommended nursery rule [`noVueImportCompilerMacros`](https://biomejs.dev/linter/rules/no-vue-import-compiler-macros/), which disallows importing Vue compiler macros such as `defineProps` from `vue` because they are automatically available.
  19. - [#10201](https://github.com/biomejs/biome/pull/10201) [`1a08f89`](https://github.com/biomejs/biome/commit/1a08f89df55eafe1d8463696d1be53f8dea90a80) Thanks [@realknove](https://github.com/realknove)! - Fixed [#10193](https://github.com/biomejs/biome/issues/10193): `style/useReadonlyClassProperties` no longer reports class properties as readonly-able when they are assigned inside arrow callbacks nested in class property initializers.
  20. - [#9574](https://github.com/biomejs/biome/pull/9574) [`3bd2b6a`](https://github.com/biomejs/biome/commit/3bd2b6adf0be44eda922ad7610781dd2e387bdb6) Thanks [@Conaclos](https://github.com/Conaclos)! - Fixed [#9530](https://github.com/biomejs/biome/issues/9530). The diagnostics of [`organizeImports`](https://biomejs.dev/assist/actions/organize-imports/) are now more detailed and more precise. They are also better at localizing where the issue is.
  21. - [#10205](https://github.com/biomejs/biome/pull/10205) [`a704a6c`](https://github.com/biomejs/biome/commit/a704a6c40392e71aad5127ab35c771486116937e) Thanks [@Conaclos](https://github.com/Conaclos)! - Fixed [#10185](https://github.com/biomejs/biome/issues/10185). [`organizeImports](https://biomejs.dev/assist/actions/organize-imports/) now errors when it encounters an unknown predefined group.
  22. The following configuration is now reported as invalid because `:INEXISTENT:` is an unknown predefined group.
  23. ```json
  24. {
  25. "assist": {
  26. "actions": {
  27. "source": {
  28. "organizeImports": { "options": { "groups": [":INEXISTENT:"] } }
  29. }
  30. }
  31. }
  32. }
  33. ```
  34. - [#10052](https://github.com/biomejs/biome/pull/10052) [`b565bed`](https://github.com/biomejs/biome/commit/b565bedf53bd241bfef57883439d6a60a19b43c5) Thanks [@minseong0324](https://github.com/minseong0324)! - Improved [`noMisleadingReturnType`](https://biomejs.dev/linter/rules/no-misleading-return-type/): it now flags union annotations whose extra variants are never returned, and suggests the narrower type (e.g. `string | null` → `string`).
  35. These functions are now reported because `null` and `number` are included in the return annotations but never returned:
  36. ```ts
  37. function getUser(): string | null {
  38. return "hello";
  39. } // null is never returned
  40. function getCode(): string | number {
  41. return "hello";
  42. } // number is never returned
  43. ```
  44. - [#10213](https://github.com/biomejs/biome/pull/10213) [`ac30057`](https://github.com/biomejs/biome/commit/ac30057415302e74003d428e96983433441e84dc) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#9450](https://github.com/biomejs/biome/issues/9450): HTML and Vue element formatting now preserves child line breaks when an element contains another element child on its own line, instead of collapsing the child element onto the same line.
  45. - [#10275](https://github.com/biomejs/biome/pull/10275) [`9ee6c03`](https://github.com/biomejs/biome/commit/9ee6c03203581639b564b6c7f81b3e5a2febea58) Thanks [@solithcy](https://github.com/solithcy)! - Fixed [#10274](https://github.com/biomejs/biome/issues/10274): Svelte templates with missing expressions no longer parsed as `HtmlBogusElement`
  46. - [#10143](https://github.com/biomejs/biome/pull/10143) [`56798a7`](https://github.com/biomejs/biome/commit/56798a76b9e7f57caf070acd51734beb61904d9d) Thanks [@minseong0324](https://github.com/minseong0324)! - [`noMisleadingReturnType`](https://biomejs.dev/linter/rules/no-misleading-return-type/) now detects misleading return type annotations when object literal properties are initialized with `as const`.
  47. This function is now reported because the return annotation widens a property initialized with `as const`:
  48. ```ts
  49. function f(): { value: string } {
  50. return { value: "text" as const };
  51. }
  52. ```
  53. - [#10143](https://github.com/biomejs/biome/pull/10143) [`56798a7`](https://github.com/biomejs/biome/commit/56798a76b9e7f57caf070acd51734beb61904d9d) Thanks [@minseong0324](https://github.com/minseong0324)! - [`noUselessTypeConversion`](https://biomejs.dev/linter/rules/no-useless-type-conversion/) now detects redundant conversions on object literal properties initialized with `as const`.
  54. This conversion is now reported because `message.value` is inferred as a string literal:
  55. ```ts
  56. const message = { value: "text" as const };
  57. String(message.value);
  58. ```
  59. - [#9807](https://github.com/biomejs/biome/pull/9807) [`0ae5840`](https://github.com/biomejs/biome/commit/0ae58406b4752f296adfccf94b1d2a042c4cddc7) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useThisInClassMethods`](https://biomejs.dev/linter/rules/use-this-in-class-methods/), based on ESLint's `class-methods-use-this`.
  60. The rule now reports instance methods, getters, setters, and function-valued instance fields that do not use `this`, and `biome migrate eslint` preserves the supported `ignoreMethods`, `ignoreOverrideMethods`, and `ignoreClassesWithImplements` options.
  61. **Invalid**:
  62. ```js
  63. class Foo {
  64. bar() {
  65. // does not use `this`, invalid
  66. console.log("Hello Biome");
  67. }
  68. }
  69. ```
  70. - [#10258](https://github.com/biomejs/biome/pull/10258) [`e7b18f7`](https://github.com/biomejs/biome/commit/e7b18f759d82291a3f280ea616b3028fa716cba5) Thanks [@ematipico](https://github.com/ematipico)! - Improved linter performance by narrowing the query nodes for several lint rules, reducing how often they are evaluated.
  71. - [#10273](https://github.com/biomejs/biome/pull/10273) [`04e22a1`](https://github.com/biomejs/biome/commit/04e22a10e7446178a80cf3c0c614dc512d894e9d) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#10271](https://github.com/biomejs/biome/issues/10271): The HTML parser now correctly parses `of` as text content when in text contexts.
  72. - [#9838](https://github.com/biomejs/biome/pull/9838) [`83f7385`](https://github.com/biomejs/biome/commit/83f7385f14d68704510ea4c028cfa20317698fc0) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noBaseToString`](https://biomejs.dev/linter/rules/no-base-to-string/), which reports stringification sites that fall back to Object's default `"[object Object]"` formatting. The rule also supports the `ignoredTypeNames` option.
  73. - [#10143](https://github.com/biomejs/biome/pull/10143) [`56798a7`](https://github.com/biomejs/biome/commit/56798a76b9e7f57caf070acd51734beb61904d9d) Thanks [@minseong0324](https://github.com/minseong0324)! - [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) now checks switch statements over object literal properties initialized with `as const`.
  74. This switch is now reported because `status.kind` is inferred as the string literal `"ready"` but no case handles it:
  75. ```ts
  76. const status = { kind: "ready" as const };
  77. switch (status.kind) {
  78. }
  79. ```
  80. - [#10143](https://github.com/biomejs/biome/pull/10143) [`56798a7`](https://github.com/biomejs/biome/commit/56798a76b9e7f57caf070acd51734beb61904d9d) Thanks [@minseong0324](https://github.com/minseong0324)! - [`useStringStartsEndsWith`](https://biomejs.dev/linter/rules/use-string-starts-ends-with/) now detects string index comparisons on object literal properties initialized with `as const`.
  81. This comparison is now reported because `message.value` is inferred as a string literal:
  82. ```ts
  83. const message = { value: "hello" as const };
  84. message.value[0] === "h";
  85. ```
  86. ## What's Changed
  87. * fix(markdown_parser): parse indented reference continuation by @jfmcdowell in https://github.com/biomejs/biome/pull/10192
  88. * fix(markdown_parser): parse quoted ordered list interrupts by @jfmcdowell in https://github.com/biomejs/biome/pull/10194
  89. * docs: fix typo in CONTRIBUTING ("the these" -> "these") by @dfedoryshchev in https://github.com/biomejs/biome/pull/10203
  90. * feat(css_formatter): improve SCSS `@each` rule formatting by @denbezrukov in https://github.com/biomejs/biome/pull/10202
  91. * test(markdown_parser): cover quoted ordered sublist by @jfmcdowell in https://github.com/biomejs/biome/pull/10197
  92. * fix(markdown_parser): keep loose lazy continuation by @jfmcdowell in https://github.com/biomejs/biome/pull/10198
  93. * fix(organizeImports): error on unknown predefined groups by @Conaclos in https://github.com/biomejs/biome/pull/10205
  94. * feat(css_formatter): improve SCSS map formatting for parenthesized list keys by @denbezrukov in https://github.com/biomejs/biome/pull/10207
  95. * feat(css_parser): parse scss interpolated nth arguments by @denbezrukov in https://github.com/biomejs/biome/pull/10209
  96. * fix(format/html): preserve multiline element-only children by @dyc3 in https://github.com/biomejs/biome/pull/10213
  97. * test(css_parser): cover SCSS interpolated operator operands by @denbezrukov in https://github.com/biomejs/biome/pull/10214
  98. * fix: collect readonly class property arrow writes by @realknove in https://github.com/biomejs/biome/pull/10201
  99. * fix(css_parser): parse spaced SCSS function heads by context by @denbezrukov in https://github.com/biomejs/biome/pull/10215
  100. * feat(css_formatter): improve SCSS map value and pair formatting for better readability by @denbezrukov in https://github.com/biomejs/biome/pull/10216
  101. * feat(css_formatter): enhance SCSS map value formatting by @denbezrukov in https://github.com/biomejs/biome/pull/10217
  102. * feat(css_formatter): improve formatting for parenthesized SCSS lists by @denbezrukov in https://github.com/biomejs/biome/pull/10218
  103. * fix(markdown_parser): keep empty reference paragraph by @jfmcdowell in https://github.com/biomejs/biome/pull/10199
  104. * fix(markdown_parser): diagnose backtick in fence info string by @jfmcdowell in https://github.com/biomejs/biome/pull/10224
  105. * chore(deps): update rust crate insta to 1.47.2 by @renovate[bot] in https://github.com/biomejs/biome/pull/10233
  106. * chore(deps): update pnpm to v10.33.2 by @renovate[bot] in https://github.com/biomejs/biome/pull/10231
  107. * chore(deps): update github-actions by @renovate[bot] in https://github.com/biomejs/biome/pull/10230
  108. * chore(deps): update dependency tombi to v0.10.1 by @renovate[bot] in https://github.com/biomejs/biome/pull/10227
  109. * chore(deps): update rust crate indexmap to 2.14.0 by @renovate[bot] in https://github.com/biomejs/biome/pull/10232
  110. * chore(deps): update rust docker tag to v1.95.0 by @renovate[bot] in https://github.com/biomejs/biome/pull/10225
  111. * feat(yaml_parser): lex YAML properties by @l0ngvh in https://github.com/biomejs/biome/pull/9471
  112. * feat(type-info): preserve object-literal as const properties by @minseong0324 in https://github.com/biomejs/biome/pull/10143
  113. * fix: fmt and clippy by @ematipico in https://github.com/biomejs/biome/pull/10235
  114. * feat(lint/html/vue): add `noVueVOnNumberValues` by @dyc3 in https://github.com/biomejs/biome/pull/10219
  115. * feat(lint/js): add `noBaseToString` by @dyc3 in https://github.com/biomejs/biome/pull/9838
  116. * fix(markdown_parser): preserve lazy emphasis and quoted thematic breaks by @jfmcdowell in https://github.com/biomejs/biome/pull/10228
  117. * feat(fmt/md): headers spacing by @ematipico in https://github.com/biomejs/biome/pull/10250
  118. * fix(lint): fix false negative in noMisleadingReturnType for union annotations by @minseong0324 in https://github.com/biomejs/biome/pull/10052
  119. * feat(fmt/md): proper word filling by @ematipico in https://github.com/biomejs/biome/pull/10252
  120. * feat(lint/js): add `useThisForClassMethods` by @dyc3 in https://github.com/biomejs/biome/pull/9807
  121. * feat(css_formatter): improve SCSS `@if` and `@else if` formatting by @denbezrukov in https://github.com/biomejs/biome/pull/10253
  122. * refactor(organizeImports): improve diagnostics by @Conaclos in https://github.com/biomejs/biome/pull/9574
  123. * refactor(markdown_parser): name CommonMark magic numbers by @jfmcdowell in https://github.com/biomejs/biome/pull/10264
  124. * fix: grammar in extends docstring by @Netail in https://github.com/biomejs/biome/pull/10263
  125. * feat(css_formatter): improve formatting for SCSS parenthesized expressions and include arguments by @denbezrukov in https://github.com/biomejs/biome/pull/10269
  126. * test(markdown_parser): promote html-only regression cases to .md fixtures by @jfmcdowell in https://github.com/biomejs/biome/pull/10255
  127. * fix: svelte missing expression parsing by @solithcy in https://github.com/biomejs/biome/pull/10275
  128. * fix(parse/html): treat `of` as text in text contexts by @dyc3 in https://github.com/biomejs/biome/pull/10273
  129. * chore: update rustix transient dep to fix ci by @dyc3 in https://github.com/biomejs/biome/pull/10279
  130. * feat(lint/vue): add `noVueImportCompilerMacros` by @dyc3 in https://github.com/biomejs/biome/pull/10238
  131. * feat(css_formatter): improve SCSS map formatting by @denbezrukov in https://github.com/biomejs/biome/pull/10282
  132. * feat(css_formatter): improve formatting SCSS function arguments with trailing commas by @denbezrukov in https://github.com/biomejs/biome/pull/10285
  133. * feat(lint/js/vue): add `useVueNextTickPromise` by @dyc3 in https://github.com/biomejs/biome/pull/10254
  134. * feat(yaml_parser): parse YAML properties by @l0ngvh in https://github.com/biomejs/biome/pull/10240
  135. * feat(lint/js): add `useTestHooksInOrder` by @dyc3 in https://github.com/biomejs/biome/pull/9394
  136. * perf: reduced queries in rules by @ematipico in https://github.com/biomejs/biome/pull/10258
  137. * fix(formatter): flush indentation after align end by @ematipico in https://github.com/biomejs/biome/pull/10293
  138. * test(formatter/yaml): populate Prettier tests for YAML by @siketyan in https://github.com/biomejs/biome/pull/8330
  139. * fix(fmt/md): remove trailing spaces in markdown lists by @ematipico in https://github.com/biomejs/biome/pull/10290
  140. * feat(css_parser): support SCSS string concatenation and improved interpolation handling in `url()` functions by @denbezrukov in https://github.com/biomejs/biome/pull/10294
  141. * chore(deps): revert update rust crate mimalloc to 0.1.50 by @dyc3 in https://github.com/biomejs/biome/pull/10298
  142. * chore: improve agent behaviour by @ematipico in https://github.com/biomejs/biome/pull/10303
  143. * perf(css): deduplicate rules information by @ematipico in https://github.com/biomejs/biome/pull/10292
  144. * feat(lint/html/vue): add `useVueValidVFor` by @dyc3 in https://github.com/biomejs/biome/pull/10195
  145. * feat(parse/tailwind): parse arbitrary values as css by @dyc3 in https://github.com/biomejs/biome/pull/10299
  146. * docs: fix duplicate-word typos in code comments by @dfedoryshchev in https://github.com/biomejs/biome/pull/10310
  147. * docs: replace "allows to" with "allows you to" in code comments and dev docs by @dfedoryshchev in https://github.com/biomejs/biome/pull/10311
  148. * ci: release by @github-actions[bot] in https://github.com/biomejs/biome/pull/10210
  149. ## New Contributors
  150. * @dfedoryshchev made their first contribution in https://github.com/biomejs/biome/pull/10203
  151. * @realknove made their first contribution in https://github.com/biomejs/biome/pull/10201
  152. **Full Changelog**: https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.14...@biomejs/biome@2.4.15

vedi su githubimported 2026-09-28 via npm