mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
chore(prettier): allow trailing comma in some macros (#1405)
This commit is contained in:
parent
323f2f9789
commit
c9f7f1308f
2 changed files with 4 additions and 4 deletions
|
|
@ -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!("{"));
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
$(
|
||||
|
|
|
|||
Loading…
Reference in a new issue