diff --git a/crates/oxc_prettier/src/format.rs b/crates/oxc_prettier/src/format.rs index 5eee5212c..45473d0e2 100644 --- a/crates/oxc_prettier/src/format.rs +++ b/crates/oxc_prettier/src/format.rs @@ -967,7 +967,12 @@ impl<'a> Format<'a> for AccessorProperty<'a> { impl<'a> Format<'a> for PrivateIdentifier { fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> { - Doc::Line + let mut parts = p.vec(); + + parts.push(p.str("#")); + parts.push(p.str(self.name.as_str())); + + Doc::Array(parts) } }