diff --git a/apps/oxfmt/src/core/format.rs b/apps/oxfmt/src/core/format.rs index 761bab9296c05..224be50590c69 100644 --- a/apps/oxfmt/src/core/format.rs +++ b/apps/oxfmt/src/core/format.rs @@ -120,6 +120,7 @@ impl SourceFormatter { } /// Format JS/TS source code using oxc_formatter. + #[cfg_attr(not(feature = "napi"), expect(unused_mut))] #[instrument(level = "debug", name = "oxfmt::format::oxc_formatter", skip_all)] fn format_by_oxc_formatter( &self, diff --git a/apps/oxfmt/src/core/support.rs b/apps/oxfmt/src/core/support.rs index c6eb3c81930dc..d7ee17599fd0d 100644 --- a/apps/oxfmt/src/core/support.rs +++ b/apps/oxfmt/src/core/support.rs @@ -16,13 +16,11 @@ pub enum FormatFileStrategy { }, ExternalFormatter { path: PathBuf, - #[cfg_attr(not(feature = "napi"), expect(dead_code))] parser_name: &'static str, }, /// `package.json` is special: sorted by `sort-package-json` then formatted by external formatter. ExternalFormatterPackageJson { path: PathBuf, - #[cfg_attr(not(feature = "napi"), expect(dead_code))] parser_name: &'static str, }, }