diff --git a/crates/oxc_transformer/src/options/env.rs b/crates/oxc_transformer/src/options/env.rs index eee0aa45861156..d720991cc4fe72 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 aa2963c035d490..ef30e08e3f3fda 100644 --- a/crates/oxc_transformer/src/options/mod.rs +++ b/crates/oxc_transformer/src/options/mod.rs @@ -122,8 +122,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() } } }