mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(prettier): remove redundant newline and semicolons from the Program (#1284)
This commit is contained in:
parent
3942256af4
commit
0297cf7cc7
2 changed files with 3 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ use oxc_allocator::{Box, Vec};
|
|||
use oxc_ast::ast::*;
|
||||
use oxc_syntax::operator::{BinaryOperator, UnaryOperator};
|
||||
|
||||
use crate::{array, doc::Doc, format, group, hardline, indent, softline, string, Prettier};
|
||||
use crate::{array, doc::Doc, format, group, indent, softline, string, Prettier};
|
||||
|
||||
pub trait Format<'a> {
|
||||
#[must_use]
|
||||
|
|
@ -30,8 +30,6 @@ impl<'a> Format<'a> for Program<'a> {
|
|||
fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> {
|
||||
let mut parts = p.vec();
|
||||
parts.extend(self.body.iter().map(|stmt| stmt.format(p)));
|
||||
parts.push(string!(p, ";"));
|
||||
parts.push(hardline!());
|
||||
Doc::Array(parts)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Compatibility: 1/173 (0.01%)
|
||||
Compatibility: 0/173 (0.00%)
|
||||
|
||||
# Failed
|
||||
|
||||
|
|
@ -11,6 +11,7 @@ Compatibility: 1/173 (0.01%)
|
|||
* arrows-bind
|
||||
* assignment
|
||||
* assignment-comments
|
||||
* assignment-expression
|
||||
* async
|
||||
* async-do-expressions
|
||||
* babel-plugins
|
||||
|
|
|
|||
Loading…
Reference in a new issue