You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/internals/changelog.md
+206-1Lines changed: 206 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,218 @@ tableOfContents:
6
6
---
7
7
# @biomejs/biome
8
8
9
+
## 2.1.4
10
+
11
+
### Patch Changes
12
+
13
+
-[#7121](https://github.com/biomejs/biome/pull/7121)[`b9642ab`](https://github.com/biomejs/biome/commit/b9642abc6d05135180f4243df30524cf40ba12df) Thanks [@arendjr](https://github.com/arendjr)! - Fixed [#7111](https://github.com/biomejs/biome/issues/7111): Imported symbols using aliases are now correctly recognised.
14
+
15
+
-[#7103](https://github.com/biomejs/biome/pull/7103)[`80515ec`](https://github.com/biomejs/biome/commit/80515ecad8cc272feeae4c17762d3b150acd88e7) Thanks [@omasakun](https://github.com/omasakun)! - Fixed [#6933](https://github.com/biomejs/biome/issues/6933) and [#6994](https://github.com/biomejs/biome/issues/6994).
16
+
17
+
When the values of private member assignment expressions, increment expressions, etc. are used, those private members are no longer marked as unused.
18
+
19
+
-[#6887](https://github.com/biomejs/biome/pull/6887)[`0cc38f5`](https://github.com/biomejs/biome/commit/0cc38f59cd9ddf0fdcd12d6f8cb3642743cc4406) Thanks [@ptkagori](https://github.com/ptkagori)! - Added the [`noQwikUseVisibleTask`](https://biomejs.dev/linter/rules/no-qwik-use-visible-task) rule to Qwik.
20
+
21
+
This rule is intended for use in Qwik applications to warn about the use of `useVisibleTask$()` functions which require careful consideration before use.
22
+
23
+
**Invalid:**
24
+
25
+
```js
26
+
useVisibleTask$(() => {
27
+
console.log("Component is visible");
28
+
});
29
+
```
30
+
31
+
**Valid:**
32
+
33
+
```js
34
+
useTask$(() => {
35
+
console.log("Task executed");
36
+
});
37
+
```
38
+
39
+
-[#7084](https://github.com/biomejs/biome/pull/7084)[`50ca155`](https://github.com/biomejs/biome/commit/50ca1553f08348ab1e92dc7cf04013c85ff743a4) Thanks [@ematipico](https://github.com/ematipico)! - Added the new nursery rule `noUnnecessararyConditions`, which detects whenever some conditions don't
40
+
change during the life cycle of the program, and truthy or false, hence deemed redundant.
41
+
42
+
For example, the following snippets will trigger the rule:
43
+
44
+
```js
45
+
// Always truthy literal conditions
46
+
if (true) {
47
+
console.log("always runs");
48
+
}
49
+
```
50
+
51
+
```ts
52
+
// Unnecessary condition on constrained string type
53
+
function foo(arg:"bar"|"baz") {
54
+
if (arg) {
55
+
// This check is unnecessary
56
+
}
57
+
}
58
+
```
59
+
60
+
-[#6887](https://github.com/biomejs/biome/pull/6887)[`0cc38f5`](https://github.com/biomejs/biome/commit/0cc38f59cd9ddf0fdcd12d6f8cb3642743cc4406) Thanks [@ptkagori](https://github.com/ptkagori)! - Added the [`useImageSize`](https://biomejs.dev/linter/rules/use-image-size) rule to Biome.
61
+
62
+
The `useImageSize` rule enforces the use of width and height attributes on `<img>` elements for performance reasons. This rule is intended to prevent layout shifts and improve Core Web Vitals by ensuring images have explicit dimensions.
-[#6887](https://github.com/biomejs/biome/pull/6887)[`0cc38f5`](https://github.com/biomejs/biome/commit/0cc38f59cd9ddf0fdcd12d6f8cb3642743cc4406) Thanks [@ptkagori](https://github.com/ptkagori)! - Added the [`useAnchorHref`](https://biomejs.dev/linter/rules/use-anchor-href) rule to Biome.
81
+
82
+
The `useAnchorHref` rule enforces the presence of an `href` attribute on `<a>` elements in JSX. This rule is intended to ensure that anchor elements are always valid and accessible.
83
+
84
+
**Invalid:**
85
+
86
+
```jsx
87
+
<a>Link</a>
88
+
```
89
+
90
+
```jsx
91
+
<a target="_blank">External</a>
92
+
```
93
+
94
+
**Valid:**
95
+
96
+
```jsx
97
+
<a href="/home">Home</a>
98
+
```
99
+
100
+
```jsx
101
+
<a href="https://example.com" target="_blank">
102
+
External
103
+
</a>
104
+
```
105
+
106
+
-[#7100](https://github.com/biomejs/biome/pull/7100)[`29fcb05`](https://github.com/biomejs/biome/commit/29fcb0540ed817d92a3f663132b658541706765b) Thanks [@Jayllyz](https://github.com/Jayllyz)! - Added the rule [`noNonNullAssertedOptionalChain`](https://biomejs.dev/linter/rules/no-non-null-asserted-optional-chain).
107
+
108
+
This rule prevents the use of non-null assertions (`!`) immediately after optional chaining expressions (`?.`). Optional chaining is designed to safely handle nullable values by returning `undefined` when the chain encounters `null` or `undefined`. Using a non-null assertion defeats this purpose and can lead to runtime errors.
109
+
110
+
```ts
111
+
// Invalid - non-null assertion after optional chaining
-[#7106](https://github.com/biomejs/biome/pull/7106)[`236deaa`](https://github.com/biomejs/biome/commit/236deaadca077051f6e2ef01cfdbbc55cc1c3d78) Thanks [@arendjr](https://github.com/arendjr)! - Fixed [#6985](https://github.com/biomejs/biome/issues/6985): Inference of return types no longer mistakenly picks up return types of nested functions.
127
+
128
+
-[#7102](https://github.com/biomejs/biome/pull/7102)[`d3118c6`](https://github.com/biomejs/biome/commit/d3118c6ac3bba0ca29251fa7fc5ba36a9e4456b0) Thanks [@omasakun](https://github.com/omasakun)! - Fixed [#7101](https://github.com/biomejs/biome/issues/7101): [`noUnusedPrivateClassMembers`](https://biomejs.dev/linter/rules/no-unused-private-class-members/) now handles members declared as part of constructor arguments:
129
+
1. If a class member defined in a constructor argument is only used within the constructor, it removes the `private` modifier and makes it a plain method argument.
130
+
1. If it is not used at all, it will prefix it with an underscore, similar to `noUnusedFunctionParameter`.
131
+
132
+
-[#7104](https://github.com/biomejs/biome/pull/7104)[`5395297`](https://github.com/biomejs/biome/commit/53952972cd5786cfdcc3deda0c226d6488ef1aee) Thanks [@harxki](https://github.com/harxki)! - Reverting to prevent regressions around ref handling
133
+
134
+
-[#7143](https://github.com/biomejs/biome/pull/7143)[`1a6933a`](https://github.com/biomejs/biome/commit/1a6933aaf2c5b57d70a60d607b5cab68d532eeb4) Thanks [@siketyan](https://github.com/siketyan)! - Fixed [#6799](https://github.com/biomejs/biome/issues/6799): The [`noImportCycles`](https://biomejs.dev/linter/rules/no-import-cycles/) rule now ignores type-only imports if the new `ignoreTypes` option is enabled (enabled by default).
135
+
136
+
> [!WARNING]
137
+
> **Breaking Change**: The `noImportCycles` rule no longer detects import cycles that include one or more type-only imports by default.
138
+
> To keep the old behaviour, you can turn off the `ignoreTypes` option explicitly:
139
+
>
140
+
> ```json
141
+
> {
142
+
> "linter": {
143
+
> "rules": {
144
+
> "nursery": {
145
+
> "noImportCycles": {
146
+
> "options": {
147
+
> "ignoreTypes": false
148
+
> }
149
+
> }
150
+
> }
151
+
> }
152
+
> }
153
+
> }
154
+
> ```
155
+
156
+
- [#7099](https://github.com/biomejs/biome/pull/7099) [`6cc84cb`](https://github.com/biomejs/biome/commit/6cc84cb547480f83119d2cba5542e2d2afc65b4d) Thanks [@arendjr](https://github.com/arendjr)! - Fixed [#7062](https://github.com/biomejs/biome/issues/7062): Biome now correctly considers extended configs when determining the mode for the scanner.
157
+
158
+
- [#6887](https://github.com/biomejs/biome/pull/6887) [`0cc38f5`](https://github.com/biomejs/biome/commit/0cc38f59cd9ddf0fdcd12d6f8cb3642743cc4406) Thanks [@ptkagori](https://github.com/ptkagori)! - Added the [`useQwikClasslist`](https://biomejs.dev/linter/rules/use-qwik-classlist) rule to Biome.
159
+
160
+
This rule is intended for use in Qwik applications to encourage the use of the built-in `class` prop (which accepts a string, object, or array) instead of the `classnames` utility library.
-[#7019](https://github.com/biomejs/biome/pull/7019)[`57c15e6`](https://github.com/biomejs/biome/commit/57c15e6df5b6257ffb9f69d7614c3455a1f5c870) Thanks [@fireairforce](https://github.com/fireairforce)! - Added support in the JS parser for `import source`(a [stage3 proposal](https://github.com/tc39/proposal-source-phase-imports)). The syntax looks like:
175
+
176
+
```ts
177
+
importsourcefoofrom"<specifier>";
178
+
```
179
+
180
+
-[#7053](https://github.com/biomejs/biome/pull/7053)[`655049e`](https://github.com/biomejs/biome/commit/655049e9e38f536b33fff6d7b160299f0b446908) Thanks [@jakeleventhal](https://github.com/jakeleventhal)! - Added the [`useConsistentTypeDefinitions`](https://biomejs.dev/rules/use-consistent-type-definitions) rule.
181
+
182
+
This rule enforces consistent usage of either `interface` or `type` for object type definitions in TypeScript.
183
+
184
+
The rule accepts an option to specify the preferred style:
185
+
-`interface` (default): Prefer using `interface` for object type definitions
186
+
-`type`: Prefer using `type` for object type definitions
187
+
188
+
Examples:
189
+
190
+
```ts
191
+
// With default option (interface)
192
+
// ❌ Invalid
193
+
typePoint= { x:number; y:number };
194
+
195
+
// ✅ Valid
196
+
interfacePoint {
197
+
x:number;
198
+
y:number;
199
+
}
200
+
201
+
// With option { style: "type" }
202
+
// ❌ Invalid
203
+
interfacePoint {
204
+
x:number;
205
+
y:number;
206
+
}
207
+
208
+
// ✅ Valid
209
+
typePoint= { x:number; y:number };
210
+
```
211
+
212
+
The rule will automatically fix simple cases where conversion is straightforward.
213
+
9
214
## 2.1.3
10
215
11
216
### Patch Changes
12
217
13
218
-[#7057](https://github.com/biomejs/biome/pull/7057)[`634a667`](https://github.com/biomejs/biome/commit/634a667ac8e9f74a4633895eab4bd4695ffffa1d) Thanks [@mdevils](https://github.com/mdevils)! - Added the rule [`noVueReservedKeys`](https://biomejs.dev/linter/rules/no-vue-reserved-keys/), which prevents the use of reserved Vue keys.
14
219
15
-
It prevents the use of Vue reserved keys such as those starting with `# @biomejs/biome (like `$el`, `$data`, `$props`) and keys starting with `\_` in data properties, which can cause conflicts and unexpected behavior in Vue components.
220
+
It prevents the use of Vue reserved keys such as those starting with like `$el`, `$data`, `$props`) and keys starting with `\_` in data properties, which can cause conflicts and unexpected behavior in Vue components.
0 commit comments