Skip to content

Commit

Permalink
Merge branch 'main' into fix-4326
Browse files Browse the repository at this point in the history
  • Loading branch information
fireairforce authored Oct 26, 2024
2 parents a5739ec + 6c209ef commit df75efb
Show file tree
Hide file tree
Showing 2,020 changed files with 183,791 additions and 167,248 deletions.
6 changes: 3 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
**/generated/* linguist-generated=true text=auto eol=lf
/crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs linguist-generated=true text=auto eol=lf
/crates/biome_configuration/src/generated.rs linguist-generated=true text=auto eol=lf
/crates/biome_configuration/src/linter/rules.rs linguist-generated=true text=auto eol=lf
/crates/biome_configuration/src/assists/rules.rs linguist-generated=true text=auto eol=lf
/crates/biome_configuration/src/parse/json/rules.rs linguist-generated=true text=auto eol=lf
/crates/biome_configuration/src/analyzer/linter/rules.rs linguist-generated=true text=auto eol=lf
/crates/biome_configuration/src/analyzer/assists/actions.rs linguist-generated=true text=auto eol=lf
/crates/biome_configuration/src/analyzer/parse/rules.rs linguist-generated=true text=auto eol=lf
# GraphQL
/crates/biome_graphql_analyze/src/{lint,assists,syntax}.rs linguist-generated=true text=auto eol=lf
/crates/biome_graphql_analyze/src/{lint,assists,syntax}/*.rs linguist-generated=true text=auto eol=lf
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

#### Bug fixes

- Fix CSS parser case error, `@-moz-document url-prefix(https://example.com)` and `@-moz-document domain(example.com)` are now valid. Contributed by @eryue0220
- Fix [#4258](https://github.com/biomejs/biome/issues/4258), where fixed css parse error with @-moz-document url-prefix(). Contributed by @eryue0220

### CLI
Expand Down Expand Up @@ -89,7 +90,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
) {}
}
```

Contributed by @fireairforce

- Fix [#3836](https://github.com/biomejs/biome/issues/3836), css parser allow multiple semicolons after a declaration, the following example will now parsed correctly:
Expand Down Expand Up @@ -375,7 +376,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
- Fix [#3364](https://github.com/biomejs/biome/issues/3364) where the `useSelfClosingElements` rule forces the `script` tag to be self-closing. Previously, this rule applies to all elements and cannot be disabled for native HTML elements.

Now, this rule accepts a `ignoreHtmlElements` option, which when set to `true`, ignores native HTML elements and allows them to be non-self-closing.

Contributed by @abidjappie

- Fix a case where raw values inside `url()` functions weren't properly trimmed.
Expand Down
23 changes: 6 additions & 17 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions crates/biome_configuration/src/javascript/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ pub struct JavascriptParser {
/// These decorators belong to an old proposal, and they are subject to change.
#[partial(bpaf(hide))]
pub unsafe_parameter_decorators_enabled: bool,

/// Enables parsing of Grit metavariables.
/// Defaults to `false`.
#[partial(bpaf(hide))]
pub grit_metavariables: bool,
}

/// Indicates the type of runtime or transformation used for interpreting JSX.
Expand Down
4 changes: 2 additions & 2 deletions crates/biome_css_factory/src/generated/node_factory.rs

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

2 changes: 1 addition & 1 deletion crates/biome_css_factory/src/generated/syntax_factory.rs

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

6 changes: 5 additions & 1 deletion crates/biome_css_parser/src/syntax/at_rule/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ pub(crate) fn is_at_document_custom_matcher(p: &mut CssParser) -> bool {
p.at_ts(DOCUMENT_CUSTOM_MATCHER_SET) && p.nth_at(1, T!['('])
}

const URL_PREFIX_SET: TokenSet<CssSyntaxKind> = token_set!(T![url_prefix]);
// According to MDN, `url-prefix()`, `domain()` and `media-document()` functions
// can be optionally enclosed by single or double quotes.
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/@document
const URL_PREFIX_SET: TokenSet<CssSyntaxKind> =
token_set!(T![url_prefix], T![domain], T![media_document]);

pub(crate) fn is_at_url_prefix(p: &mut CssParser) -> bool {
p.at_ts(URL_PREFIX_SET) && p.nth_at(1, T!['('])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,21 @@
background-color: green;
}
}

@-moz-document url-prefix(https://example.com) {
body {
background-color: green;
}
}

@-moz-document url(http://www.exmaple.org/), url-prefix(https://www.example.com/test), domain(example.com) {
body {
background-color: green;
}
}

@-moz-document url(http://www.exmaple.org/), url-prefix(https: //www.example.com/test), domain(example.com), media-document(video) {
body {
background-color: green;
}
}
Loading

0 comments on commit df75efb

Please sign in to comment.