Vai al contenuto
verdict:

Biome 2.6.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 · 1085 righe
  1. ## 2.6.5
  2. ### Patch Changes
  3. - [#12755](https://github.com/biomejs/biome/pull/12755) [`bbc4887`](https://github.com/biomejs/biome/commit/bbc4887f1b885d8f9bea8e265108c919f021eec4) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noArrayForEach`](https://biomejs.dev/linter/rules/no-array-for-each/), which reports `forEach()` calls that can be written as `for...of` loops. Values known not to be arrays, such as a `Map` or a `Set`, are ignored.
  4. ```js
  5. array.forEach((element) => {
  6. bar(element);
  7. });
  8. ```
  9. - [#12777](https://github.com/biomejs/biome/pull/12777) [`ba692e4`](https://github.com/biomejs/biome/commit/ba692e45d4e9ad0d7c0d6b341a603bbbdbeaa4c8) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noAwaitInPromiseMethods`](https://biomejs.dev/linter/rules/no-await-in-promise-methods/), which reports `await` inside the array passed to `Promise.all()`, `Promise.allSettled()`, `Promise.any()`, or `Promise.race()`. The `await` pauses the code before the method is called, so the promises no longer run at the same time.
  10. ```js
  11. Promise.all([await promise, anotherPromise]);
  12. ```
  13. - [#12765](https://github.com/biomejs/biome/pull/12765) [`af84fb4`](https://github.com/biomejs/biome/commit/af84fb4a9b63510c0527b712f1f860f44f137672) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noChainedComparison`](https://biomejs.dev/linter/rules/no-chained-comparison/), which reports comparisons chained like `a < b < c` or `a === b === c`. JavaScript compares `a` with `b` first, and then compares the resulting `true` or `false` with `c`, so `3 > 2 > 1` is `false`.
  14. ```js
  15. if (a < b < c) {}
  16. ```
  17. - [#12547](https://github.com/biomejs/biome/pull/12547) [`0a2073d`](https://github.com/biomejs/biome/commit/0a2073d8b9716a56f053e375ca8bba6a4e9f72f4) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noDynamicDelete`](https://biomejs.dev/linter/rules/no-dynamic-delete/), which disallows using `delete` with a property name that is computed at runtime. Fixed property names written as string or number literals are allowed.
  18. ```js
  19. delete container[name];
  20. ```
  21. - [#12481](https://github.com/biomejs/biome/pull/12481) [`ed7adc2`](https://github.com/biomejs/biome/commit/ed7adc2cf8ed2fe01d0fa2fa12fa711a3205acb4) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noLateEventControl`](https://biomejs.dev/linter/rules/no-late-event-control/), which reports calls to `preventDefault()`, `stopPropagation()`, and `stopImmediatePropagation()` that run after the browser has finished handling the event, where they have no effect.
  22. ```js
  23. element.addEventListener("click", async (event) => {
  24. await save();
  25. event.preventDefault();
  26. });
  27. ```
  28. - [#12795](https://github.com/biomejs/biome/pull/12795) [`179666d`](https://github.com/biomejs/biome/commit/179666da36810a25c310dc125c7e5a64c10a20c4) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noMapSpread`](https://biomejs.dev/linter/rules/no-map-spread/), which disallows spreading objects or arrays in the values returned by `map()` and `flatMap()` callbacks. Each spread copies a whole object or array for every item, which is slow for large arrays. Its unsafe fix replaces an object that starts with a spread with `Object.assign()`.
  29. ```js
  30. const users = getUsers();
  31. const rows = users.map((user) => ({ ...user, role: getRole(user) }));
  32. ```
  33. - [#12793](https://github.com/biomejs/biome/pull/12793) [`d9a99fd`](https://github.com/biomejs/biome/commit/d9a99fd0cde0285dba6d048ae86db0e3d152fd85) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noMismatchedMapKey`](https://biomejs.dev/linter/rules/no-mismatched-map-key/), which reports `get()` and `set()` calls that use a different key than the `has()` check before them. Checking one key and then using another is usually a copy-paste mistake.
  34. ```js
  35. if (map.has(key)) {
  36. map.get(otherKey); // reported
  37. }
  38. ```
  39. - [#12342](https://github.com/biomejs/biome/pull/12342) [`1db7c0d`](https://github.com/biomejs/biome/commit/1db7c0d725178c53f1db9075c3711a873b0da754) Thanks [@vibbix](https://github.com/vibbix)! - Added the nursery rule [`noMissingScssInterpolation`](https://biomejs.dev/linter/rules/no-missing-scss-interpolation/), which disallows Sass variables and function calls in custom property values without `#{}` interpolation. Sass copies these values into the CSS unchanged, so the browser receives `$gap` or `math.div(8px, 2)` instead of their results. Its unsafe fix wraps variables in `#{}`.
  40. ```scss
  41. :root {
  42. --gap: $gap;
  43. --half: math.div(8px, 2);
  44. }
  45. ```
  46. - [#12792](https://github.com/biomejs/biome/pull/12792) [`de86b37`](https://github.com/biomejs/biome/commit/de86b37aa68197ef8f58635a3e50a62d361c95f0) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noMissingThrow`](https://biomejs.dev/linter/rules/no-missing-throw/), which reports errors that are created with `new` but never thrown. Its unsafe fix adds the missing `throw` keyword.
  47. ```js
  48. function check(value) {
  49. if (!value) {
  50. new Error("Missing value");
  51. }
  52. }
  53. ```
  54. - [#12790](https://github.com/biomejs/biome/pull/12790) [`c23e4c3`](https://github.com/biomejs/biome/commit/c23e4c3e03fdccf38abfb2b9713923715b745eae) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noObjectLiteralComparison`](https://biomejs.dev/linter/rules/no-object-literal-comparison/), which reports comparisons with an empty object `{}` or an empty array `[]`. These comparisons never check whether a value is empty, because objects and arrays are compared by reference.
  55. ```js
  56. if (value === {}) {}
  57. ```
  58. - [#12450](https://github.com/biomejs/biome/pull/12450) [`793f07d`](https://github.com/biomejs/biome/commit/793f07d99712a7fa352e5075834991eecfc36254) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noPlaywrightUnsafeReferences`](https://biomejs.dev/linter/rules/no-playwright-unsafe-references/), which reports functions passed to `page.evaluate()` or `page.addInitScript()` that use variables declared outside of them. Playwright runs these functions in the browser page, where those variables don't exist.
  59. ```js
  60. const x = 7;
  61. await page.evaluate(() => x * 2); // reported: `x` must be passed as an argument
  62. ```
  63. - [#12388](https://github.com/biomejs/biome/pull/12388) [`a0160a4`](https://github.com/biomejs/biome/commit/a0160a4fea9e0d9092d4edde315a7e52559d19e1) Thanks [@vibbix](https://github.com/vibbix)! - Added the nursery rule [`noPseudoElementInFunctionalPseudoClass`](https://biomejs.dev/linter/rules/no-pseudo-element-in-functional-pseudo-class/), which disallows pseudo-elements inside `:is()`, `:where()`, `:not()` and `:has()`. Browsers drop these selectors, so the styles never apply to the pseudo-element.
  64. ```css
  65. .card:is(::before, ::after) {
  66. content: "";
  67. }
  68. ```
  69. - [#12779](https://github.com/biomejs/biome/pull/12779) [`bc1befb`](https://github.com/biomejs/biome/commit/bc1befb26387e85a228d2c54e6c628c126ab7d38) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noSinglePromiseInPromiseMethods`](https://biomejs.dev/linter/rules/no-single-promise-in-promise-methods/), which reports an array with a single element passed to `Promise.all()`, `Promise.any()`, or `Promise.race()`. The rule offers a fix that awaits the value directly or uses `Promise.resolve()`.
  70. ```js
  71. const result = await Promise.all([promise]);
  72. ```
  73. - [#12241](https://github.com/biomejs/biome/pull/12241) [`d96de1d`](https://github.com/biomejs/biome/commit/d96de1d2d69295f4a557f99a972fb8c5d694d863) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noSvelteBindValueOnCheckableInputs`](https://biomejs.dev/linter/rules/no-svelte-bind-value-on-checkable-inputs/), which reports `bind:value` on checkbox and radio inputs in Svelte files. Users change whether these inputs are checked, not their `value`, so `bind:value` does not track their choice.
  74. ```svelte
  75. <input type="checkbox" bind:value={accepted} />
  76. ```
  77. - [#12764](https://github.com/biomejs/biome/pull/12764) [`e166d08`](https://github.com/biomejs/biome/commit/e166d087dff428fae0b4a22e2129e53b26652aa3) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noSyncMethods`](https://biomejs.dev/linter/rules/no-sync-methods/), which reports calls to functions whose names end with `Sync`, such as `fs.readFileSync()`. These calls block the program until they finish. The `allowAtRootLevel` option allows them outside of functions, and the `ignore` option allows specific function names.
  78. ```js
  79. const contents = fs.readFileSync("data.txt");
  80. ```
  81. - [#12515](https://github.com/biomejs/biome/pull/12515) [`c0a4174`](https://github.com/biomejs/biome/commit/c0a4174e393d06c5a019d943937865f1bdba65bd) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noTanstackQueryVoidQueryFn`](https://biomejs.dev/linter/rules/no-tanstack-query-void-query-fn/), which disallows TanStack Query functions that don't return any data. TanStack Query doesn't accept `undefined` as the data of a query, so the query fails with an error.
  82. ```js
  83. import { useQuery } from "@tanstack/react-query";
  84. useQuery({
  85. queryKey: ["todos"],
  86. queryFn: async () => {
  87. await fetch("/api/todos");
  88. },
  89. });
  90. ```
  91. The rule belongs to the `tanstackQuery` and `types` domains.
  92. - [#12482](https://github.com/biomejs/biome/pull/12482) [`1e6e407`](https://github.com/biomejs/biome/commit/1e6e4070f8b135a8e39700e74d9b856bc6663fa3) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noUnnecessaryStringTrim`](https://biomejs.dev/linter/rules/no-unnecessary-string-trim/), which reports `trim()` calls before `startsWith()` or `endsWith()` when only one side of the string matters. Use `trimStart()` or `trimEnd()` instead.
  93. ```js
  94. value.trim().startsWith("-");
  95. ```
  96. - [#12772](https://github.com/biomejs/biome/pull/12772) [`a108773`](https://github.com/biomejs/biome/commit/a10877303f48602c104312d08f5a0227f41ee5c0) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noUselessAwait`](https://biomejs.dev/linter/rules/no-useless-await/), which reports `await` on values that are never promises, such as literals, arrays, and the results of comparisons.
  97. ```js
  98. await [fetchUser(), fetchPosts()];
  99. ```
  100. - [#12783](https://github.com/biomejs/biome/pull/12783) [`d0931b0`](https://github.com/biomejs/biome/commit/d0931b02379218191df68cd6369c95e97a8df998) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noUselessLengthCheck`](https://biomejs.dev/linter/rules/no-useless-length-check/), which reports array length checks that don't change the result: a check that the array is empty next to `every()`, a check that it isn't empty next to `some()`, or a check that it isn't empty around a `for...of` loop over the same array.
  101. ```js
  102. if (array.length > 0 && array.some(Boolean)) {}
  103. ```
  104. - [#12488](https://github.com/biomejs/biome/pull/12488) [`93e0e73`](https://github.com/biomejs/biome/commit/93e0e736d6137bb3ca07c5dc48ed05b84978526a) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noUselessTypeAssertion`](https://biomejs.dev/linter/rules/no-useless-type-assertion/), which reports type assertions that don't change the type of an expression, such as a non-null assertion on a value that can't be `null` or `undefined`.
  105. ```ts
  106. function double(value: number): number {
  107. return value! * 2;
  108. }
  109. ```
  110. - [#12632](https://github.com/biomejs/biome/pull/12632) [`0e197b4`](https://github.com/biomejs/biome/commit/0e197b4ba88dbc5f4be6316bc7fd83a77407a573) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueChildContent`](https://biomejs.dev/linter/rules/no-vue-child-content/), which disallows content inside elements that use `v-html` or `v-text`. These directives replace the content of their element, so Vue discards anything written there.
  111. ```vue
  112. <template>
  113. <div v-html="html">Loading...</div>
  114. </template>
  115. ```
  116. - [#12616](https://github.com/biomejs/biome/pull/12616) [`cb7b888`](https://github.com/biomejs/biome/commit/cb7b8886dd292c47ed269677ff99638dc7a5e516) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueDeprecatedConfigKeyCodes`](https://biomejs.dev/linter/rules/no-vue-deprecated-config-key-codes/), which reports uses of `Vue.config.keyCodes`. Vue 3 removed this option, so custom key names defined with it no longer work.
  117. ```js
  118. Vue.config.keyCodes = { f1: 112 };
  119. ```
  120. - [#12568](https://github.com/biomejs/biome/pull/12568) [`59f3a42`](https://github.com/biomejs/biome/commit/59f3a42754bbf933259cab7ada1ec18d5306b3f9) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueDeprecatedDestroyedLifecycle`](https://biomejs.dev/linter/rules/no-vue-deprecated-destroyed-lifecycle/), which reports the `beforeDestroy` and `destroyed` lifecycle hooks in Vue components. Vue 3 renamed them to `beforeUnmount` and `unmounted`, and no longer calls hooks with the old names.
  121. ```vue
  122. <script>
  123. export default {
  124. destroyed() {},
  125. };
  126. </script>
  127. ```
  128. - [#12654](https://github.com/biomejs/biome/pull/12654) [`bcb1e0f`](https://github.com/biomejs/biome/commit/bcb1e0f08fa337ccefcacc1293b2478aec61dc99) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueDeprecatedEventsApi`](https://biomejs.dev/linter/rules/no-vue-deprecated-events-api/), which reports calls to the `$on`, `$off`, and `$once` instance methods in Vue components. Vue 3 removed these methods, so calling them throws an error.
  129. ```vue
  130. <script>
  131. export default {
  132. mounted() {
  133. this.$on("start", handler); // reported
  134. },
  135. };
  136. </script>
  137. ```
  138. - [#12590](https://github.com/biomejs/biome/pull/12590) [`b9872ef`](https://github.com/biomejs/biome/commit/b9872efde52dfb2672aa3e183d73693ad384d627) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueDeprecatedFunctionalTemplate`](https://biomejs.dev/linter/rules/no-vue-deprecated-functional-template/), which reports the `functional` attribute on the `<template>` of a Vue component. Vue 3 no longer supports this attribute.
  139. ```vue
  140. <template functional>
  141. <div>{{ props.message }}</div>
  142. </template>
  143. ```
  144. - [#12552](https://github.com/biomejs/biome/pull/12552) [`b71b705`](https://github.com/biomejs/biome/commit/b71b705308673423084ac4d919b83a114b5d329f) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueDeprecatedHtmlElementIs`](https://biomejs.dev/linter/rules/no-vue-deprecated-html-element-is/), which disallows the `is` attribute on HTML elements in Vue templates. Vue 3 no longer renders a component in place of these elements, unless the value starts with `vue:`.
  145. ```vue
  146. <template>
  147. <tr is="my-row"></tr>
  148. </template>
  149. ```
  150. - [#12553](https://github.com/biomejs/biome/pull/12553) [`4a613e1`](https://github.com/biomejs/biome/commit/4a613e130f854a5bfba6ad87ce7a19d683f4a574) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueDeprecatedInlineTemplate`](https://biomejs.dev/linter/rules/no-vue-deprecated-inline-template/), which disallows the `inline-template` attribute on Vue components. Vue 3 removed this feature, so the content between the component's tags is no longer used as its template.
  151. ```vue
  152. <template>
  153. <my-component inline-template>
  154. <div>{{ message }}</div>
  155. </my-component>
  156. </template>
  157. ```
  158. - [#12617](https://github.com/biomejs/biome/pull/12617) [`0e9ca5b`](https://github.com/biomejs/biome/commit/0e9ca5bde52cd526092711b52989e9a703f5cee2) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueDeprecatedModelDefinition`](https://biomejs.dev/linter/rules/no-vue-deprecated-model-definition/), which reports the `model` option in Vue components. Vue 3 ignores this option, so `v-model` on the component always uses the `modelValue` prop and the `update:modelValue` event.
  159. ```vue
  160. <script>
  161. export default {
  162. model: {
  163. prop: "checked",
  164. event: "change",
  165. },
  166. };
  167. </script>
  168. ```
  169. - [#12604](https://github.com/biomejs/biome/pull/12604) [`e998921`](https://github.com/biomejs/biome/commit/e998921d0fa85dfbe51e8f7f40d1c943d0d5ddd7) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueDeprecatedPropsDefaultThis`](https://biomejs.dev/linter/rules/no-vue-deprecated-props-default-this/), which reports `this` inside the function that computes the default value of a Vue prop. Vue doesn't give this function access to the component, so `this` doesn't point to it. Read other props from the function's first argument instead.
  170. ```vue
  171. <script>
  172. export default {
  173. props: {
  174. size: Number,
  175. sizes: {
  176. type: Array,
  177. default() {
  178. return [this.size];
  179. },
  180. },
  181. },
  182. };
  183. </script>
  184. ```
  185. - [#12633](https://github.com/biomejs/biome/pull/12633) [`f65fe1e`](https://github.com/biomejs/biome/commit/f65fe1ee180e9b77d951afff2c12713e209ecd25) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueDeprecatedSlotAttribute`](https://biomejs.dev/linter/rules/no-vue-deprecated-slot-attribute/), which reports the `slot` attribute in Vue templates. Vue 3 no longer uses this attribute to fill named slots, so use `v-slot` (or `#`) on a `<template>` element instead.
  186. ```vue
  187. <template>
  188. <MyComponent>
  189. <template slot="header">Title</template>
  190. </MyComponent>
  191. </template>
  192. ```
  193. - [#12589](https://github.com/biomejs/biome/pull/12589) [`8ccb19a`](https://github.com/biomejs/biome/commit/8ccb19a56316053a4c390224f736d4a61fcbffb2) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueDeprecatedVBindSync`](https://biomejs.dev/linter/rules/no-vue-deprecated-v-bind-sync/), which reports the `.sync` modifier on Vue `v-bind` directives. Vue 3 removed this modifier, so the rule suggests `v-model` with the same argument instead.
  194. ```vue
  195. <MyComponent :title.sync="pageTitle" />
  196. ```
  197. - [#12609](https://github.com/biomejs/biome/pull/12609) [`e1e102b`](https://github.com/biomejs/biome/commit/e1e102b01fffb275bcb32e5c9ed927ae3c063722) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueDeprecatedVOnNativeModifier`](https://biomejs.dev/linter/rules/no-vue-deprecated-v-on-native-modifier/), which disallows the `.native` modifier on Vue's `v-on` directive. Vue 3 removed this modifier.
  198. ```vue
  199. <MyComponent @click.native="onClick" />
  200. ```
  201. - [#12667](https://github.com/biomejs/biome/pull/12667) [`de354e7`](https://github.com/biomejs/biome/commit/de354e7dba07d1d2edb4b501dfe2a04ebb9350c1) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueExcessiveProps`](https://biomejs.dev/linter/rules/no-vue-excessive-props/), which reports Vue components that declare more props than the `maxProps` option allows. The default limit is `10`.
  202. ```vue
  203. <!-- With "maxProps": 2 -->
  204. <script setup lang="ts">
  205. defineProps<{ title: string; subtitle: string; icon: string }>(); // reported
  206. </script>
  207. ```
  208. - [#12666](https://github.com/biomejs/biome/pull/12666) [`c3dc557`](https://github.com/biomejs/biome/commit/c3dc55754b60fe72e6713f7306e9531bcc4872ec) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueLoneTemplate`](https://biomejs.dev/linter/rules/no-vue-lone-template/), which reports `<template>` elements inside a Vue template that don't use `v-if`, `v-else-if`, `v-else`, `v-for`, or `v-slot`. Vue renders these as regular HTML `<template>` elements, so their content isn't shown.
  209. ```vue
  210. <template>
  211. <template>
  212. <p>Hello</p>
  213. </template>
  214. </template>
  215. ```
  216. - [#12533](https://github.com/biomejs/biome/pull/12533) [`4b1089d`](https://github.com/biomejs/biome/commit/4b1089d25b3e5cf7ca45b53c6c56360ef31a0f22) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueMixin`](https://biomejs.dev/linter/rules/no-vue-mixin/), which reports the `mixins` option in Vue components. In Vue 3, composables are the recommended way to share logic between components. The rule is recommended and part of the `vue` domain.
  217. ```vue
  218. <script>
  219. export default {
  220. mixins: [counterMixin],
  221. };
  222. </script>
  223. ```
  224. - [#12658](https://github.com/biomejs/biome/pull/12658) [`807e358`](https://github.com/biomejs/biome/commit/807e358ceebc3d4fc616a998a7caca07355a3915) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueMultipleObjectsInClass`](https://biomejs.dev/linter/rules/no-vue-multiple-objects-in-class/), which reports `:class` arrays in Vue templates that contain more than one object. Merge the conditional classes into a single object instead.
  225. ```vue
  226. <template>
  227. <div :class="[{ active: isActive }, { disabled: isDisabled }]" />
  228. </template>
  229. ```
  230. - [#12564](https://github.com/biomejs/biome/pull/12564) [`78c1dd5`](https://github.com/biomejs/biome/commit/78c1dd5acc3319257ad83a515d06aa672d5a3da0) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueRefObjectReactivityLoss`](https://biomejs.dev/linter/rules/no-vue-ref-object-reactivity-loss/), which reports reads of a Vue ref's value that run only once, in the same function that creates the ref. Such a read copies the current value, and the copy doesn't update when the ref changes.
  231. ```js
  232. import { ref } from "vue";
  233. const count = ref(0);
  234. const doubled = count.value * 2;
  235. ```
  236. - [#12517](https://github.com/biomejs/biome/pull/12517) [`5044c56`](https://github.com/biomejs/biome/commit/5044c5630dea2cce501dba065a5653fd6887a7d6) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueRestrictedCallAfterAwait`](https://biomejs.dev/linter/rules/no-vue-restricted-call-after-await/), which reports calls to configured functions that come after an `await` in a Vue component's `setup()` function.
  237. For example, with `{ "functions": [{ "module": "vue-i18n", "path": "useI18n" }] }`, the following call is reported:
  238. ```vue
  239. <script>
  240. import { useI18n } from "vue-i18n";
  241. export default {
  242. async setup() {
  243. await fetchUser();
  244. const { t } = useI18n();
  245. return { t };
  246. },
  247. };
  248. </script>
  249. ```
  250. - [#12558](https://github.com/biomejs/biome/pull/12558) [`e898da4`](https://github.com/biomejs/biome/commit/e898da44868c773a9e3f3b0fe8258127a14ce5ca) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueRestrictedVOn`](https://biomejs.dev/linter/rules/no-vue-restricted-v-on/), which reports `v-on` event listeners that are disallowed through the `listeners` option. An entry can match an event name, a set of modifiers, and an element. For example, with `{ "listeners": [{ "event": "click", "element": "MyButton" }] }`, `<MyButton @click="onClick" />` is now reported.
  251. - [#12573](https://github.com/biomejs/biome/pull/12573) [`65c6b0b`](https://github.com/biomejs/biome/commit/65c6b0bf225f2583243750c127b918e0e802fcaf) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueTemplateKey`](https://biomejs.dev/linter/rules/no-vue-template-key/), which disallows the `key` attribute on `<template>` elements in Vue files. A `key` on a `<template>` that also uses `v-for` is still allowed.
  252. ```vue
  253. <template>
  254. <template :key="item.id"><div /></template>
  255. </template>
  256. ```
  257. - [#12629](https://github.com/biomejs/biome/pull/12629) [`2a34da1`](https://github.com/biomejs/biome/commit/2a34da196fcb52f32ef5a20c68a49496729b12dd) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueTemplateShadow`](https://biomejs.dev/linter/rules/no-vue-template-shadow/), which disallows `v-for` and `v-slot` variables that hide a variable with the same name from an outer scope of a Vue template.
  258. ```vue
  259. <template>
  260. <div v-for="item in groups">
  261. <span v-for="item in item.children">{{ item }}</span>
  262. </div>
  263. </template>
  264. ```
  265. - [#12610](https://github.com/biomejs/biome/pull/12610) [`40de561`](https://github.com/biomejs/biome/commit/40de561cb0c7892b3796b717e76d091160ae361a) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueTextareaMustache`](https://biomejs.dev/linter/rules/no-vue-textarea-mustache/), which disallows `{{ }}` text interpolation inside a Vue `<textarea>`. Vue doesn't support it there; use `v-model` instead.
  266. ```vue
  267. <template>
  268. <textarea>{{ message }}</textarea>
  269. </template>
  270. ```
  271. - [#12665](https://github.com/biomejs/biome/pull/12665) [`7742209`](https://github.com/biomejs/biome/commit/7742209e022c43474dbe0baef960c40e6ecfcf92) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueThisInBeforeRouteEnter`](https://biomejs.dev/linter/rules/no-vue-this-in-before-route-enter/), which reports `this` in the `beforeRouteEnter` navigation guard of a Vue component. Vue Router calls this guard before it creates the component, so `this` is `undefined` there.
  272. ```vue
  273. <script>
  274. export default {
  275. beforeRouteEnter(to, from, next) {
  276. this.loadUser(to.params.id); // reported
  277. next();
  278. },
  279. };
  280. </script>
  281. ```
  282. - [#12620](https://github.com/biomejs/biome/pull/12620) [`70d7173`](https://github.com/biomejs/biome/commit/70d7173b3e300593eaa3601a0c794d687c439693) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueThisInTemplate`](https://biomejs.dev/linter/rules/no-vue-this-in-template/), which reports `this` in Vue templates. Templates can read the properties of the component directly, so `this.text` can be written as `text`:
  283. ```vue
  284. <template>
  285. <p>{{ this.text }}</p>
  286. </template>
  287. ```
  288. - [#12601](https://github.com/biomejs/biome/pull/12601) [`1d4ed92`](https://github.com/biomejs/biome/commit/1d4ed92730752da668157e85ab23d811ad967952) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueUndeclaredEmits`](https://biomejs.dev/linter/rules/no-vue-undeclared-emits/), which reports events that a Vue component emits without declaring them in the `emits` option or in `defineEmits()`.
  289. ```vue
  290. <script setup>
  291. const emit = defineEmits(["change"]);
  292. emit("close"); // reported: "close" is not declared
  293. </script>
  294. ```
  295. - [#12583](https://github.com/biomejs/biome/pull/12583) [`4e870a8`](https://github.com/biomejs/biome/commit/4e870a8db8a9148520ecdc8dac390331b9a750db) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueUndeclaredProperties`](https://biomejs.dev/linter/rules/no-vue-undeclared-properties/), which reports names that a Vue component uses but doesn't declare, in its template, in `this.name`, and in `props.name`.
  296. ```vue
  297. <script setup>
  298. const count = 0;
  299. </script>
  300. <template>
  301. <!-- `cnt` isn't declared -->
  302. <p>{{ cnt }}</p>
  303. </template>
  304. ```
  305. - [#12657](https://github.com/biomejs/biome/pull/12657) [`b45fe79`](https://github.com/biomejs/biome/commit/b45fe796e9868a6a46fa7ac4f94ecae05cd58cc5) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueUndeclaredSlots`](https://biomejs.dev/linter/rules/no-vue-undeclared-slots/), which reports `<slot>` elements in Vue components written in TypeScript when the slot isn't declared with `defineSlots()` or with the `slots` option.
  306. ```vue
  307. <script setup lang="ts">
  308. defineSlots<{
  309. default(props: { msg: string }): any;
  310. }>();
  311. </script>
  312. <template>
  313. <slot name="footer" /> <!-- reported -->
  314. </template>
  315. ```
  316. - [#12789](https://github.com/biomejs/biome/pull/12789) [`041c800`](https://github.com/biomejs/biome/commit/041c8004bfda15703bc36adf5212cd304f5501a7) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noVueUselessTemplateAttributes`](https://biomejs.dev/linter/rules/no-vue-useless-template-attributes/), which reports attributes and directives that have no effect on a `<template>` element with `v-if`, `v-else-if`, `v-else`, `v-for`, or `v-slot` in Vue files. Vue renders only the content of such an element, so it ignores the other attributes.
  317. ```vue
  318. <template>
  319. <template v-if="visible" class="heading">Title</template>
  320. </template>
  321. ```
  322. - [#12592](https://github.com/biomejs/biome/pull/12592) [`36531cc`](https://github.com/biomejs/biome/commit/36531cc1fe781766707c3df58054d7cf8f99e42b) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueUselessVBind`](https://biomejs.dev/linter/rules/no-vue-useless-v-bind/), which reports `v-bind` directives whose value is a fixed string. A plain attribute does the same thing.
  323. ```vue
  324. <template>
  325. <div :id="'foo'" /> <!-- reported, use id="foo" instead -->
  326. </template>
  327. ```
  328. - [#12522](https://github.com/biomejs/biome/pull/12522) [`59838bb`](https://github.com/biomejs/biome/commit/59838bbb94a8c64ecd712d1e1de2ee20a8409153) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noVueVForTemplateKeyOnChild`](https://biomejs.dev/linter/rules/no-vue-v-for-template-key-on-child/), which reports a `key` placed on a child element of a `<template v-for>` instead of on the `<template>` tag.
  329. ```vue
  330. <template>
  331. <template v-for="todo in todos">
  332. <TodoItem :key="todo.id" />
  333. </template>
  334. </template>
  335. ```
  336. - [#12516](https://github.com/biomejs/biome/pull/12516) [`2d9e57e`](https://github.com/biomejs/biome/commit/2d9e57ee6b74fcabba803fdd55793b36a5ce9a6e) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useAccessorPairs`](https://biomejs.dev/linter/rules/use-accessor-pairs/). The rule reports setters that have no matching getter in object literals, classes, and property descriptors.
  337. ```js
  338. const user = {
  339. set name(value) {
  340. this._name = value;
  341. },
  342. };
  343. ```
  344. - [#12756](https://github.com/biomejs/biome/pull/12756) [`1c6e3ef`](https://github.com/biomejs/biome/commit/1c6e3ef015a74a6f15965fad09af7109bcfc207e) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useObjectFromEntries`](https://biomejs.dev/linter/rules/use-object-from-entries/), which reports code that builds an object from a list of key-value pairs with `reduce()`, a `for...of` loop, or `_.fromPairs()` instead of `Object.fromEntries()`. The `functions` option adds other helper functions to report.
  345. ```js
  346. const object = pairs.reduce((object, [key, value]) => ({ ...object, [key]: value }), {});
  347. ```
  348. - [#12778](https://github.com/biomejs/biome/pull/12778) [`5432756`](https://github.com/biomejs/biome/commit/54327569df524014e48d9e73d375ea1f5b416315) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useSetSize`](https://biomejs.dev/linter/rules/use-set-size/), which reports code that copies a `Set` into an array only to read the array's `length`, and suggests reading the `size` property of the `Set` instead.
  349. ```js
  350. const uniqueCount = [...new Set(userIds)].length;
  351. ```
  352. - [#12302](https://github.com/biomejs/biome/pull/12302) [`b0d3390`](https://github.com/biomejs/biome/commit/b0d339031ff3c2c2ce31fd3a5c80d0d21d39daf1) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useSvelteStoreInitialValue`](https://biomejs.dev/linter/rules/use-svelte-store-initial-value/), which requires `writable()`, `readable()`, and `derived()` stores from `svelte/store` to be created with an initial value.
  353. ```js
  354. import { writable } from "svelte/store";
  355. export const count = writable();
  356. ```
  357. - [#12290](https://github.com/biomejs/biome/pull/12290) [`c973fed`](https://github.com/biomejs/biome/commit/c973fed0cc08c4e310c3a99e5a08dc9b47004855) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useTailwindVariablesShorthand`](https://biomejs.dev/linter/rules/use-tailwind-variables-shorthand/) for JavaScript and HTML. It reports Tailwind CSS classes that read a CSS variable with `[var()]`, and fixes them to the shorthand that Tailwind CSS v4 added.
  358. ```jsx
  359. <div className="bg-[var(--brand)]" />; // use `bg-(--brand)`
  360. ```
  361. - [#12518](https://github.com/biomejs/biome/pull/12518) [`e9d9616`](https://github.com/biomejs/biome/commit/e9d9616d6d79f04ce29c565b5bd497e3f5a8cd41) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useTanstackQueryStableQueryClient`](https://biomejs.dev/linter/rules/use-tanstack-query-stable-query-client/), which reports a TanStack Query `QueryClient` created inside a React component or custom hook. Such a client is created again on every render, and its cache starts empty each time.
  362. ```jsx
  363. import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
  364. function App() {
  365. const queryClient = new QueryClient();
  366. return <QueryClientProvider client={queryClient}><Home /></QueryClientProvider>;
  367. }
  368. ```
  369. - [#12650](https://github.com/biomejs/biome/pull/12650) [`0ddd08f`](https://github.com/biomejs/biome/commit/0ddd08ff12c1b8af63725f01985bf9d962bfe325) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueBlockOrder`](https://biomejs.dev/linter/rules/use-vue-block-order/), which enforces the order of the top-level blocks in Vue components. By default, `<script>` and `<template>` blocks come first, in any order, followed by `<style>` blocks. The order can be changed with the `order` option.
  370. ```vue
  371. <style></style>
  372. <script></script>
  373. ```
  374. - [#12715](https://github.com/biomejs/biome/pull/12715) [`7863f32`](https://github.com/biomejs/biome/commit/7863f32eab9aac994e19767e0e897f6679eb42c6) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueBooleanPropTypeFirst`](https://biomejs.dev/linter/rules/use-vue-boolean-prop-type-first/), which requires `Boolean` to come first in the list of types of a Vue prop. When `String` comes before `Boolean`, a prop written in a template without a value is set to an empty string instead of `true`.
  375. ```vue
  376. <script setup>
  377. defineProps({
  378. disabled: [String, Boolean],
  379. });
  380. </script>
  381. ```
  382. - [#12563](https://github.com/biomejs/biome/pull/12563) [`91ac4cb`](https://github.com/biomejs/biome/commit/91ac4cb327f4cc579fda63de3a2ba5a094f627f1) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueComputedPropertyReturn`](https://biomejs.dev/linter/rules/use-vue-computed-property-return/), which requires the getters of Vue computed properties to return a value on every path.
  383. ```vue
  384. <script setup>
  385. import { computed, ref } from "vue";
  386. const count = ref(0);
  387. const double = computed(() => {
  388. count.value * 2; // reported: the getter never returns a value
  389. });
  390. </script>
  391. ```
  392. - [#12716](https://github.com/biomejs/biome/pull/12716) [`ae535ea`](https://github.com/biomejs/biome/commit/ae535ea552eb7afb7f0ececaa9124e6f1449f39d) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useVueConsistentBooleanPropStyle`](https://biomejs.dev/linter/rules/use-vue-consistent-boolean-prop-style/), which enforces a consistent style for Vue component props set to `true`. By default, it requires the shorthand form; the `style` option can require the longhand form instead.
  393. ```vue
  394. <template>
  395. <MyComponent :disabled="true" />
  396. </template>
  397. ```
  398. - [#12675](https://github.com/biomejs/biome/pull/12675) [`2a16d59`](https://github.com/biomejs/biome/commit/2a16d59c3ea4e4875b2b3dd9c79bba4055442fcc) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useVueConsistentDefineEmitsDeclaration`](https://biomejs.dev/linter/rules/use-vue-consistent-define-emits-declaration/), which enforces one declaration style for `defineEmits` in `<script setup lang="ts">`. By default, events must be declared with a type. The `style` option can instead require each event to be a property of that type, such as `change: [id: number]`, or require an argument, such as `defineEmits(["change"])`.
  399. ```vue
  400. <script setup lang="ts">
  401. const emit = defineEmits(["change", "update"]);
  402. </script>
  403. ```
  404. - [#12612](https://github.com/biomejs/biome/pull/12612) [`ab53e4f`](https://github.com/biomejs/biome/commit/ab53e4f8285461ffe1dbd471ec760f38b3b5c99e) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueConsistentPropNameCasing`](https://biomejs.dev/linter/rules/use-vue-consistent-prop-name-casing/), which requires prop names in Vue components to use one casing style. By default, prop names must be in camelCase. The `casing` option switches the rule to snake_case.
  405. ```vue
  406. <script setup>
  407. defineProps({
  408. greeting_text: String,
  409. });
  410. </script>
  411. ```
  412. - [#12608](https://github.com/biomejs/biome/pull/12608) [`0928a75`](https://github.com/biomejs/biome/commit/0928a7512f78f2149ed91cb6d3d7929aa757ad93) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueConsistentVForDelimiter`](https://biomejs.dev/linter/rules/use-vue-consistent-v-for-delimiter/), which requires the same word, `in` or `of`, between the item and the list in every Vue `v-for` directive. The default is `in`, and the `delimiter` option switches it to `of`.
  413. ```vue
  414. <!-- reported by default -->
  415. <div v-for="item of items"></div>
  416. ```
  417. - [#12611](https://github.com/biomejs/biome/pull/12611) [`d2df495`](https://github.com/biomejs/biome/commit/d2df495cd5424cfe5cdcd2f589d777479dc8d37f) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueConsistentVSlotStyle`](https://biomejs.dev/linter/rules/use-vue-consistent-v-slot-style/), which enforces one style for Vue slots: `#name`, `v-slot:name`, or `v-slot` for the default slot. By default, it expects `v-slot` on a component and `#` on `<template>` elements.
  418. ```vue
  419. <template>
  420. <MyComponent>
  421. <template v-slot:header>Title</template>
  422. </MyComponent>
  423. </template>
  424. ```
  425. - [#12780](https://github.com/biomejs/biome/pull/12780) [`69467e0`](https://github.com/biomejs/biome/commit/69467e0e9c67e97c8806f5ca417e66d149682557) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueDefaultExport`](https://biomejs.dev/linter/rules/use-vue-default-export/), which reports a `<script>` block of a Vue component that has no default export, when the file has no `<script setup>` block.
  426. ```vue
  427. <script>
  428. const foo = "foo";
  429. </script>
  430. ```
  431. - [#12655](https://github.com/biomejs/biome/pull/12655) [`8a576b4`](https://github.com/biomejs/biome/commit/8a576b49b633c69d5bdcf616e0647f5db5123f84) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueDefaultProp`](https://biomejs.dev/linter/rules/use-vue-default-prop/), which reports optional props of Vue components that have no default value. Props that only accept `Boolean` are not reported.
  432. For example, the following component doesn't say what `size` is when a parent component leaves it out:
  433. ```vue
  434. <script setup>
  435. defineProps({
  436. size: Number,
  437. });
  438. </script>
  439. ```
  440. - [#12676](https://github.com/biomejs/biome/pull/12676) [`530000a`](https://github.com/biomejs/biome/commit/530000adb37b76145aaede97e609cc37ed7a0549) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueEmitValidator`](https://biomejs.dev/linter/rules/use-vue-emit-validator/), which requires a validator function for each event declared in the `emits` option or in `defineEmits()`.
  441. ```vue
  442. <script setup>
  443. // Reported: the event "change" has no validator function.
  444. defineEmits(["change"]);
  445. </script>
  446. ```
  447. - [#12605](https://github.com/biomejs/biome/pull/12605) [`093c7ca`](https://github.com/biomejs/biome/commit/093c7ca849828ceb3011a72e4f1dcdce6bf3f769) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useVueEmitsValidatorReturn`](https://biomejs.dev/linter/rules/use-vue-emits-validator-return/), which reports Vue event validators that never return a true value. Vue prints a warning in development mode each time such an event is emitted.
  448. ```vue
  449. <script setup>
  450. defineEmits({
  451. submit(payload) {
  452. payload.email.includes("@");
  453. },
  454. });
  455. </script>
  456. ```
  457. - [#12668](https://github.com/biomejs/biome/pull/12668) [`1690307`](https://github.com/biomejs/biome/commit/1690307ef07f2886ba2874c2c860c536b2e28e82) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useVueMacroVariableName`](https://biomejs.dev/linter/rules/use-vue-macro-variable-name/), which requires specific variable names for the results of `defineProps()`, `defineEmits()`, `defineSlots()`, `useSlots()` and `useAttrs()` in Vue `<script setup>` blocks. The names can be changed with the rule's options.
  458. ```vue
  459. <script setup>
  460. const propsDefined = defineProps({ msg: String }); // reported, should be `props`
  461. </script>
  462. ```
  463. - [#12773](https://github.com/biomejs/biome/pull/12773) [`8f28e3f`](https://github.com/biomejs/biome/commit/8f28e3f8aceb4af7004813ec330e8fa284ad56a6) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueOneComponentPerFile`](https://biomejs.dev/linter/rules/use-vue-one-component-per-file/), which reports files that define more than one Vue component. The rule counts `<script setup>` blocks, `export default { ... }` in `.vue` files, and `defineComponent()` and `createApp()` calls that define a component in place with an options object or a setup function. It doesn't report the main component of a `.vue` file.
  464. ```vue
  465. <script setup>
  466. import { defineComponent, h } from "vue";
  467. const Badge = defineComponent({
  468. render: () => h("span", "New"),
  469. });
  470. </script>
  471. ```
  472. - [#12571](https://github.com/biomejs/biome/pull/12571) [`a357b2f`](https://github.com/biomejs/biome/commit/a357b2fef2acc86bf0032c9530fed5f220b1f890) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useVuePropTypeConstructor`](https://biomejs.dev/linter/rules/use-vue-prop-type-constructor/), which reports Vue prop types that aren't constructors, such as a type name written as a string.
  473. ```vue
  474. <script>
  475. export default {
  476. props: {
  477. size: 'Number', // reported, use `Number` instead
  478. },
  479. };
  480. </script>
  481. ```
  482. - [#12566](https://github.com/biomejs/biome/pull/12566) [`e69572b`](https://github.com/biomejs/biome/commit/e69572b6fd7130ebd1ae060590d8459495b71c71) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueRenderReturn`](https://biomejs.dev/linter/rules/use-vue-render-return/), which requires the `render` function of a Vue component to return a value on every path.
  483. The following example is invalid because the `render` function returns nothing when `this.visible` is `false`:
  484. ```vue
  485. <script>
  486. import { h } from "vue";
  487. export default {
  488. render() {
  489. if (this.visible) {
  490. return h("div", "hello");
  491. }
  492. },
  493. };
  494. </script>
  495. ```
  496. - [#12619](https://github.com/biomejs/biome/pull/12619) [`3703a36`](https://github.com/biomejs/biome/commit/3703a3673c38795523dab25856f1ef2fb3b75e80) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueSeparateStaticClass`](https://biomejs.dev/linter/rules/use-vue-separate-static-class/), which reports class names in a Vue `:class` binding that always apply, such as `header` in `<div :class="['header', theme]">`. These classes belong in the plain `class` attribute.
  497. - [#12677](https://github.com/biomejs/biome/pull/12677) [`f6b7f15`](https://github.com/biomejs/biome/commit/f6b7f15f86e9832e83a07cce4555139484ce910f) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueSingleEventPayload`](https://biomejs.dev/linter/rules/use-vue-single-event-payload/), which reports Vue component events that are emitted or declared with more than one value. A listener written inline in a template, such as `@change="onChange($event)"`, only receives the first value.
  498. ```vue
  499. <script setup>
  500. const emit = defineEmits(["change"]);
  501. emit("change", value, extra);
  502. </script>
  503. ```
  504. - [#12646](https://github.com/biomejs/biome/pull/12646) [`3d92356`](https://github.com/biomejs/biome/commit/3d9235693dff24df2ac25fd70cff00ab02b538d2) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useVueSlotNameCasing`](https://biomejs.dev/linter/rules/use-vue-slot-name-casing/), which enforces a consistent casing for the names of `<slot>` elements in Vue templates. Slot names must be in camelCase by default. The `casing` option can require kebab-case or a single lowercase word instead.
  505. ```vue
  506. <template>
  507. <slot name="foo-bar" />
  508. </template>
  509. ```
  510. - [#12572](https://github.com/biomejs/biome/pull/12572) [`cb16268`](https://github.com/biomejs/biome/commit/cb16268813469cc3443833aacfe9271e78589589) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueSlotsAsFunctions`](https://biomejs.dev/linter/rules/use-vue-slots-as-functions/), which reports slots in `this.$slots` that are used as their content instead of being called. In Vue 3, each slot is a function that returns its content.
  511. ```js
  512. export default {
  513. render() {
  514. return this.$slots.default.filter(isVisible); // reported
  515. },
  516. };
  517. ```
  518. - [#12659](https://github.com/biomejs/biome/pull/12659) [`e7691f7`](https://github.com/biomejs/biome/commit/e7691f70def50a26cd47cd8d23a26d3b1efdd3b6) Thanks [@Object,](https://github.com/Object,)! - Added the new nursery rule [`useVueTypedObjectProps`](https://biomejs.dev/linter/rules/use-vue-typed-object-props/), which reports Vue props declared with `Object` or `Array` without a TypeScript type in TypeScript files and Vue files with `<script lang="ts">`.
  519. ```vue
  520. <script setup lang="ts">
  521. defineProps({
  522. // reported
  523. items: Array as PropType<string[]>,
  524. });
  525. </script>
  526. ```
  527. - [#12574](https://github.com/biomejs/biome/pull/12574) [`bb8ca38`](https://github.com/biomejs/biome/commit/bb8ca38c284a3a491c110e02d1f90f767826ca32) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueValidAttributeName`](https://biomejs.dev/linter/rules/use-vue-valid-attribute-name/), which reports invalid attribute names in Vue templates, including names bound with `v-bind`. Attributes on components aren't checked.
  528. ```vue
  529. <template>
  530. <p 0abc :-def="value"></p>
  531. </template>
  532. ```
  533. - [#12582](https://github.com/biomejs/biome/pull/12582) [`f6ac8eb`](https://github.com/biomejs/biome/commit/f6ac8ebf370df78630beea575e190581a87cacb8) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueValidDefaultProp`](https://biomejs.dev/linter/rules/use-vue-valid-default-prop/), which requires the default value of a Vue prop to match the type of the prop. Default objects and arrays must also be returned from a function, so that each component instance gets its own copy.
  534. ```vue
  535. <script>
  536. export default {
  537. props: {
  538. count: { type: Number, default: "zero" }, // reported
  539. items: { type: Array, default: [] }, // reported
  540. },
  541. };
  542. </script>
  543. ```
  544. - [#12613](https://github.com/biomejs/biome/pull/12613) [`071324d`](https://github.com/biomejs/biome/commit/071324d0e3d836fb17a871c1a8d12f4073f77117) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`useVueValidDefineOptions`](https://biomejs.dev/linter/rules/use-vue-valid-define-options/), which reports invalid calls to Vue's `defineOptions()` macro in `<script setup>`. It reports a call that is repeated, that has no options or has type arguments, that declares `props`, `emits`, `expose`, or `slots`, or that uses variables declared in `<script setup>`.
  545. ```vue
  546. <script setup>
  547. const options = { name: "Foo" };
  548. defineOptions(options);
  549. </script>
  550. ```
  551. - [#12557](https://github.com/biomejs/biome/pull/12557) [`f1eb303`](https://github.com/biomejs/biome/commit/f1eb30335182a413b85e7463aabfe56fd16f2f3d) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`useVueValidNextTick`](https://biomejs.dev/linter/rules/use-vue-valid-next-tick/), which reports Vue `nextTick` calls that don't wait for Vue to update the page. The rule is recommended and part of the Vue domain.
  552. ```js
  553. import { nextTick } from "vue";
  554. nextTick(); // reported: the Promise is ignored
  555. nextTick.then(callback); // reported: `nextTick` isn't called
  556. ```
  557. - [#12674](https://github.com/biomejs/biome/pull/12674) [`361c9f2`](https://github.com/biomejs/biome/commit/361c9f259b3f91565adc93f01e310d61a0ab615e) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#12672](https://github.com/biomejs/biome/issues/12672): Astro and Svelte formatting now preserves comments and whitespace inside preformatted elements such as `<pre>` and `<textarea>`.
  558. ```diff
  559. -<pre><code>Hello</code></pre>
  560. +<pre>
  561. + <!-- hello -->
  562. + <code>Hello</code>
  563. +</pre>
  564. ```
  565. - [#12746](https://github.com/biomejs/biome/pull/12746) [`2ebd7b6`](https://github.com/biomejs/biome/commit/2ebd7b6e70159e1f91c09f965a229321e0a8c56d) Thanks [@ematipico](https://github.com/ematipico)! - Improved [#2730](https://github.com/biomejs/biome/issues/2730): Biome now reports the active analyzer rule and source range when a rule panics, and suggests disabling the rule as a workaround.
  566. - [#12758](https://github.com/biomejs/biome/pull/12758) [`1df6d85`](https://github.com/biomejs/biome/commit/1df6d855ef2bcc97107a83ec3cca43e10b72a178) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#12739](https://github.com/biomejs/biome/issues/12739), [#12741](https://github.com/biomejs/biome/issues/12741), and [#12742](https://github.com/biomejs/biome/issues/12742): the Markdown formatter now adds a blank line between a top-level paragraph and a header, fenced code block, list, or blockquote that directly follows it, matching Prettier.
  567. ```diff
  568. Some text:
  569. +
  570. - bullet 1
  571. - bullet 2
  572. ```
  573. - [#12806](https://github.com/biomejs/biome/pull/12806) [`03261de`](https://github.com/biomejs/biome/commit/03261decbca0380a9fc334c890732030b1a2308d) Thanks [@Jayllyz](https://github.com/Jayllyz)! - Added the nursery rule [`useTanstackQueryInfiniteQueryPropertyOrder`](https://biomejs.dev/linter/rules/use-tanstack-query-infinite-query-property-order/), which enforces the order `queryFn`, `getPreviousPageParam`, `getNextPageParam` in the options of TanStack Query infinite queries. TanStack Query infers types from this order.
  574. ```js
  575. import { useInfiniteQuery } from "@tanstack/react-query";
  576. useInfiniteQuery({
  577. getNextPageParam: (lastPage) => lastPage.nextId,
  578. queryFn: ({ pageParam }) => fetchProjects(pageParam),
  579. });
  580. ```
  581. - [#12762](https://github.com/biomejs/biome/pull/12762) [`69187a9`](https://github.com/biomejs/biome/commit/69187a9f5276f9bdc9b0087d898e4e3b544eafbb) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#12738](https://github.com/biomejs/biome/issues/12738): the Markdown formatter now collapses consecutive blank lines between blocks into a single blank line.
  582. ```diff
  583. Some paragraph.
  584. -
  585. -
  586. ## Next section
  587. ```
  588. - [#12708](https://github.com/biomejs/biome/pull/12708) [`e87ec37`](https://github.com/biomejs/biome/commit/e87ec37e9c1737f44b6e2bcb6f7bf9fbc08e92c2) Thanks [@nhedger](https://github.com/nhedger)! - Fixed `.editorconfig` section globs that skipped the character following a bracket expression. For example, `[{[ab],c}.json]` now matches `a.json`, `b.json`, and `c.json`.
  589. - [#11623](https://github.com/biomejs/biome/pull/11623) [`37440f9`](https://github.com/biomejs/biome/commit/37440f93d22f2b7a9f41a0b6b55679efff0e457d) Thanks [@Bsibz](https://github.com/Bsibz)! - Fixed [#11548](https://github.com/biomejs/biome/issues/11548): The `typeMember` selector of [`useNamingConvention`](https://biomejs.dev/linter/rules/use-naming-convention) no longer applies to TypeScript type parameters.
  590. - [#12106](https://github.com/biomejs/biome/pull/12106) [`ff1d8b8`](https://github.com/biomejs/biome/commit/ff1d8b805d4ac09a78dbf306c5e972f055a3ee75) Thanks [@dyc3](https://github.com/dyc3)! - Added the nursery rule [`noExcessiveNestedBlocks`](https://biomejs.dev/linter/rules/no-excessive-nested-blocks/), which reports blocks nested deeper than the configured maximum (4 by default). It checks `if`, `switch`, `try`, and loop statements in JavaScript, and nested rules and at-rules in CSS.
  591. - [#12747](https://github.com/biomejs/biome/pull/12747) [`397b0eb`](https://github.com/biomejs/biome/commit/397b0eb28ca9d5a5eadc552d0a81b45540611d79) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [#8094](https://github.com/biomejs/biome/issues/8094): Biome's language server now skips unchanged dynamic capability registrations, preventing duplicate watched-file notifications in affected editors.
  592. - [#12708](https://github.com/biomejs/biome/pull/12708) [`e87ec37`](https://github.com/biomejs/biome/commit/e87ec37e9c1737f44b6e2bcb6f7bf9fbc08e92c2) Thanks [@nhedger](https://github.com/nhedger)! - Fixed [#12683](https://github.com/biomejs/biome/issues/12683): `.editorconfig` section globs with nested braces, such as `[{*.{js,json},biome.jsonc}]`, are now supported instead of being ignored.
  593. - [#12910](https://github.com/biomejs/biome/pull/12910) [`6f8313d`](https://github.com/biomejs/biome/commit/6f8313d5da4776544cdefa07f409125100d31c11) Thanks [@dyc3](https://github.com/dyc3)! - Fixed a slowdown in `biome lint`, `biome check` and `biome format` that grew with the number of files: looking up an open file took longer after every file Biome had already processed. Large projects are processed faster again.
  594. - [#12787](https://github.com/biomejs/biome/pull/12787) [`53c3a49`](https://github.com/biomejs/biome/commit/53c3a4979c0ad3f530de0fb23f7a00a1d2125bfc) Thanks [@dyc3](https://github.com/dyc3)! - Fixed the GritQL formatter treating a single line break between list items as a blank line. Formatting a broken list no longer adds blank lines between its items, and blank lines from the source are still kept.
  595. ```diff
  596. $x <: [
  597. - `1`,
  598. -
  599. - `2`,
  600. + `1`, `2`,
  601. `3`
  602. ]
  603. ```
  604. - [#12864](https://github.com/biomejs/biome/pull/12864) [`c2c2590`](https://github.com/biomejs/biome/commit/c2c259089211ad0628105779650ee366f7994958) Thanks [@nhedger](https://github.com/nhedger)! - Fixed [#12862](https://github.com/biomejs/biome/issues/12862): Biome now applies the options under the top-level `grit` configuration key. Previously, options such as `grit.formatter.lineWidth` and `grit.formatter.enabled` were ignored, and Grit files were formatted with the global `formatter` settings.
  605. - [#12543](https://github.com/biomejs/biome/pull/12543) [`0ec0a72`](https://github.com/biomejs/biome/commit/0ec0a72238832324009db81722cb1d80fb164ad0) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [`noVueUndeclaredDirectives`](https://biomejs.dev/linter/rules/no-vue-undeclared-directives/) not reporting undeclared custom directives in components that export their options with `export { options as default }`.
  606. ```vue
  607. <script>
  608. const options = {};
  609. export { options as default };
  610. </script>
  611. <template>
  612. <div v-highlight></div>
  613. </template>
  614. ```
  615. - [#12745](https://github.com/biomejs/biome/pull/12745) [`86be8b8`](https://github.com/biomejs/biome/commit/86be8b84db6218cb3d89c0cfabc4f97388d9beb5) Thanks [@vidigoat](https://github.com/vidigoat)! - Fixed the formatter removing the parentheses that end an optional chain when a non-null assertion, type arguments or more parentheses follow them. The output either short-circuited the rest of the chain, as in `a?.b!.c` for `(a?.b)!.c`, or didn't parse, as with `new a?.b!()`, a template tag or an assignment target.
  616. ```diff
  617. - a?.b!.c;
  618. + (a?.b)!.c;
  619. - new a?.b!();
  620. + new (a?.b)!();
  621. - a?.b`template`;
  622. + (a?.b)`template`;
  623. ```
  624. - [#12821](https://github.com/biomejs/biome/pull/12821) [`44626ba`](https://github.com/biomejs/biome/commit/44626baf6ae2eb75d4fd5ab47a055ab6df2dad5a) Thanks [@Suto-Michimasa](https://github.com/Suto-Michimasa)! - Fixed [#12820](https://github.com/biomejs/biome/issues/12820): [`usePlaywrightValidDescribeCallback`](https://biomejs.dev/linter/rules/use-playwright-valid-describe-callback/) no longer reports an anonymous `test.describe(callback)` as a missing callback.
  625. ```js
  626. test.describe(() => {
  627. test.use({ colorScheme: "dark" });
  628. });
  629. ```
  630. - [#12819](https://github.com/biomejs/biome/pull/12819) [`b620cbc`](https://github.com/biomejs/biome/commit/b620cbceed195542cb3c051f265e1f9e043a3749) Thanks [@Suto-Michimasa](https://github.com/Suto-Michimasa)! - Fixed [#12766](https://github.com/biomejs/biome/issues/12766): [`usePlaywrightValidDescribeCallback`](https://biomejs.dev/linter/rules/use-playwright-valid-describe-callback/) no longer reports `test.describe(title, details, callback)`. The rule now validates the last argument as the callback, as the original ESLint rule does.
  631. ```js
  632. test.describe("suite", { tag: "@smoke" }, () => {});
  633. ```
  634. - [#12898](https://github.com/biomejs/biome/pull/12898) [`291f034`](https://github.com/biomejs/biome/commit/291f03479144607ca337605711c995af9d652498) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#12882](https://github.com/biomejs/biome/issues/12882): the Tailwind class parser no longer reports a parse error for unknown utilities with a dashed name and an arbitrary value or a CSS variable, such as `foo-bar-[1px]` or `foo-bar-(--my-var)`. [`useTailwindSortedClasses`](https://biomejs.dev/linter/rules/use-tailwind-sorted-classes/) sorts these classes first, like other unknown classes.
  635. - [#12639](https://github.com/biomejs/biome/pull/12639) [`bd19436`](https://github.com/biomejs/biome/commit/bd19436c94ae8bae276610c9e75bdfc9d2af4b7b) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#12623](https://github.com/biomejs/biome/issues/12623): the safe fix of [`useConsistentTestIt`](https://biomejs.dev/linter/rules/use-consistent-test-it/) no longer leaves an unused import when applied to every call in a file. When all calls to an imported test function are renamed, the import is now replaced with an alias, such as `test as it`, instead of keeping the original specifier. When the original specifier is kept, the alias is now added as `test, test as it` instead of `test , test as it`.
  636. - [#12870](https://github.com/biomejs/biome/pull/12870) [`378798f`](https://github.com/biomejs/biome/commit/378798f2a26a2ad66b879669df06b2c5718b7615) Thanks [@dyc3](https://github.com/dyc3)! - Improved the performance of grit plugins that use regexes.
  637. - [#12769](https://github.com/biomejs/biome/pull/12769) [`6d23980`](https://github.com/biomejs/biome/commit/6d239806a8c851dc1f309f0d283e7cd418c274fe) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [#12757](https://github.com/biomejs/biome/issues/12757): the Markdown formatter no longer turns an indented paragraph line that starts with `-`, `1.`, `#`, or `>` into a list, heading, or blockquote. Such a line now joins the previous line, matching Prettier.
  638. ```diff
  639. -- Item
  640. - - Nested item
  641. +- Item - Nested item
  642. continuation line
  643. ```
  644. - [#12737](https://github.com/biomejs/biome/pull/12737) [`162ed76`](https://github.com/biomejs/biome/commit/162ed76924abe28d4620a627ce54965e9845bd73) Thanks [@xgbtxy](https://github.com/xgbtxy)! - Fixed [#12726](https://github.com/biomejs/biome/issues/12726): [`useMathMinMax`](https://biomejs.dev/linter/rules/use-math-min-max/) now recognizes directly listed nonnumeric elements in array reductions, such as `["foo", "bar"].reduce((a, b) => a > b ? a : b)`. This also covers Date values and local constant arrays used only by reductions, including parentheses and TypeScript assertions. Spread elements and other unclassified inputs retain their existing behavior.
  645. - [#12782](https://github.com/biomejs/biome/pull/12782) [`44d6768`](https://github.com/biomejs/biome/commit/44d6768a2a195a06a7b092cd57916175744a4d8b) Thanks [@dyc3](https://github.com/dyc3)! - Added the new nursery rule [`noInvalidRemoveEventListener`](https://biomejs.dev/linter/rules/no-invalid-remove-event-listener/), which reports calls to `removeEventListener()` that pass an inline function or the result of `.bind()`. These create a new function, so the listener that was added is never removed.
  646. ```js
  647. window.removeEventListener("click", listener.bind(window));
  648. ```
  649. - [#12858](https://github.com/biomejs/biome/pull/12858) [`b312e95`](https://github.com/biomejs/biome/commit/b312e95f21a887fccd5fd50926ad172a00726d32) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#12851](https://github.com/biomejs/biome/issues/12851): a plugin that throws or fails to run now reports an error diagnostic instead of an info diagnostic, so `biome lint` and `biome check` exit with a non-zero code.
  650. - [#12813](https://github.com/biomejs/biome/pull/12813) [`a55d360`](https://github.com/biomejs/biome/commit/a55d360354cd727080aa45eb51dc28016f6777cc) Thanks [@dyc3](https://github.com/dyc3)! - Improved the performance of JavaScript plugins that read `node.kind` or `token.kind`.
  651. - [#12913](https://github.com/biomejs/biome/pull/12913) [`4ada6fc`](https://github.com/biomejs/biome/commit/4ada6fc89522bc60fcfb1b29b671977d98e9da97) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#12909](https://github.com/biomejs/biome/issues/12909): Biome no longer crashes with an access violation when formatting, linting or checking files on Windows ARM64.
  652. - [#12443](https://github.com/biomejs/biome/pull/12443) [`cccbc03`](https://github.com/biomejs/biome/commit/cccbc0360f99f37613391f7907741c6dfcc4a3a6) Thanks [@dyc3](https://github.com/dyc3)! - Fixed the code fixes of [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/), [`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/), and [`noVueDataObjectDeclaration`](https://biomejs.dev/linter/rules/no-vue-data-object-declaration/) duplicating comments attached to the wrapped expression. For example, the `noFloatingPromises` fix for an array of promises preceded by a comment no longer copies that comment into `Promise.all(...)`.
  653. - [#12769](https://github.com/biomejs/biome/pull/12769) [`6d23980`](https://github.com/biomejs/biome/commit/6d239806a8c851dc1f309f0d283e7cd418c274fe) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [#12768](https://github.com/biomejs/biome/issues/12768): the Markdown formatter no longer splits a blockquote in two when an empty `>` line separates its list items.
  654. ```diff
  655. > - one
  656. > - two
  657. -
  658. +>
  659. > - three
  660. ```
  661. - [#12769](https://github.com/biomejs/biome/pull/12769) [`6d23980`](https://github.com/biomejs/biome/commit/6d239806a8c851dc1f309f0d283e7cd418c274fe) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [#12767](https://github.com/biomejs/biome/issues/12767): the Markdown formatter no longer moves a list item out of a blockquote when the item follows a nested list item. The formatter also keeps the `>` of a line that directly follows a list inside a blockquote and starts a nested blockquote, a heading, or a different list.
  662. ```diff
  663. > - one
  664. > - nested
  665. - - two
  666. +> - two
  667. ```
  668. - [#12769](https://github.com/biomejs/biome/pull/12769) [`6d23980`](https://github.com/biomejs/biome/commit/6d239806a8c851dc1f309f0d283e7cd418c274fe) Thanks [@ematipico](https://github.com/ematipico)! - Fixed [#12703](https://github.com/biomejs/biome/issues/12703): the Markdown formatter no longer indents the empty `>` line between a list and a paragraph in a blockquote. Formatting again no longer moves the paragraph out of the quote.
  669. ```diff
  670. > - item one
  671. > continued.
  672. - >
  673. +>
  674. > Paragraph line one
  675. > line two.
  676. ```
  677. - [#12465](https://github.com/biomejs/biome/pull/12465) [`5127af1`](https://github.com/biomejs/biome/commit/5127af14387870e242ac3e5070bee4796c07783c) Thanks [@Th3S4mur41](https://github.com/Th3S4mur41)! - Expanded [`useLogicalProperties`](https://biomejs.dev/linter/rules/use-logical-properties) to report multi-value physical shorthands and logical longhand pairs that can be combined. Dynamic shorthands such as `padding: var(--spacing) 2px` are also reported without an automatic fix because the variable may supply multiple values.
  678. ---
  679. - [#12860](https://github.com/biomejs/biome/pull/12860) [`31f1820`](https://github.com/biomejs/biome/commit/31f1820c01f3f27c70a5b2f985665867222713b5) Thanks [@vibbix](https://github.com/vibbix)! - Fixed the SCSS formatter joining comma-separated multi-value declarations onto one line. SCSS now prints them one value per line, as the CSS formatter and Prettier do.
  680. ```diff
  681. .a {
  682. - transition: opacity 1s, color 2s;
  683. + transition:
  684. + opacity 1s,
  685. + color 2s;
  686. }
  687. ```
  688. - [#12868](https://github.com/biomejs/biome/pull/12868) [`ac70a85`](https://github.com/biomejs/biome/commit/ac70a85ff9bb3f597010c687f94cf115ba52769a) Thanks [@dyc3](https://github.com/dyc3)! - Added `node.descendants(kinds)` and `node.walk(kinds, enter, exit)` to JavaScript plugins. They find the nodes inside a node whose kind is in a set created with `nodeKinds()`, and are much faster than visiting every node with `node.children()`.
  689. ```js
  690. const CALLS = nodeKinds("JS_CALL_EXPRESSION");
  691. for (const call of root.descendants(CALLS)) {
  692. registerDiagnostic(call, "information", "Found a call.");
  693. }
  694. ```
  695. - [#12786](https://github.com/biomejs/biome/pull/12786) [`126c172`](https://github.com/biomejs/biome/commit/126c172049c69167d70977f1b6de8b1c7fb47de7) Thanks [@dyc3](https://github.com/dyc3)! - Added the `allowBlackAndWhite` option to [`noTailwindRawColors`](https://biomejs.dev/linter/rules/no-tailwind-raw-colors/). It defaults to `true`. When set to `false`, the rule also reports classes that use `black` or `white`, such as `bg-white` and `text-black/50`, and suggests similar colors from your theme when `tailwind.stylesheet` is set.
  696. ```json
  697. { "options": { "allowBlackAndWhite": false } }
  698. ```
  699. - [#12754](https://github.com/biomejs/biome/pull/12754) [`a00eb5a`](https://github.com/biomejs/biome/commit/a00eb5a2227eebd9b6b0ce0f847a9398eea62567) Thanks [@dyc3](https://github.com/dyc3)! - Fixed [#12724](https://github.com/biomejs/biome/issues/12724): when `proseWrap` is `"always"` or `"never"`, the Markdown formatter now wraps the text inside emphasis, strong emphasis, and strikethrough like the surrounding prose, instead of keeping their source line breaks and forcing line breaks around them. Text inside block quotes keeps its current formatting. With a `lineWidth` of 50:
  700. ```diff
  701. - Some words before the strong text,
  702. - **stop and tell
  703. - them**
  704. - after the strong text.
  705. + Some words before the strong text, **stop and tell
  706. + them** after the strong text.
  707. ```
  708. - [#12708](https://github.com/biomejs/biome/pull/12708) [`e87ec37`](https://github.com/biomejs/biome/commit/e87ec37e9c1737f44b6e2bcb6f7bf9fbc08e92c2) Thanks [@nhedger](https://github.com/nhedger)! - Fixed `.editorconfig` section globs with unbalanced braces. As in the EditorConfig reference implementation, all braces in such a glob are now matched literally, so `[{a,b}}.json]` only matches a file named `{a,b}}.json`.
  709. ## What's Changed
  710. * feat(lint): add useVueConsistentDefineEmitsDeclaration by @dyc3 in https://github.com/biomejs/biome/pull/12675
  711. * feat(lint): add tests for logical shorthands and longhands by @Th3S4mur41 in https://github.com/biomejs/biome/pull/12465
  712. * refactor: use our parser for rule docs by @ematipico in https://github.com/biomejs/biome/pull/12744
  713. * feat(deserialize): yaml by @ematipico in https://github.com/biomejs/biome/pull/12064
  714. * feat(analyzer): panic handler by @ematipico in https://github.com/biomejs/biome/pull/12746
  715. * fix(deps): bump libz-sys to 1.1.31 (RUSTSEC-2026-0418) by @nhedger in https://github.com/biomejs/biome/pull/12750
  716. * fix(lint): skip nonnumeric reductions in useMathMinMax by @xgbtxy in https://github.com/biomejs/biome/pull/12737
  717. * fix(format/md): fix various missing empty lines bugs by @dyc3 in https://github.com/biomejs/biome/pull/12758
  718. * fix(format/js): keep the parens that end an optional chain before `!`, type arguments or more parens by @vidigoat in https://github.com/biomejs/biome/pull/12745
  719. * fix(lsp): dynamic capability registration by @ematipico in https://github.com/biomejs/biome/pull/12747
  720. * fix(editorconfig): support nested brace alternates in section globs by @nhedger in https://github.com/biomejs/biome/pull/12708
  721. * fix(format/md): collapse consecutive blank lines between blocks by @dyc3 in https://github.com/biomejs/biome/pull/12762
  722. * fix(md/fmt): quote blocks and lists by @ematipico in https://github.com/biomejs/biome/pull/12769
  723. * chore: fix formatting in some of our readmes by @dyc3 in https://github.com/biomejs/biome/pull/12774
  724. * feat(lint): add useVueValidNextTick by @dyc3 in https://github.com/biomejs/biome/pull/12557
  725. * feat(lint): add noPseudoElementInFunctionalPseudoClass by @vibbix in https://github.com/biomejs/biome/pull/12388
  726. * feat(lint): add noMissingScssInterpolation by @vibbix in https://github.com/biomejs/biome/pull/12342
  727. * chore: add oxlint rule source by @dyc3 in https://github.com/biomejs/biome/pull/12784
  728. * feat(lint): add useTailwindVariablesShorthand by @dyc3 in https://github.com/biomejs/biome/pull/12290
  729. * feat(lint): add noVueVForTemplateKeyOnChild by @dyc3 in https://github.com/biomejs/biome/pull/12522
  730. * feat(lint): add noVueLoneTemplate by @dyc3 in https://github.com/biomejs/biome/pull/12666
  731. * feat(lint): add noVueDeprecatedSlotScope by @dyc3 in https://github.com/biomejs/biome/pull/12634
  732. * feat(lint): add useVueRenderReturn by @dyc3 in https://github.com/biomejs/biome/pull/12566
  733. * fix(js/useNamingconvention): prevent typeMember from matching type parameters by @Bsibz in https://github.com/biomejs/biome/pull/11623
  734. * feat(rules_check): build vue semantic models and use them by @dyc3 in https://github.com/biomejs/biome/pull/12535
  735. * feat(lint): add useVueValidDefineOptions by @dyc3 in https://github.com/biomejs/biome/pull/12613
  736. * feat(lint): add useVueSlotNameCasing by @dyc3 in https://github.com/biomejs/biome/pull/12646
  737. * feat(lint): add noVueMixin by @dyc3 in https://github.com/biomejs/biome/pull/12533
  738. * feat(lint): add noVueUndeclaredEmits by @dyc3 in https://github.com/biomejs/biome/pull/12601
  739. * feat(lint): add noVueDeprecatedPropsDefaultThis by @dyc3 in https://github.com/biomejs/biome/pull/12604
  740. * feat(lint): add noVueRestrictedCallAfterAwait by @dyc3 in https://github.com/biomejs/biome/pull/12517
  741. * feat(lint): add noVueDeprecatedModelDefinition by @dyc3 in https://github.com/biomejs/biome/pull/12617
  742. * refactor(noVueUndeclaredDirectives): use vue semantic model by @dyc3 in https://github.com/biomejs/biome/pull/12543
  743. * feat(lint): add noVueDeprecatedConfigKeyCodes by @dyc3 in https://github.com/biomejs/biome/pull/12616
  744. * perf(plugins/js): strings emitted by the `.kind` property are now static by @dyc3 in https://github.com/biomejs/biome/pull/12813
  745. * chore: correct wording in changelog by @dyc3 in https://github.com/biomejs/biome/pull/12839
  746. * feat(lint): add useAccessorPairs by @dyc3 in https://github.com/biomejs/biome/pull/12516
  747. * feat(lint): add noDynamicDelete by @dyc3 in https://github.com/biomejs/biome/pull/12547
  748. * feat(lint): add noUselessTypeAssertion by @dyc3 in https://github.com/biomejs/biome/pull/12488
  749. * feat(lint): add noTanstackQueryVoidQueryFn by @dyc3 in https://github.com/biomejs/biome/pull/12515
  750. * feat(lint): add useTanstackQueryStableQueryClient by @dyc3 in https://github.com/biomejs/biome/pull/12518
  751. * feat(lint): add noVueRefObjectReactivityLoss by @dyc3 in https://github.com/biomejs/biome/pull/12564
  752. * feat(lint): add useVueComputedPropertyReturn by @dyc3 in https://github.com/biomejs/biome/pull/12563
  753. * feat(lint): add noVueRestrictedVOn by @dyc3 in https://github.com/biomejs/biome/pull/12558
  754. * feat(lint): add noVueDeprecatedInlineTemplate by @dyc3 in https://github.com/biomejs/biome/pull/12553
  755. * feat(lint): add noVueDeprecatedHtmlElementIs by @dyc3 in https://github.com/biomejs/biome/pull/12552
  756. * feat(lint): add noVueDeprecatedDestroyedLifecycle by @dyc3 in https://github.com/biomejs/biome/pull/12568
  757. * feat(lint): add useVuePropTypeConstructor by @dyc3 in https://github.com/biomejs/biome/pull/12571
  758. * chore: fix changeset attribution by @dyc3 in https://github.com/biomejs/biome/pull/12816
  759. * feat(lint): add noVueMultipleObjectsInClass by @dyc3 in https://github.com/biomejs/biome/pull/12658
  760. * feat(lint): add noVueThisInBeforeRouteEnter by @dyc3 in https://github.com/biomejs/biome/pull/12665
  761. * feat(lint): add noVueUndeclaredSlots by @dyc3 in https://github.com/biomejs/biome/pull/12657
  762. * feat(lint): add useVueDefaultProp by @dyc3 in https://github.com/biomejs/biome/pull/12655
  763. * feat(lint/js): add useTanstackQueryInfiniteQueryPropertyOrder by @Jayllyz in https://github.com/biomejs/biome/pull/12806
  764. * fix(lint): accept anonymous describe in usePlaywrightValidDescribeCallback by @Suto-Michimasa in https://github.com/biomejs/biome/pull/12821
  765. * fix(format/html): preserve comments in `<pre>` in astro and svelte files by @dyc3 in https://github.com/biomejs/biome/pull/12674
  766. * fix(useConsistentTestIt): don't leave an unused import after the safe fix by @dyc3 in https://github.com/biomejs/biome/pull/12639
  767. * feat(noTailwindRawColors): add allowBlackAndWhite option by @dyc3 in https://github.com/biomejs/biome/pull/12786
  768. * chore: update rule metadata by @dyc3 in https://github.com/biomejs/biome/pull/12847
  769. * feat(lint): add useSetSize by @dyc3 in https://github.com/biomejs/biome/pull/12778
  770. * fix(lint): keep comments once when code fixes wrap a node by @dyc3 in https://github.com/biomejs/biome/pull/12443
  771. * feat(lint): add noVueDeprecatedVBindSync by @dyc3 in https://github.com/biomejs/biome/pull/12589
  772. * feat(lint): add noVueDeprecatedVOnNativeModifier by @dyc3 in https://github.com/biomejs/biome/pull/12609
  773. * feat(lint): add noVueDeprecatedFunctionalTemplate by @dyc3 in https://github.com/biomejs/biome/pull/12590
  774. * feat(lint): add noVueUselessVBind by @dyc3 in https://github.com/biomejs/biome/pull/12592
  775. * feat(lint): add noVueTemplateKey by @dyc3 in https://github.com/biomejs/biome/pull/12573
  776. * feat(lint): add noVueDeprecatedEventsApi by @dyc3 in https://github.com/biomejs/biome/pull/12654
  777. * feat(lint): add noVueExcessiveProps by @dyc3 in https://github.com/biomejs/biome/pull/12667
  778. * feat(lint): add useVueTypedObjectProps by @dyc3 in https://github.com/biomejs/biome/pull/12659
  779. * feat(lint): add noVueDeprecatedSlotAttribute by @dyc3 in https://github.com/biomejs/biome/pull/12633
  780. * feat(lint): add useVueValidAttributeName by @dyc3 in https://github.com/biomejs/biome/pull/12574
  781. * feat(lint): add useVueBlockOrder by @dyc3 in https://github.com/biomejs/biome/pull/12650
  782. * feat(lint): add noVueChildContent by @dyc3 in https://github.com/biomejs/biome/pull/12632
  783. * feat(lint): add useVueValidDefaultProp by @dyc3 in https://github.com/biomejs/biome/pull/12582
  784. * feat(lint): add noVueUndeclaredProperties by @dyc3 in https://github.com/biomejs/biome/pull/12583
  785. * feat(lint): add noVueTemplateShadow by @dyc3 in https://github.com/biomejs/biome/pull/12629
  786. * feat(lint): add useVueEmitsValidatorReturn by @dyc3 in https://github.com/biomejs/biome/pull/12605
  787. * feat(lint): add noVueThisInTemplate by @dyc3 in https://github.com/biomejs/biome/pull/12620
  788. * feat(lint): add useVueConsistentVForDelimiter by @dyc3 in https://github.com/biomejs/biome/pull/12608
  789. * feat(lint): add useVueSlotsAsFunctions by @dyc3 in https://github.com/biomejs/biome/pull/12572
  790. * feat(lint): add useVueEmitValidator by @dyc3 in https://github.com/biomejs/biome/pull/12676
  791. * feat(lint): add useVueSingleEventPayload by @dyc3 in https://github.com/biomejs/biome/pull/12677
  792. * feat(lint): add useVueBooleanPropTypeFirst by @dyc3 in https://github.com/biomejs/biome/pull/12715
  793. * refactor(cli): read environment variables through an injectable source by @ematipico in https://github.com/biomejs/biome/pull/12427
  794. * feat(plugins/js): add tokenKinds and nodeKinds APIs by @dyc3 in https://github.com/biomejs/biome/pull/12812
  795. * fix(grit/fmt): don't treat a single line break in lists as a blank line by @dyc3 in https://github.com/biomejs/biome/pull/12787
  796. * fix(plugins/js): report plugin failures as errors by @dyc3 in https://github.com/biomejs/biome/pull/12858
  797. * fix(markdown_formatter): wrap emphasis content with surrounding prose by @dyc3 in https://github.com/biomejs/biome/pull/12754
  798. * fix(lint): accept details argument in usePlaywrightValidDescribeCallback by @Suto-Michimasa in https://github.com/biomejs/biome/pull/12819
  799. * fix(lint): multi-value declarations for SCSS don't match prettier by @vibbix in https://github.com/biomejs/biome/pull/12860
  800. * feat(lint): add useVueConsistentPropNameCasing by @dyc3 in https://github.com/biomejs/biome/pull/12612
  801. * feat(lint): add useVueConsistentVSlotStyle by @dyc3 in https://github.com/biomejs/biome/pull/12611
  802. * feat(lint): add useVueSeparateStaticClass by @dyc3 in https://github.com/biomejs/biome/pull/12619
  803. * feat(lint): add useVueMacroVariableName by @dyc3 in https://github.com/biomejs/biome/pull/12668
  804. * feat(lint): add noUnnecessaryStringTrim by @dyc3 in https://github.com/biomejs/biome/pull/12482
  805. * feat(lint): add useVueTrueAttributeShorthand by @dyc3 in https://github.com/biomejs/biome/pull/12716
  806. * feat(lint): add noUselessLengthCheck by @dyc3 in https://github.com/biomejs/biome/pull/12783
  807. * feat(lint): add useVueDefaultExport by @dyc3 in https://github.com/biomejs/biome/pull/12780
  808. * feat(lint): add noVueTextareaMustache by @dyc3 in https://github.com/biomejs/biome/pull/12610
  809. * feat(lint): add useObjectFromEntries by @dyc3 in https://github.com/biomejs/biome/pull/12756
  810. * feat(lint): add noArrayForEach by @dyc3 in https://github.com/biomejs/biome/pull/12755
  811. * feat(lint): add noSyncMethods by @dyc3 in https://github.com/biomejs/biome/pull/12764
  812. * feat(lint): add noSinglePromiseInPromiseMethods by @dyc3 in https://github.com/biomejs/biome/pull/12779
  813. * feat(lint): add noAwaitInPromiseMethods by @dyc3 in https://github.com/biomejs/biome/pull/12777
  814. * feat(lint): add noInvalidRemoveEventListener by @dyc3 in https://github.com/biomejs/biome/pull/12782
  815. * feat(lint): add noChainedComparison by @dyc3 in https://github.com/biomejs/biome/pull/12765
  816. * feat(lint): add noLateEventControl by @dyc3 in https://github.com/biomejs/biome/pull/12481
  817. * feat(lint/js): add noExcessiveNestedBlocks by @dyc3 in https://github.com/biomejs/biome/pull/12106
  818. * feat(lint): add noMissingThrow by @dyc3 in https://github.com/biomejs/biome/pull/12792
  819. * feat(lint): add noPlaywrightUnsafeReferences by @dyc3 in https://github.com/biomejs/biome/pull/12450
  820. * feat(lint): add noUselessAwait by @dyc3 in https://github.com/biomejs/biome/pull/12772
  821. * feat(lint): add noObjectLiteralComparison by @dyc3 in https://github.com/biomejs/biome/pull/12790
  822. * feat(lint): add useSvelteStoreInitialValue by @dyc3 in https://github.com/biomejs/biome/pull/12302
  823. * feat(lint): add noMapSpread by @dyc3 in https://github.com/biomejs/biome/pull/12795
  824. * feat(lint): add noMismatchedMapKey by @dyc3 in https://github.com/biomejs/biome/pull/12793
  825. * feat(lint): add noVueUselessTemplateAttributes by @dyc3 in https://github.com/biomejs/biome/pull/12789
  826. * feat(lint): add useVueOneComponentPerFile by @dyc3 in https://github.com/biomejs/biome/pull/12773
  827. * feat(lint): add noSvelteBindValueOnCheckableInputs by @dyc3 in https://github.com/biomejs/biome/pull/12241
  828. * chore: update rule metadata by @dyc3 in https://github.com/biomejs/biome/pull/12875
  829. * fix(service): apply the top-level grit configuration by @nhedger in https://github.com/biomejs/biome/pull/12864
  830. * perf(grit): bump grit-pattern-matcher and grit-util to 0.5.2 by @dyc3 in https://github.com/biomejs/biome/pull/12870
  831. * feat(plugins/js): add optimized traversal APIs by @dyc3 in https://github.com/biomejs/biome/pull/12868
  832. * fix(parse/tailwind): handle long dashed base names when aribtrary values are involved by @dyc3 in https://github.com/biomejs/biome/pull/12898
  833. * perf(analyze): make a disabled rule timer free by @dyc3 in https://github.com/biomejs/biome/pull/12911
  834. * chore(deps): pin mimalloc again, add the bad versions to cargo deny by @dyc3 in https://github.com/biomejs/biome/pull/12913
  835. * feat(plugins/js): add union to node and token kind sets by @dyc3 in https://github.com/biomejs/biome/pull/12914
  836. * perf(service): finish resizes of the file view maps in the writer that starts them by @dyc3 in https://github.com/biomejs/biome/pull/12910
  837. * chore: increase size of release builders by @dyc3 in https://github.com/biomejs/biome/pull/12919
  838. * ci: release by @github-actions[bot] in https://github.com/biomejs/biome/pull/12918
  839. ## New Contributors
  840. * @xgbtxy made their first contribution in https://github.com/biomejs/biome/pull/12737
  841. * @Bsibz made their first contribution in https://github.com/biomejs/biome/pull/11623
  842. * @Suto-Michimasa made their first contribution in https://github.com/biomejs/biome/pull/12821
  843. **Full Changelog**: https://github.com/biomejs/biome/compare/@biomejs/biome@2.6.4...@biomejs/biome@2.6.5

vedi su githubdetected 2026-11-05 via npm