Skip to content

Commit

Permalink
release: v1.9.4 (#4320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos authored Oct 17, 2024
1 parent b122c09 commit fa93a14
Show file tree
Hide file tree
Showing 34 changed files with 68 additions and 294 deletions.
69 changes: 32 additions & 37 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ New entries must be placed in a section entitled `Unreleased`.
Read
our [guidelines for writing a good changelog entry](https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#changelog).

## Unreleased
## v1.9.4 (2024-10-17)

### Analyzer

#### Bug fixes

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

- 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
- Catch suspicious semicolon in react fragment in `noSuspiciousSemicolonInJsx`. Contributed by @vasucp1207
- 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

- `noSuspiciousSemicolonInJsx` now catches suspicious semicolons in React fragments. Contributed by @vasucp1207

### CLI

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

#### New features

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

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

- nursery/useSortedClasses
- nursery/useTrimStartEnd
- style/useTemplate
- suspicious/noMisleadingCharacterClass
- `nursery/useSortedClasses`
- `nursery/useTrimStartEnd`
- `style/useTemplate`
- `suspicious/noMisleadingCharacterClass`

Contributed by @Conaclos

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

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

The following code `calc-size` is no longer reported as unknown:
The following code `calc-size` is no longer reported as unknown:

```css
.a { height: calc-size(0px); }
```
```css
.a { height: calc-size(0px); }
```

Contributed by @fireairforce
Contributed by @fireairforce

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

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

### Parser

#### New features

- Add support for parsing the defer attribute in import statements ([#4215](https://github.com/biomejs/biome/issues/4215)).

```js
import defer * as myModule from "my-module";
```

Contributed by @fireairforce

- Add support for parsing typescript's `resolution-mode` in Import Types([#2115](https://github.com/biomejs/biome/issues/2115))

```ts
export type Fs = typeof import('fs', { with: { 'resolution-mode': 'import' } });
export type TypeFromRequire =
import("pkg", { with: { "resolution-mode": "require" } }).TypeFromRequire;
export type TypeFromImport =
import("pkg", { with: { "resolution-mode": "import" } }).TypeFromImport;
```

Contributed by @fireairforce

#### Bug Fixes

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

Browsers accept more emoji than the standard allows.
Biome now accepts these additional emoji.
Biome now accepts these additional emojis.

The following code is now correctly parsed:

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

Contributed by @Conaclos

- Add support for parsing typescript's `resolution-mode` in Import Types([#2115](https://github.com/biomejs/biome/issues/2115))

```ts
export type Fs = typeof import('fs', { with: { 'resolution-mode': 'import' } });
export type TypeFromRequire =
import("pkg", { with: { "resolution-mode": "require" } }).TypeFromRequire;
export type TypeFromImport =
import("pkg", { with: { "resolution-mode": "import" } }).TypeFromImport;
```

Contributed by @fireairforce

## v1.9.3 (2024-10-01)

### CLI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ declare_lint_rule! {
/// ```
///
pub NoDuplicateProperties {
version: "next",
version: "1.9.4",
name: "noDuplicateProperties",
language: "css",
recommended: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ declare_lint_rule! {
/// ```
///
pub NoUnknownTypeSelector {
version: "next",
version: "1.9.4",
name: "noUnknownTypeSelector",
language: "css",
recommended: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ declare_lint_rule! {
/// ```
///
pub NoDocumentCookie {
version: "next",
version: "1.9.4",
name: "noDocumentCookie",
language: "js",
recommended: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ declare_lint_rule! {
/// ```
///
pub NoDocumentImportInPage {
version: "next",
version: "1.9.4",
name: "noDocumentImportInPage",
language: "jsx",
sources: &[RuleSource::EslintNext("no-document-import-in-page")],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ declare_lint_rule! {
/// }
/// ```
pub NoHeadElement {
version: "next",
version: "1.9.4",
name: "noHeadElement",
language: "jsx",
sources: &[RuleSource::EslintNext("no-head-element")],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ declare_lint_rule! {
/// ```
///
pub NoHeadImportInDocument {
version: "next",
version: "1.9.4",
name: "noHeadImportInDocument",
language: "jsx",
sources: &[RuleSource::EslintNext("no-head-import-in-document")],
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_js_analyze/src/lint/nursery/no_img_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ declare_lint_rule! {
/// ```
///
pub NoImgElement {
version: "next",
version: "1.9.4",
name: "noImgElement",
language: "jsx",
sources: &[RuleSource::EslintNext("no-img-element")],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ declare_lint_rule! {
/// String.raw`\n`;
/// ```
pub NoUselessStringRaw {
version: "next",
version: "1.9.4",
name: "noUselessStringRaw",
language: "js",
recommended: false,
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_js_analyze/src/lint/nursery/use_at_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ declare_lint_rule! {
/// array[array.length - 1] = foo;
/// ```
pub UseAtIndex {
version: "next",
version: "1.9.4",
name: "useAtIndex",
language: "js",
recommended: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ declare_lint_rule! {
/// ```
///
pub UseCollapsedIf {
version: "next",
version: "1.9.4",
name: "useCollapsedIf",
language: "js",
sources: &[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ declare_lint_rule! {
/// <link rel="stylesheet" />
/// ```
pub UseGoogleFontDisplay {
version: "next",
version: "1.9.4",
name: "useGoogleFontDisplay",
language: "jsx",
sources: &[RuleSource::EslintNext("google-font-display")],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ declare_lint_rule! {
/// ```
///
pub UseGuardForIn {
version: "next",
version: "1.9.4",
name: "useGuardForIn",
language: "js",
sources: &[RuleSource::Eslint("guard-for-in")],
Expand Down
7 changes: 0 additions & 7 deletions crates/biome_js_factory/src/generated/node_factory.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions crates/biome_js_factory/src/generated/syntax_factory.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ impl FormatNodeRule<JsImportNamespaceClause> for FormatJsImportNamespaceClause {
type_token,
namespace_specifier,
from_token,
defer_token,
source,
assertion,
} = node.as_fields();

if let Some(type_token) = type_token {
write!(f, [type_token.format(), space()])?;
}
if let Some(defer_token) = defer_token {
write!(f, [defer_token.format(), space()])?;
}

write![
f,
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion crates/biome_js_parser/src/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,6 @@ impl<'src> JsLexer<'src> {
b"of" => OF_KW,
b"out" => OUT_KW,
b"using" => USING_KW,
b"defer" => DEFER_KW,
_ => T![ident],
}
}
Expand Down
9 changes: 0 additions & 9 deletions crates/biome_js_parser/src/syntax/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,6 @@ fn parse_import_clause(p: &mut JsParser) -> ParsedSyntax {
p.eat(T![type]);
}

// test js import_defer_clause
// import defer * as yNamespace from "y";
//
// test_err js import_defer_clause
// import type defer * as yNamespace from "y";
if p.at(T![defer]) && p.nth_at(1, T![*]) {
p.eat(T![defer]);
}

let clause = match p.cur() {
T![*] => parse_import_namespace_clause_rest(p, m),
T!['{'] => parse_import_named_clause_rest(p, m),
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_js_parser/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ fn diagnostics_print_correctly() {
#[test]
pub fn quick_test() {
let code = r#"
type A = typeof import("test");
type Equals = A extends (x: B extends C ? D : E) => 0 ? F : G;
"#;
let root = parse(
code,
Expand Down

This file was deleted.

Loading

0 comments on commit fa93a14

Please sign in to comment.