From f1816884c6dd9c4ef03e8e5f2162afa3be884f3c Mon Sep 17 00:00:00 2001 From: Dunqing Date: Sat, 28 Dec 2024 17:08:35 +0800 Subject: [PATCH] reset --- crates/oxc_transformer/src/options/env.rs | 10 ++-------- crates/oxc_transformer/src/options/mod.rs | 3 +-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/crates/oxc_transformer/src/options/env.rs b/crates/oxc_transformer/src/options/env.rs index eee0aa4586115..d720991cc4fe7 100644 --- a/crates/oxc_transformer/src/options/env.rs +++ b/crates/oxc_transformer/src/options/env.rs @@ -84,11 +84,7 @@ impl EnvOptions { es2021: ES2021Options { logical_assignment_operators: true }, es2022: ES2022Options { class_static_block: true, - class_properties: if include_unfinished_plugins { - Some(ClassPropertiesOptions::default()) - } else { - None - }, + class_properties: Some(ClassPropertiesOptions::default()), }, } } @@ -139,9 +135,7 @@ impl EnvOptions { } } engine_targets.insert(Engine::Es, es_target.unwrap_or(ESTarget::default()).version()); - let mut env_options = EnvOptions::from(engine_targets); - env_options.es2022.class_properties = None; - Ok(env_options) + Ok(EnvOptions::from(engine_targets)) } } diff --git a/crates/oxc_transformer/src/options/mod.rs b/crates/oxc_transformer/src/options/mod.rs index 82a40e53e9153..b433e66029ce9 100644 --- a/crates/oxc_transformer/src/options/mod.rs +++ b/crates/oxc_transformer/src/options/mod.rs @@ -123,8 +123,7 @@ impl From for TransformOptions { fn from(target: ESTarget) -> Self { let mut engine_targets = EngineTargets::default(); engine_targets.insert(Engine::Es, target.version()); - let mut env = EnvOptions::from(engine_targets); - env.es2022.class_properties = None; + let env = EnvOptions::from(engine_targets); Self { env, ..Self::default() } } }