From d4ebd14ae01e4c27c220cc2ea659d5612fbf3341 Mon Sep 17 00:00:00 2001 From: camc314 <18101008+camc314@users.noreply.github.com> Date: Tue, 8 Jul 2025 16:10:43 +0000 Subject: [PATCH] feat(linter): add `oxlint2`/`disable_oxlint2` feature flags (#12130) --- apps/oxlint/Cargo.toml | 2 ++ crates/oxc_linter/Cargo.toml | 2 ++ napi/oxlint2/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/oxlint/Cargo.toml b/apps/oxlint/Cargo.toml index b8dfa14ea6ccc..6719e3570181b 100644 --- a/apps/oxlint/Cargo.toml +++ b/apps/oxlint/Cargo.toml @@ -60,3 +60,5 @@ lazy-regex = { workspace = true } [features] default = [] allocator = ["dep:mimalloc-safe"] +oxlint2 = ["oxc_linter/oxlint2"] +disable_oxlint2 = ["oxc_linter/disable_oxlint2"] diff --git a/crates/oxc_linter/Cargo.toml b/crates/oxc_linter/Cargo.toml index c194e28bc0814..eed1e62183ba7 100644 --- a/crates/oxc_linter/Cargo.toml +++ b/crates/oxc_linter/Cargo.toml @@ -17,6 +17,8 @@ description.workspace = true default = [] ruledocs = ["oxc_macros/ruledocs"] # Enables the `ruledocs` feature for conditional compilation language_server = ["oxc_data_structures/rope"] # For the Runtime to support needed information for the language server +oxlint2 = [] +disable_oxlint2 = [] [lints] workspace = true diff --git a/napi/oxlint2/Cargo.toml b/napi/oxlint2/Cargo.toml index 4fc5b60480ff4..b50e1314aabfc 100644 --- a/napi/oxlint2/Cargo.toml +++ b/napi/oxlint2/Cargo.toml @@ -22,7 +22,7 @@ test = false doctest = false [dependencies] -oxlint = { workspace = true } +oxlint = { workspace = true, features = ["oxlint2"] } napi = { workspace = true, features = ["async"] } napi-derive = { workspace = true }