Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ah-yu committed Apr 23, 2024
1 parent 0f784aa commit 57d8619
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/biome_js_formatter/src/comments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1331,14 +1331,16 @@ fn handle_import_named_clause_comments(
// import { a } from // comment
// "foo"
// ```
if specifier_list.len() != 0 && comment.text_position() == CommentTextPosition::EndOfLine{
if specifier_list.len() != 0
&& comment.text_position() == CommentTextPosition::EndOfLine
{
if let Some(Ok(last_specifier)) = specifier_list.last() {
return CommentPlacement::trailing(last_specifier.into_syntax(), comment);
}
} else {
// attach comments to the import specifier as leading comments if comments are placed after the from keyword
// ```javascript
// import {} from // comment
// import {} from // comment
// "foo"
// ```
let is_after_from_keyword = comment
Expand Down

0 comments on commit 57d8619

Please sign in to comment.