Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
rebase and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jan 31, 2022
1 parent e99a695 commit 9f51206
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 4 additions & 5 deletions crates/rome_formatter/src/cst.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{ts::format_statements, FormatElement, FormatResult, Formatter, ToFormatElement};
use crate::{FormatElement, FormatResult, Formatter, ToFormatElement};
use rslint_parser::ast::{
JsArrayBindingPattern, JsArrayExpression, JsArrowFunctionExpression, JsBlockStatement,
JsBooleanLiteralExpression, JsCallArguments, JsCallExpression, JsCaseClause, JsCatchClause,
Expand Down Expand Up @@ -221,10 +221,9 @@ impl ToFormatElement for SyntaxNode {
.unwrap()
.to_format_element(formatter),

JsSyntaxKind::JS_STATEMENT_LIST => Ok(format_statements(
JsStatementList::cast(self.clone()).unwrap(),
formatter,
)),
JsSyntaxKind::JS_STATEMENT_LIST => {
Ok(formatter.format_list(JsStatementList::cast(self.clone()).unwrap()))
}
JsSyntaxKind::JS_VARIABLE_DECLARATIONS => JsVariableDeclarations::cast(self.clone())
.unwrap()
.to_format_element(formatter),
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_formatter/src/ts/import/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl ToFormatElement for JsImport {
let import_clause = formatter.format_node(&self.import_clause()?)?;
let semicolon = formatter
.format_token(&self.semicolon_token())?
.unwrap_or_else(|| token(';'));
.unwrap_or_else(|| token(";"));

Ok(format_elements![
import_token,
Expand Down
2 changes: 0 additions & 2 deletions crates/rome_formatter/src/ts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ mod statements;
mod template;
mod unknown;

pub(crate) use statements::format_statements;

#[cfg(test)]
mod test {
use rslint_parser::parse_script;
Expand Down

0 comments on commit 9f51206

Please sign in to comment.