Skip to content

Commit fa93a14

Browse files
authored
release: v1.9.4 (#4320)
1 parent b122c09 commit fa93a14

34 files changed

+68
-294
lines changed

CHANGELOG.md

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ New entries must be placed in a section entitled `Unreleased`.
99
Read
1010
our [guidelines for writing a good changelog entry](https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#changelog).
1111

12-
## Unreleased
12+
## v1.9.4 (2024-10-17)
1313

1414
### Analyzer
1515

1616
#### Bug fixes
1717

1818
- Improved the message for unused suppression comments. Contributed by @dyc3
1919

20-
- Fix [#4228](https://github.com/biomejs/biome/issues/4228), where the rule `a11y/noInteractiveElementToNoninteractiveRole` incorrectlly reports a `role` for non interactive elements. Contributed by @eryue0220
21-
- Catch suspicious semicolon in react fragment in `noSuspiciousSemicolonInJsx`. Contributed by @vasucp1207
20+
- Fix [#4228](https://github.com/biomejs/biome/issues/4228), where the rule `a11y/noInteractiveElementToNoninteractiveRole` incorrectly reports a `role` for non-interactive elements. Contributed by @eryue0220
21+
22+
- `noSuspiciousSemicolonInJsx` now catches suspicious semicolons in React fragments. Contributed by @vasucp1207
2223

2324
### CLI
2425

@@ -48,13 +49,17 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
4849

4950
#### New features
5051

52+
- Add [useGuardForIn](https://biomejs.dev/linter/rules/use-guard-for-in/). Contributed by @fireairforce
5153
- Add [noDocumentCookie](https://biomejs.dev/linter/rules/no-document-cookie/). Contributed by @tunamaguro
5254
- Add [noDocumentImportInPage](https://biomejs.dev/linter/rules/no-document-import-in-page/). Contributed by @kaioduarte
55+
- Add [noDuplicateProperties](https://biomejs.dev/linter/rules/no-duplicate-properties/). Contributed by @togami2864
5356
- Add [noHeadElement](https://biomejs.dev/linter/rules/no-head-element/). Contributed by @kaioduarte
5457
- Add [noHeadImportInDocument](https://biomejs.dev/linter/rules/no-head-import-in-document/). Contributed by @kaioduarte
5558
- Add [noImgElement](https://biomejs.dev/linter/rules/no-img-element/). Contributed by @kaioduarte
56-
- Add [guardForIn](https://biomejs.dev/linter/rules/guard-for-in/). Contributed by @fireairforce
57-
- Add [noUselessStringRaw](https://github.com/biomejs/biome/pull/4263). Contributed by @fireairforce
59+
- Add [noUnknownTypeSelector](https://biomejs.dev/linter/rules/no-unknown-type-selector/). Contributed by @Kazuhiro-Mimaki
60+
- Add [useAtIndex](https://biomejs.dev/linter/rules/use-at-index/). Contributed by @GunseiKPaseri
61+
- Add [noUselessStringRaw](https://biomejs.dev/linter/rules/no-useless-string-raw/). Contributed by @fireairforce
62+
- Add [nursery/useCollapsedIf](https://biomejs.dev/linter/rules/use-collapsed-if/). Contributed by @siketyan
5863
- Add [useGoogleFontDisplay](https://biomejs.dev/linter/rules/use-google-font-display/). Contributed by @kaioduarte
5964

6065
#### Bug Fixes
@@ -64,10 +69,10 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
6469
This fixes a regression introduced in Biome 1.9.3
6570
The regression affected the following linter rules:
6671

67-
- nursery/useSortedClasses
68-
- nursery/useTrimStartEnd
69-
- style/useTemplate
70-
- suspicious/noMisleadingCharacterClass
72+
- `nursery/useSortedClasses`
73+
- `nursery/useTrimStartEnd`
74+
- `style/useTemplate`
75+
- `suspicious/noMisleadingCharacterClass`
7176

7277
Contributed by @Conaclos
7378

@@ -167,13 +172,13 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
167172

168173
- [noUnknownFunction](https://biomejs.dev/linter/rules/no-unknown-function/) correctly handles `calc-size` function ([#4212](https://github.com/biomejs/biome/issues/4212)).
169174

170-
The following code `calc-size` is no longer reported as unknown:
175+
The following code `calc-size` is no longer reported as unknown:
171176

172-
```css
173-
.a { height: calc-size(0px); }
174-
```
177+
```css
178+
.a { height: calc-size(0px); }
179+
```
175180

176-
Contributed by @fireairforce
181+
Contributed by @fireairforce
177182

178183
- [useNamingConvention](https://biomejs.dev/linter/rules/use-naming-convention/) now allows configuring conventions for readonly index signatures.
179184

@@ -184,34 +189,12 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
184189

185190
### Parser
186191

187-
#### New features
188-
189-
- Add support for parsing the defer attribute in import statements ([#4215](https://github.com/biomejs/biome/issues/4215)).
190-
191-
```js
192-
import defer * as myModule from "my-module";
193-
```
194-
195-
Contributed by @fireairforce
196-
197-
- Add support for parsing typescript's `resolution-mode` in Import Types([#2115](https://github.com/biomejs/biome/issues/2115))
198-
199-
```ts
200-
export type Fs = typeof import('fs', { with: { 'resolution-mode': 'import' } });
201-
export type TypeFromRequire =
202-
import("pkg", { with: { "resolution-mode": "require" } }).TypeFromRequire;
203-
export type TypeFromImport =
204-
import("pkg", { with: { "resolution-mode": "import" } }).TypeFromImport;
205-
```
206-
207-
Contributed by @fireairforce
208-
209192
#### Bug Fixes
210193

211194
- The CSS parser now accepts more emoji in identifiers ([#3627](https://github.com/biomejs/biome/issues/3627#issuecomment-2392388022)).
212195

213196
Browsers accept more emoji than the standard allows.
214-
Biome now accepts these additional emoji.
197+
Biome now accepts these additional emojis.
215198

216199
The following code is now correctly parsed:
217200

@@ -224,6 +207,18 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
224207

225208
Contributed by @Conaclos
226209

210+
- Add support for parsing typescript's `resolution-mode` in Import Types([#2115](https://github.com/biomejs/biome/issues/2115))
211+
212+
```ts
213+
export type Fs = typeof import('fs', { with: { 'resolution-mode': 'import' } });
214+
export type TypeFromRequire =
215+
import("pkg", { with: { "resolution-mode": "require" } }).TypeFromRequire;
216+
export type TypeFromImport =
217+
import("pkg", { with: { "resolution-mode": "import" } }).TypeFromImport;
218+
```
219+
220+
Contributed by @fireairforce
221+
227222
## v1.9.3 (2024-10-01)
228223

229224
### CLI

crates/biome_css_analyze/src/lint/nursery/no_duplicate_properties.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ declare_lint_rule! {
3535
/// ```
3636
///
3737
pub NoDuplicateProperties {
38-
version: "next",
38+
version: "1.9.4",
3939
name: "noDuplicateProperties",
4040
language: "css",
4141
recommended: true,

crates/biome_css_analyze/src/lint/nursery/no_unknown_type_selector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ declare_lint_rule! {
5050
/// ```
5151
///
5252
pub NoUnknownTypeSelector {
53-
version: "next",
53+
version: "1.9.4",
5454
name: "noUnknownTypeSelector",
5555
language: "css",
5656
recommended: true,

crates/biome_js_analyze/src/lint/nursery/no_document_cookie.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ declare_lint_rule! {
5050
/// ```
5151
///
5252
pub NoDocumentCookie {
53-
version: "next",
53+
version: "1.9.4",
5454
name: "noDocumentCookie",
5555
language: "js",
5656
recommended: false,

crates/biome_js_analyze/src/lint/nursery/no_document_import_in_page.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ declare_lint_rule! {
3030
/// ```
3131
///
3232
pub NoDocumentImportInPage {
33-
version: "next",
33+
version: "1.9.4",
3434
name: "noDocumentImportInPage",
3535
language: "jsx",
3636
sources: &[RuleSource::EslintNext("no-document-import-in-page")],

crates/biome_js_analyze/src/lint/nursery/no_head_element.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ declare_lint_rule! {
4444
/// }
4545
/// ```
4646
pub NoHeadElement {
47-
version: "next",
47+
version: "1.9.4",
4848
name: "noHeadElement",
4949
language: "jsx",
5050
sources: &[RuleSource::EslintNext("no-head-element")],

crates/biome_js_analyze/src/lint/nursery/no_head_import_in_document.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ declare_lint_rule! {
4343
/// ```
4444
///
4545
pub NoHeadImportInDocument {
46-
version: "next",
46+
version: "1.9.4",
4747
name: "noHeadImportInDocument",
4848
language: "jsx",
4949
sources: &[RuleSource::EslintNext("no-head-import-in-document")],

crates/biome_js_analyze/src/lint/nursery/no_img_element.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ declare_lint_rule! {
5252
/// ```
5353
///
5454
pub NoImgElement {
55-
version: "next",
55+
version: "1.9.4",
5656
name: "noImgElement",
5757
language: "jsx",
5858
sources: &[RuleSource::EslintNext("no-img-element")],

crates/biome_js_analyze/src/lint/nursery/no_useless_string_raw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ declare_lint_rule! {
3030
/// String.raw`\n`;
3131
/// ```
3232
pub NoUselessStringRaw {
33-
version: "next",
33+
version: "1.9.4",
3434
name: "noUselessStringRaw",
3535
language: "js",
3636
recommended: false,

crates/biome_js_analyze/src/lint/nursery/use_at_index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ declare_lint_rule! {
7373
/// array[array.length - 1] = foo;
7474
/// ```
7575
pub UseAtIndex {
76-
version: "next",
76+
version: "1.9.4",
7777
name: "useAtIndex",
7878
language: "js",
7979
recommended: false,

crates/biome_js_analyze/src/lint/nursery/use_collapsed_if.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ declare_lint_rule! {
6464
/// ```
6565
///
6666
pub UseCollapsedIf {
67-
version: "next",
67+
version: "1.9.4",
6868
name: "useCollapsedIf",
6969
language: "js",
7070
sources: &[

crates/biome_js_analyze/src/lint/nursery/use_google_font_display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ declare_lint_rule! {
4949
/// <link rel="stylesheet" />
5050
/// ```
5151
pub UseGoogleFontDisplay {
52-
version: "next",
52+
version: "1.9.4",
5353
name: "useGoogleFontDisplay",
5454
language: "jsx",
5555
sources: &[RuleSource::EslintNext("google-font-display")],

crates/biome_js_analyze/src/lint/nursery/use_guard_for_in.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ declare_lint_rule! {
5252
/// ```
5353
///
5454
pub UseGuardForIn {
55-
version: "next",
55+
version: "1.9.4",
5656
name: "useGuardForIn",
5757
language: "js",
5858
sources: &[RuleSource::Eslint("guard-for-in")],

crates/biome_js_factory/src/generated/node_factory.rs

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/biome_js_factory/src/generated/syntax_factory.rs

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/biome_js_formatter/src/js/module/import_namespace_clause.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,13 @@ impl FormatNodeRule<JsImportNamespaceClause> for FormatJsImportNamespaceClause {
1313
type_token,
1414
namespace_specifier,
1515
from_token,
16-
defer_token,
1716
source,
1817
assertion,
1918
} = node.as_fields();
2019

2120
if let Some(type_token) = type_token {
2221
write!(f, [type_token.format(), space()])?;
2322
}
24-
if let Some(defer_token) = defer_token {
25-
write!(f, [defer_token.format(), space()])?;
26-
}
2723

2824
write![
2925
f,

crates/biome_js_formatter/tests/specs/js/module/import/import_defer_attribute.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

crates/biome_js_formatter/tests/specs/js/module/import/import_defer_attribute.js.snap

Lines changed: 0 additions & 36 deletions
This file was deleted.

crates/biome_js_parser/src/lexer/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,6 @@ impl<'src> JsLexer<'src> {
10341034
b"of" => OF_KW,
10351035
b"out" => OUT_KW,
10361036
b"using" => USING_KW,
1037-
b"defer" => DEFER_KW,
10381037
_ => T![ident],
10391038
}
10401039
}

crates/biome_js_parser/src/syntax/module.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,6 @@ fn parse_import_clause(p: &mut JsParser) -> ParsedSyntax {
294294
p.eat(T![type]);
295295
}
296296

297-
// test js import_defer_clause
298-
// import defer * as yNamespace from "y";
299-
//
300-
// test_err js import_defer_clause
301-
// import type defer * as yNamespace from "y";
302-
if p.at(T![defer]) && p.nth_at(1, T![*]) {
303-
p.eat(T![defer]);
304-
}
305-
306297
let clause = match p.cur() {
307298
T![*] => parse_import_namespace_clause_rest(p, m),
308299
T!['{'] => parse_import_named_clause_rest(p, m),

crates/biome_js_parser/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ fn diagnostics_print_correctly() {
408408
#[test]
409409
pub fn quick_test() {
410410
let code = r#"
411-
type A = typeof import("test");
411+
type Equals = A extends (x: B extends C ? D : E) => 0 ? F : G;
412412
"#;
413413
let root = parse(
414414
code,

crates/biome_js_parser/test_data/inline/err/import_defer_clause.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)