feat(task/prettier-conformance): add spacing before block in IfStatement (#1374)

This commit is contained in:
Dunqing 2023-11-17 20:19:26 +08:00 committed by GitHub
parent badf6f51cf
commit 7b85843981
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -117,6 +117,7 @@ impl<'a> Format<'a> for IfStatement<'a> {
ss!("if ("),
group!(p, indent!(p, softline!(), format!(p, self.test), softline!())),
ss!(")"),
ss!(" "),
format!(p, self.consequent)
];
parts.push(opening);

View file

@ -1,4 +1,4 @@
Compatibility: 51/881 (5.79%)
Compatibility: 52/881 (5.90%)
# Failed
@ -58,7 +58,6 @@ Compatibility: 51/881 (5.79%)
### assignment
* assignment/binaryish.js
* assignment/call-with-template.js
* assignment/chain-two-segments.js
* assignment/chain.js
* assignment/destructuring-array.js
* assignment/destructuring-heuristic.js
@ -108,6 +107,7 @@ Compatibility: 51/881 (5.79%)
### babel-plugins
* babel-plugins/async-do-expressions.js
* babel-plugins/async-generators.js
* babel-plugins/bigint.js
* babel-plugins/class-properties.js
* babel-plugins/class-static-block.js
@ -532,7 +532,6 @@ Compatibility: 51/881 (5.79%)
### expression_statement
* expression_statement/no_regression.js
* expression_statement/use_strict.js
### for
* for/comment.js
@ -582,6 +581,7 @@ Compatibility: 51/881 (5.79%)
### generator
* generator/anonymous.js
* generator/async.js
* generator/function-name-starts-with-get.js
### identifier/for-of
* identifier/for-of/await.js
@ -996,7 +996,6 @@ Compatibility: 51/881 (5.79%)
* shebang/shebang.js
### sloppy-mode
* sloppy-mode/function-declaration-in-if.js
* sloppy-mode/function-declaration-in-while.js
* sloppy-mode/labeled-function-declaration.js