diff --git a/crates/oxc_prettier/src/format/module.rs b/crates/oxc_prettier/src/format/module.rs index 6b1816021..13bff05b7 100644 --- a/crates/oxc_prettier/src/format/module.rs +++ b/crates/oxc_prettier/src/format/module.rs @@ -87,7 +87,7 @@ pub fn print_module_specifiers<'a, T: Format<'a>>( ], if_break!(p, if p.should_print_es5_comma() { "," } else { "" }), if p.options.bracket_spacing { line!() } else { softline!() }, - ss!("}") + ss!("}"), ]); } else { parts.push(ss!("{")); diff --git a/crates/oxc_prettier/src/macros.rs b/crates/oxc_prettier/src/macros.rs index 6c70b8740..636e695cb 100644 --- a/crates/oxc_prettier/src/macros.rs +++ b/crates/oxc_prettier/src/macros.rs @@ -24,7 +24,7 @@ macro_rules! string { #[macro_export] macro_rules! indent { - ($p:ident, $( $x:expr ),* ) => { + ($p:ident, $( $x:expr ),* $(,)?) => { { let mut temp_vec = $p.vec(); $( @@ -58,7 +58,7 @@ macro_rules! hardline { #[macro_export] macro_rules! array { - ($p:ident, $( $x:expr ),* ) => { + ($p:ident, $( $x:expr ),* $(,)?) => { { let mut temp_vec = $p.vec(); $( @@ -71,7 +71,7 @@ macro_rules! array { #[macro_export] macro_rules! group { - ($p:ident, $( $x:expr ),* ) => { + ($p:ident, $( $x:expr ),* $(,)?) => { { let mut temp_vec = $p.vec(); $(