Vai al contenuto
verdict:

Biome 2.5.5

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 · 195 righe
  1. ## 2.5.5
  2. ### Patch Changes
  3. - [#10972](https://github.com/biomejs/biome/pull/10972) [`ab8c21b`](https://github.com/biomejs/biome/commit/ab8c21b35e81708276e4283a4a0ff86ea815e345) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) for unions of bigint literals. The rule now reports missing bigint cases and compares bigint literals by value, including binary, octal, hexadecimal, and separator-containing spellings. For example, this switch now reports the missing `2n` case:
  4. ```ts
  5. declare const value: 1n | 2n;
  6. switch (value) {
  7. case 1n:
  8. break;
  9. }
  10. ```
  11. - [#10972](https://github.com/biomejs/biome/pull/10972) [`ab8c21b`](https://github.com/biomejs/biome/commit/ab8c21b35e81708276e4283a4a0ff86ea815e345) Thanks [@ematipico](https://github.com/ematipico)! - Fixed false positives in [`noBaseToString`](https://biomejs.dev/linter/rules/no-base-to-string/) and [`useNullishCoalescing`](https://biomejs.dev/linter/rules/use-nullish-coalescing/) when member, stringification, or nullish inference cannot complete. These rules now suppress diagnostics instead of reporting from partial type information. For example, neither expression is reported when a recursive type cannot be fully resolved:
  12. ```ts
  13. type Recursive = Recursive;
  14. declare const value: Recursive;
  15. String(value);
  16. value || "fallback";
  17. ```
  18. - [#10977](https://github.com/biomejs/biome/pull/10977) [`0bf7486`](https://github.com/biomejs/biome/commit/0bf748653e488d0b959d39847641438cdb28188b) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [#10922](https://github.com/biomejs/biome/issues/10922): the action [`useSortedAttributes`](https://biomejs.dev/assist/actions/use-sorted-attributes/) no longer triggers for HTML instructions.
  19. - [#10957](https://github.com/biomejs/biome/pull/10957) [`cf263c4`](https://github.com/biomejs/biome/commit/cf263c4700e9f24115e541d1f142934a9b2d878f) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [`noThenProperty`](https://biomejs.dev/linter/rules/no-then-property/) failing to detect `Object.fromEntries`, `Object.defineProperty`, and `Reflect.defineProperty` calls with comments between their tokens.
  20. - [#10983](https://github.com/biomejs/biome/pull/10983) [`edc0ed7`](https://github.com/biomejs/biome/commit/edc0ed738ab8da3d512d527196684bd668090854) Thanks [@ayaangazali](https://github.com/ayaangazali)! - Fixed [#10980](https://github.com/biomejs/biome/issues/10980): [`useAriaPropsSupportedByRole`](https://biomejs.dev/linter/rules/use-aria-props-supported-by-role/) no longer reports false positives when the attribute that determines an element's implicit ARIA role is written as a shorthand attribute, such as `<a {href} aria-label="...">` in Astro and Svelte files.
  21. Shorthand attributes are now taken into account when computing the implicit role, so the anchor above correctly resolves to the `link` role instead of `generic`.
  22. - [#10889](https://github.com/biomejs/biome/pull/10889) [`89526e3`](https://github.com/biomejs/biome/commit/89526e3858c437408ec9ff192c35a866ad991d1b) Thanks [@denbezrukov](https://github.com/denbezrukov)! - Fixed CSS formatter casing for syntax-owned names while preserving author-defined names, including scoped keyframes and container scroll-state queries.
  23. ```diff
  24. - A:HOVER { COLOR: INITIAL; }
  25. + A:hover { color: initial; }
  26. - @KEYFRAMES :GLOBAL KeepFrames { FROM { COLOR: RED; } }
  27. + @keyframes :GLOBAL KeepFrames { from { color: RED; } }
  28. - @CONTAINER scroll-state((SCROLLED: TOP) AND (STUCK)) { A:HOVER { COLOR: RED; } }
  29. + @container scroll-state((SCROLLED: TOP) AND (STUCK)) { A:hover { color: RED; } }
  30. ```
  31. - [#10964](https://github.com/biomejs/biome/pull/10964) [`794ccd0`](https://github.com/biomejs/biome/commit/794ccd0528345c4eaa87af1d86f02475277a0a22) Thanks [@denbezrukov](https://github.com/denbezrukov)! - Fixed CSS formatting for comments between declaration values and `!important`.
  32. ```diff
  33. -a { color: /* before */ /* after */ red !important; }
  34. +a { color: /* before */ red /* after */ !important; }
  35. ```
  36. - [#10993](https://github.com/biomejs/biome/pull/10993) [`b7a9694`](https://github.com/biomejs/biome/commit/b7a969425d4292fc7c50440da7aea41ce5c9a9c2) Thanks [@denbezrukov](https://github.com/denbezrukov)! - Fixed the CSS formatter to preserve comments on the correct side of selector combinators and before declaration blocks.
  37. ```diff
  38. -.before > /* comment */ .after {}
  39. +.before /* comment */ > .after {}
  40. ```
  41. It now also keeps selectors with escaped newlines in attribute values inline when they fit.
  42. ```diff
  43. -div
  44. - span[foo="bar\
  45. +div span[foo="bar\
  46. value"] {}
  47. ```
  48. - [#10978](https://github.com/biomejs/biome/pull/10978) [`8ebafe1`](https://github.com/biomejs/biome/commit/8ebafe1c7489f1f7af379b8e52b8ad063c82d28a) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [#10870](https://github.com/biomejs/biome/issues/10870): [`noUnresolvedImports`](https://biomejs.dev/linter/rules/no-unresolved-imports/) no longer reports false positives such as `import type { NextRequest } from "next/server"`.
  49. - [#10901](https://github.com/biomejs/biome/pull/10901) [`68c10e6`](https://github.com/biomejs/biome/commit/68c10e672fc886b31423b18be01e873d3bf77f43) Thanks [@Socialpranker](https://github.com/Socialpranker)! - Fixed [#10622](https://github.com/biomejs/biome/issues/10622): the HTML/Vue parser no longer panics on the argument-less `v-bind` shorthand (`:="props"`).
  50. This syntax is valid Vue and equivalent to `v-bind="props"`, so the parser now accepts it (along with the longhand `v-bind:="props"`) instead of crashing while building a diagnostic for a missing argument.
  51. - [#10936](https://github.com/biomejs/biome/pull/10936) [`7df46f5`](https://github.com/biomejs/biome/commit/7df46f5be0880a02cb37453f01b83c1ba59b1e44) Thanks [@ematipico](https://github.com/ematipico)! - Improved generic tuple inference for [`useIncludes`](https://biomejs.dev/linter/rules/use-includes/). The rule now recognizes specialised tuple element types returned through generic aliases.
  52. - [#10941](https://github.com/biomejs/biome/pull/10941) [`f787725`](https://github.com/biomejs/biome/commit/f7877258271e20523d5c673e62912fce1d85cd56) Thanks [@siketyan](https://github.com/siketyan)! - Fixed [`#10855`](https://github.com/biomejs/biome/issues/10855): Biome now supports parsing and formatting CSS custom media queries declared with [`@custom-media`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@custom-media).
  53. - [#10969](https://github.com/biomejs/biome/pull/10969) [`72d309b`](https://github.com/biomejs/biome/commit/72d309b655cee70473e20b061f5a45112139688c) Thanks [@ematipico](https://github.com/ematipico)! - Fixed an issue where Biome logs became too verbose, dumping information not relevant to user's operations.
  54. - [`e62f6b6`](https://github.com/biomejs/biome/commit/e62f6b61461227bbfd57fdf1b50b2dc8c01ea5a0) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [#10963](https://github.com/biomejs/biome/issues/10963): Biome no longer panics when a type-aware rule such as [`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/) checks a call to a function with multiple call signatures imported from another module.
  55. - [#10931](https://github.com/biomejs/biome/pull/10931) [`899c60d`](https://github.com/biomejs/biome/commit/899c60d506115b3f62030236cbd0901bf294e6ab) Thanks [@ematipico](https://github.com/ematipico)! - Fixed `check --write` command. Now the command reports code frame of the formatted code, if the formatter is enabled.
  56. - [#10904](https://github.com/biomejs/biome/pull/10904) [`ceee4f4`](https://github.com/biomejs/biome/commit/ceee4f43dabf88d86b87c9a4ce6051b6738869c2) Thanks [@qzwxsaedc](https://github.com/qzwxsaedc)! - Fixed [#10892](https://github.com/biomejs/biome/issues/10892): [`noUnnecessaryConditions`](https://biomejs.dev/linter/rules/no-unnecessary-conditions/) no longer reports a false positive when checking a member of a discriminated union that is accessed through a default type-only namespace import. The following code is no longer flagged:
  57. ```ts
  58. import type Types from "./types";
  59. declare function parse(): Types.Result<string>;
  60. const result = parse();
  61. if (!result.success) {
  62. }
  63. ```
  64. - [#10962](https://github.com/biomejs/biome/pull/10962) [`f0a67f2`](https://github.com/biomejs/biome/commit/f0a67f2e56c0785595c5cf14a93dba5bb32acf2d) Thanks [@ematipico](https://github.com/ematipico)! - Biome no longer removes embedded styles and scripts in HTML files.
  65. - [#11000](https://github.com/biomejs/biome/pull/11000) [`5039a1e`](https://github.com/biomejs/biome/commit/5039a1ee35771d0193de65a6326781313ab77afb) Thanks [@ematipico](https://github.com/ematipico)! - Fixed a bug where closing one editor stopped a shared Biome daemon used by other editors. LSP proxy processes now exit when either the editor or daemon disconnects.
  66. - [#10957](https://github.com/biomejs/biome/pull/10957) [`cf263c4`](https://github.com/biomejs/biome/commit/cf263c4700e9f24115e541d1f142934a9b2d878f) Thanks [@dyc3](https://github.com/dyc3)! - Improved the performance of the [`noThenProperty`](https://biomejs.dev/linter/rules/no-then-property/) lint rule by about 50%.
  67. - [#10992](https://github.com/biomejs/biome/pull/10992) [`4bf9b21`](https://github.com/biomejs/biome/commit/4bf9b21319df240e2c5ef2e5a9cb2e9582a0e1d1) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/): The rule now reports Promise-returning callbacks where a synchronous callback is expected when calls use tuple spreads or tuple rest parameters, including generic and deeply nested tuples, and when constructor signatures come from interface or object types. Recursive or excessively nested tuple spreads use a conservative fallback so analysis terminates.
  68. For example, the following callback is now reported.
  69. ```ts
  70. declare function consume(...args: [number, () => void]): void;
  71. const prefix: [number] = [1];
  72. consume(...prefix, async () => {});
  73. ```
  74. - [#10915](https://github.com/biomejs/biome/pull/10915) [`b3b12b3`](https://github.com/biomejs/biome/commit/b3b12b3fe390feabbd9ba097922d6c7e56823406) Thanks [@Functionhx](https://github.com/Functionhx)! - Added the rule [`noNegationInEqualityCheck`](https://biomejs.dev/linter/rules/no-negation-in-equality-check/). The rule flags negated expressions on the left side of strict equality checks like `!foo === bar` — due to operator precedence this evaluates as `(!foo) === bar` which is almost always a mistake for `foo !== bar`.
  75. The rule provides an unsafe fix that flips the operator.
  76. ```js
  77. // Invalid
  78. !foo === bar;
  79. !foo !== bar;
  80. // Valid
  81. foo !== bar;
  82. foo === bar;
  83. ```
  84. - [#10970](https://github.com/biomejs/biome/pull/10970) [`bd1038b`](https://github.com/biomejs/biome/commit/bd1038be1ad110aae60bcdbe9a154c6a2fc85c14) Thanks [@ematipico](https://github.com/ematipico)! - Improved overload selection for [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/). Biome now handles overloaded calls, overloaded constructors, rest parameters, union arguments, and generic constraints without selecting an incompatible signature. For example, `noMisusedPromises` now reports the async callback passed to the synchronous overload:
  85. ```ts
  86. declare function consume(kind: "async", callback: () => Promise<void>): void;
  87. declare function consume(kind: "sync", callback: () => void): void;
  88. consume("sync", async () => {});
  89. ```
  90. - [#10933](https://github.com/biomejs/biome/pull/10933) [`48a4abb`](https://github.com/biomejs/biome/commit/48a4abb99d41b1241b2a5812a12247b671d0dfed) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [`useArrayFind`](https://biomejs.dev/linter/rules/use-array-find/) to recognize bigint zero indexes.
  91. - [#10931](https://github.com/biomejs/biome/pull/10931) [`899c60d`](https://github.com/biomejs/biome/commit/899c60d506115b3f62030236cbd0901bf294e6ab) Thanks [@ematipico](https://github.com/ematipico)! - Fixed an orchestration issue that could lead to deadlocks when type-aware rules are enabled.
  92. - [#10969](https://github.com/biomejs/biome/pull/10969) [`72d309b`](https://github.com/biomejs/biome/commit/72d309b655cee70473e20b061f5a45112139688c) Thanks [@ematipico](https://github.com/ematipico)! - Hardened the Biome Language Server by improving its synchronisation logic.
  93. - [#10972](https://github.com/biomejs/biome/pull/10972) [`ab8c21b`](https://github.com/biomejs/biome/commit/ab8c21b35e81708276e4283a4a0ff86ea815e345) Thanks [@ematipico](https://github.com/ematipico)! - Fixed false positives in [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/) and [`useAwaitThenable`](https://biomejs.dev/linter/rules/use-await-thenable/) when Promise or thenable inference cannot complete. These rules now suppress diagnostics instead of treating incomplete type information as a definite result. For example, `useAwaitThenable` no longer reports `await value` when the value's thenability is unknown:
  94. ```ts
  95. declare const value: unknown;
  96. async function consume() {
  97. await value;
  98. }
  99. ```
  100. ## What's Changed
  101. * chore: add latitude to sponsors by @ematipico in https://github.com/biomejs/biome/pull/10947
  102. * fix(workspace): make `process_file` call stateless by @ematipico in https://github.com/biomejs/biome/pull/10931
  103. * feat(css): support custom media queries by @siketyan in https://github.com/biomejs/biome/pull/10941
  104. * fix(inference): harden Salsa type inference by @ematipico in https://github.com/biomejs/biome/pull/10932
  105. * feat(css_formatter): align syntax-owned casing policy by @denbezrukov in https://github.com/biomejs/biome/pull/10889
  106. * fix(markdown): let space-indented bullets interrupt paragraphs in block quotes by @jfmcdowell in https://github.com/biomejs/biome/pull/10914
  107. * feat(lint): add noNegationInEqualityCheck rule by @Functionhx in https://github.com/biomejs/biome/pull/10915
  108. * docs(useIterableCallbackReturn): fix list bullet for the from method by @dfedoryshchev in https://github.com/biomejs/biome/pull/10956
  109. * refactor(lint): port direct type-aware rules by @ematipico in https://github.com/biomejs/biome/pull/10933
  110. * chore: changeset and skip check deps by @ematipico in https://github.com/biomejs/biome/pull/10962
  111. * feat: parse angular attributes by @Netail in https://github.com/biomejs/biome/pull/9242
  112. * fix(css_formatter): format comments before !important by @denbezrukov in https://github.com/biomejs/biome/pull/10964
  113. * fix(parser): accept argument-less v-bind shorthand `:="props"` in HTML/Vue by @Socialpranker in https://github.com/biomejs/biome/pull/10901
  114. * refactor(lint): port behavior-sensitive type rules by @ematipico in https://github.com/biomejs/biome/pull/10934
  115. * perf(noThenProperty): use typed syntax tree traversal and TokenText by @dyc3 in https://github.com/biomejs/biome/pull/10957
  116. * fix(workspace): synchronisation and logging by @ematipico in https://github.com/biomejs/biome/pull/10969
  117. * fix(inference): resolve members of default namespace imports by @qzwxsaedc in https://github.com/biomejs/biome/pull/10904
  118. * refactor: discourage usages of `Text`, prefer `TokenText` by @dyc3 in https://github.com/biomejs/biome/pull/10967
  119. * fix(analyzer): handle HTML processing instructions by @ematipico in https://github.com/biomejs/biome/pull/10977
  120. * fix(inference): improve imported and aliased types by @ematipico in https://github.com/biomejs/biome/pull/10936
  121. * fix(resolver): fallback to disk loading if `exports` is missing by @ematipico in https://github.com/biomejs/biome/pull/10978
  122. * fix(inference): improve overload selection by @ematipico in https://github.com/biomejs/biome/pull/10970
  123. * chore(deps): update rust crate quote to 1.0.47 by @renovate[bot] in https://github.com/biomejs/biome/pull/10726
  124. * chore(deps): update rust crate rustc-hash to 2.1.3 by @renovate[bot] in https://github.com/biomejs/biome/pull/10857
  125. * fix(inference): argument and type parameters inference by @ematipico in https://github.com/biomejs/biome/pull/10992
  126. * fix(inference): improve member and Promise inference by @ematipico in https://github.com/biomejs/biome/pull/10971
  127. * fix(css_formatter): preserve selector boundary comments by @denbezrukov in https://github.com/biomejs/biome/pull/10993
  128. * fix: preview ci by @Netail in https://github.com/biomejs/biome/pull/11001
  129. * fix(daemon): avoid disconnection from clients by @ematipico in https://github.com/biomejs/biome/pull/11000
  130. * chore(deps): update rust crate globset to 0.4.19 by @renovate[bot] in https://github.com/biomejs/biome/pull/10999
  131. * feat(fmt/yaml): format document markers, directives, and multi-doc streams by @dyc3 in https://github.com/biomejs/biome/pull/10989
  132. * fix(html_analyze): account for shorthand attributes when computing implicit ARIA roles by @ayaangazali in https://github.com/biomejs/biome/pull/10983
  133. * fix(inference): suppress incomplete type results by @ematipico in https://github.com/biomejs/biome/pull/10972
  134. * chore(deps): update dependency @changesets/cli to v2.31.1 by @renovate[bot] in https://github.com/biomejs/biome/pull/10997
  135. * chore(deps): update rust crate anyhow to 1.0.104 by @renovate[bot] in https://github.com/biomejs/biome/pull/10998
  136. * ci: release by @github-actions[bot] in https://github.com/biomejs/biome/pull/10948
  137. ## New Contributors
  138. * @Functionhx made their first contribution in https://github.com/biomejs/biome/pull/10915
  139. * @Socialpranker made their first contribution in https://github.com/biomejs/biome/pull/10901
  140. * @qzwxsaedc made their first contribution in https://github.com/biomejs/biome/pull/10904
  141. * @ayaangazali made their first contribution in https://github.com/biomejs/biome/pull/10983
  142. **Full Changelog**: https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.4...@biomejs/biome@2.5.5

vedi su githubimported 2026-09-28 via npm