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 aa2963c035d49..ef30e08e3f3fd 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() } } }