diff --git a/Cargo.lock b/Cargo.lock index a4d7be3902939..30345350655bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2008,7 +2008,6 @@ dependencies = [ "json-strip-comments", "language-tags", "lazy-regex", - "lazy_static", "markdown", "memchr", "nonmax", @@ -3989,9 +3988,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "bdbb9122ea75b11bf96e7492afb723e8a7fbe12c67417aa95e7e3d18144d37cd" dependencies = [ "yoke", "zerofrom", diff --git a/Cargo.toml b/Cargo.toml index 99f0498812309..a31fffa61711c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -198,7 +198,6 @@ itoa = "1.0.15" json-strip-comments = "1.0.4" language-tags = "0.3.2" lazy-regex = "3.4.1" -lazy_static = "1.5.0" log = "0.4.27" markdown = "1.0.0" memchr = "2.7.5" @@ -236,7 +235,7 @@ ureq = { version = "3.0.12", default-features = false } walkdir = "2.5.0" [workspace.metadata.cargo-shear] -ignored = ["napi", "oxc_transform_napi", "oxc_parser_napi", "oxc_minify_napi", "prettyplease", "lazy_static"] +ignored = ["napi", "oxc_transform_napi", "oxc_parser_napi", "oxc_minify_napi", "prettyplease"] [profile.dev] # Disabling debug info speeds up local and CI builds, diff --git a/crates/oxc_linter/Cargo.toml b/crates/oxc_linter/Cargo.toml index eb55781817df7..a004ad8dba2cf 100644 --- a/crates/oxc_linter/Cargo.toml +++ b/crates/oxc_linter/Cargo.toml @@ -60,7 +60,6 @@ javascript-globals = { workspace = true } json-strip-comments = { workspace = true } language-tags = { workspace = true } lazy-regex = { workspace = true } -lazy_static = { workspace = true } memchr = { workspace = true } nonmax = { workspace = true } phf = { workspace = true, features = ["macros"] } diff --git a/crates/oxc_macros/src/declare_all_lint_rules.rs b/crates/oxc_macros/src/declare_all_lint_rules.rs index 43aacdc06915d..eee820fbacce6 100644 --- a/crates/oxc_macros/src/declare_all_lint_rules.rs +++ b/crates/oxc_macros/src/declare_all_lint_rules.rs @@ -205,11 +205,9 @@ pub fn declare_all_lint_rules(metadata: AllLintRulesMeta) -> TokenStream { } } - lazy_static::lazy_static! { - pub static ref RULES: Vec = vec![ - #(RuleEnum::#struct_names(#struct_names::default())),* - ]; - } + pub static RULES: std::sync::LazyLock> = std::sync::LazyLock::new(|| vec![ + #(RuleEnum::#struct_names(#struct_names::default())),* + ]); }; TokenStream::from(expanded)