Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jan 2, 2025
2 parents f86999d + 6ea885f commit 562b249
Show file tree
Hide file tree
Showing 202 changed files with 1,874 additions and 2,698 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
# Upload the CLI binary as a build artifact
- name: Upload CLI artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: cli-${{ matrix.target }}
path: ./dist/biome-*
Expand All @@ -169,7 +169,7 @@ jobs:
run: wasm-pack build --out-dir ../../packages/@biomejs/wasm-web --target web --release --scope biomejs crates/biome_wasm

- name: Upload WASM artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: wasm-${{ matrix.target }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_js_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
pnpm --filter @biomejs/js-api run build
- name: Upload JS API artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: js-api
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_knope.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: cli-${{ matrix.target }}
path: ./dist/biome-*
Expand All @@ -156,7 +156,7 @@ jobs:
run: wasm-pack build --out-dir ../../packages/@biomejs/wasm-web --target web --release --scope biomejs crates/biome_wasm

- name: Upload WASM artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: wasm-${{ matrix.target }}
path: |
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
</Suspense>;
```

- `noDuplicateProperties` now throws lint errors properly when we use `@supports` (fix [#4756](https://github.com/biomejs/biome/issues/4756)) Contributed by @mehm8128

### JavaScript APIs

### Linter
Expand Down Expand Up @@ -348,6 +350,8 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
- Fixed `useSortedClasses` false positive and Supplementary test case ([#3394](https://github.com/biomejs/biome/issues/3394)) Contributed by @hangaoke1
- [noLabelWithoutControl](https://biomejs.dev/linter/rules/no-label-without-control/) detects button tags as input ([#4511])(https://github.com/biomejs/biome/issues/4511). Contributed by @unvalley

- [noUselessFragments](https://biomejs.dev/linter/rules/no-useless-fragments/) now handles `JsxAttributeInitializerClause`, ensuring that fragments inside expressions like `<A b=<></> />` are preserved. ([#4208](https://github.com/biomejs/biome/issues/4208)). Contributed by @MaxtuneLee

### Parser

#### Bug fixes
Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ unused_lifetimes = "warn"
unused_macro_rules = "warn"

[workspace.lints.clippy]
allow_attributes = "deny"
cargo_common_metadata = "allow"
empty_docs = "allow" # there are some false positives inside biome_wasm
multiple_crate_versions = "allow"
Expand Down Expand Up @@ -174,7 +175,7 @@ biome_test_utils = { path = "./crates/biome_test_utils" }
tests_macros = { path = "./crates/tests_macros" }

# Crates needed in the workspace
anyhow = "1.0.94"
anyhow = "1.0.95"
bpaf = { version = "0.9.15", features = ["derive"] }
camino = "1.1.9"
countme = "3.0.1"
Expand All @@ -189,19 +190,19 @@ ignore = "0.4.23"
indexmap = { version = "2.7.0" }
insta = "1.41.1"
natord = "1.0.9"
oxc_resolver = "1.12.0"
oxc_resolver = "3.0.3"
papaya = "0.1.6"
proc-macro2 = "1.0.86"
quickcheck = "1.0.3"
quickcheck_macros = "1.0.0"
quote = "1.0.37"
quote = "1.0.38"
rayon = "1.10.0"
regex = "1.11.1"
rustc-hash = "2.1.0"
schemars = { version = "0.8.21", features = ["indexmap2", "smallvec"] }
serde = { version = "1.0.216", features = ["derive"] }
serde = { version = "1.0.217", features = ["derive"] }
serde_ini = "0.2.0"
serde_json = "1.0.133"
serde_json = "1.0.134"
similar = "2.6.0"
smallvec = { version = "1.13.2", features = ["union", "const_new", "serde"] }
syn = "1.0.109"
Expand All @@ -213,7 +214,6 @@ tracing-subscriber = "0.3.19"
unicode-bom = "2.0.3"
unicode-width = "0.1.12"


[profile.dev.package.biome_wasm]
debug = true
opt-level = "s"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.benchmark
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.82.0@sha256:d9c3c6f1264a547d84560e06ffd79ed7a799ce0bff0980b26cf10d29af888377
FROM rust:1.83.0@sha256:a45bf1f5d9af0a23b26703b3500d70af1abff7f984a7abef5a104b42c02a292b
WORKDIR /usr/src/

# https://github.com/nodesource/distributions
Expand Down
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "8.18.1",
"dprint": "0.47.6",
"dprint": "0.48.0",
"eslint": "9.17.0",
"prettier": "3.3.3"
}
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_analyze/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<'a, R> RuleContext<'a, R>
where
R: Rule + Sized + 'static,
{
#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
pub fn new(
query_result: &'a RuleQueryResult<R>,
root: &'a RuleRoot<R>,
Expand Down
12 changes: 6 additions & 6 deletions crates/biome_analyze/src/rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ macro_rules! declare_lint_rule {
// This is implemented by calling the `group_category!` macro from the
// parent module (that should be declared by a call to `declare_group!`)
// and providing it with the name of this rule as a string literal token
#[allow(unused_macros)]
#[expect(unused_macros)]
macro_rules! rule_category {
() => { super::group_category!( $name ) };
}
Expand Down Expand Up @@ -740,7 +740,7 @@ macro_rules! declare_syntax_rule {
// This is implemented by calling the `group_category!` macro from the
// parent module (that should be declared by a call to `declare_group!`)
// and providing it with the name of this rule as a string literal token
#[allow(unused_macros)]
#[expect(unused_macros)]
macro_rules! rule_category {
() => { super::group_category!( $name ) };
}
Expand Down Expand Up @@ -807,7 +807,7 @@ macro_rules! declare_source_rule {
);

/// This macro returns the corresponding [ActionCategory] to use inside the [RuleAction]
#[allow(unused_macros)]
#[expect(unused_macros)]
macro_rules! rule_action_category {
() => { ActionCategory::Source(SourceActionKind::Other(Cow::Borrowed($name))) };
}
Expand Down Expand Up @@ -852,7 +852,7 @@ macro_rules! declare_lint_group {
// name within this group.
// This is implemented by calling the `category_concat!` macro with the
// "lint" prefix, the name of this group, and the rule name argument
#[allow(unused_macros)]
#[expect(unused_macros)]
macro_rules! group_category {
( $rule_name:tt ) => { $crate::category_concat!( "lint", $name, $rule_name ) };
}
Expand Down Expand Up @@ -889,7 +889,7 @@ macro_rules! declare_assist_group {
// name within this group.
// This is implemented by calling the `category_concat!` macro with the
// "lint" prefix, the name of this group, and the rule name argument
#[allow(unused_macros)]
#[expect(unused_macros)]
macro_rules! group_category {
( $rule_name:tt ) => { $crate::category_concat!( "assist", $name, $rule_name ) };
}
Expand Down Expand Up @@ -926,7 +926,7 @@ macro_rules! declare_syntax_group {
// name within this group.
// This is implemented by calling the `category_concat!` macro with the
// "lint" prefix, the name of this group, and the rule name argument
#[allow(unused_macros)]
#[expect(unused_macros)]
macro_rules! group_category {
( $rule_name:tt ) => { $crate::category_concat!( "syntax", $name, $rule_name ) };
}
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_analyze/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl MissingServicesDiagnostic {
}

pub trait FromServices: Sized {
#[allow(clippy::result_large_err)]
#[expect(clippy::result_large_err)]
fn from_services(
rule_key: &RuleKey,
services: &ServiceBag,
Expand Down
1 change: 0 additions & 1 deletion crates/biome_aria_metadata/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ enum AriaAttributeType {

#[derive(Debug, Default, biome_deserialize_macros::Merge, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[allow(dead_code)]
struct ValueDefinition {
description: String,
is_default: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ tracing-subscriber = { workspace = true, features = ["env-filter", "json"]
tracing-tree = "0.4.0"

[target.'cfg(unix)'.dependencies]
libc = "0.2.167"
libc = "0.2.169"
tokio = { workspace = true, features = ["process"] }

[target.'cfg(windows)'.dependencies]
Expand Down
6 changes: 3 additions & 3 deletions crates/biome_cli/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ struct JsonRpcRequest<P> {
#[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
struct JsonRpcResponse {
#[allow(dead_code)]
#[expect(dead_code)]
jsonrpc: Cow<'static, str>,
id: u64,
result: Option<Box<RawValue>>,
Expand All @@ -431,10 +431,10 @@ struct JsonRpcResponse {

#[derive(Debug, Deserialize)]
struct JsonRpcError {
#[allow(dead_code)]
#[expect(dead_code)]
code: i64,
message: String,
#[allow(dead_code)]
#[expect(dead_code)]
data: Option<Box<RawValue>>,
}

Expand Down
4 changes: 0 additions & 4 deletions crates/biome_cli/tests/commands/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,10 @@ const APPLY_ATTRIBUTE_POSITION_AFTER: &str = r#"<Foo
</Foo>;
"#;

// Without this, Test (windows-latest) fails with: `warning: constant `DEFAULT_CONFIGURATION_BEFORE` is never used`
#[allow(dead_code)]
const DEFAULT_CONFIGURATION_BEFORE: &str = r#"function f() {
return { a, b }
}"#;

// Without this, Test (windows-latest) fails with: `warning: constant `DEFAULT_CONFIGURATION_AFTER` is never used`
#[allow(dead_code)]
const DEFAULT_CONFIGURATION_AFTER: &str = "function f() {
return { a, b };
}
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_configuration/src/editorconfig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub enum EditorconfigValue<T> {
}

// This is an `Into` because implementing `From` is not possible because you can't implement traits for a type you don't own.
#[allow(clippy::from_over_into)]
#[expect(clippy::from_over_into)]
impl<T: Default> Into<Option<T>> for EditorconfigValue<T> {
fn into(self) -> Option<T> {
match self {
Expand Down
7 changes: 4 additions & 3 deletions crates/biome_configuration/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! This module contains the configuration of `biome.json`
//!
//! The configuration is divided by "tool", and then it's possible to further customise it
//! by language. The language might further options divided by tool.
//! by language. The language might further option divided by tool.
pub mod analyzer;
pub mod css;
pub mod diagnostics;
Expand Down Expand Up @@ -413,6 +413,7 @@ impl ConfigurationPathHint {
mod test {
use oxc_resolver::{FileMetadata, ResolveOptions, ResolverGeneric};
use std::env;
use std::fs::read_link;
use std::path::{Path, PathBuf};

#[test]
Expand All @@ -435,8 +436,8 @@ mod test {
Ok(FileMetadata::new(true, false, false))
}

fn canonicalize(&self, _path: &Path) -> std::io::Result<PathBuf> {
env::current_dir().unwrap().canonicalize()
fn read_link(&self, path: &Path) -> std::io::Result<PathBuf> {
read_link(path)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl Visitor for NoDeclarationBlockShorthandPropertyOverridesVisitor {
.and_then(|property_node| property_node.name().ok())
{
let prop = prop_node.to_trimmed_string();
#[allow(clippy::disallowed_methods)]
#[expect(clippy::disallowed_methods)]
let prop_lowercase = prop.to_lowercase();

let prop_prefix = vender_prefix(&prop_lowercase);
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_css_analyze/tests/spec_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fn run_test(input: &'static str, _: &str, _: &str, _: &str) {
}
}

#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
pub(crate) fn analyze_and_snap(
snapshot: &mut String,
input_code: &str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,20 @@ a { -webkit-border-radius: 12px; -webkit-border-radius: 10px; }
a { color: red !important; color: blue; }

a { color: red !important; color: blue !important; }

a {
@supports (color: pink) {
color: pink;
color: orange;
}
}

a {
@supports (color: pink) {
color: pink;
&:hover {
color: orange;
color: black;
}
}
}
Loading

0 comments on commit 562b249

Please sign in to comment.