Skip to content

Commit

Permalink
chore: remove unnecessary symbols and add missing symbols
Browse files Browse the repository at this point in the history
Signed-off-by: tiaoxizhan <[email protected]>
  • Loading branch information
tiaoxizhan committed Sep 12, 2024
1 parent b260d5b commit 554b721
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ impl Rule for UseSelfClosingElements {
slash_token.push_str(trivia.text());
}
// check if previous `open_element` have a whitespace before `>`
// this step make sure we could convert <div></div> -> <div />
// <div test="some""></div> -> <div test="some" />
// this step make sure we could convert <div></div> -> <div />></div> -> <div test="
// <div test="some""some" />
let prev_token = r_angle_token.prev_token();
let need_extra_whitespace = prev_token
.as_ref()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl FormatNodeRule<JsConstructorParameters> for FormatJsConstructorParameters {
_: &JsConstructorParameters,
_: &mut JsFormatter,
) -> FormatResult<()> {
// Formatted inside of `FormatJsAnyParameters
// Formatted inside of `FormatJsAnyParameters`
Ok(())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl FormatNodeRule<JsStaticInitializationBlockClassMember>
_: &JsStaticInitializationBlockClassMember,
_: &mut JsFormatter,
) -> FormatResult<()> {
// Formatted inside of `fmt_fields
// Formatted inside of `fmt_fields`
Ok(())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl FormatRule<TsTypeParameterList> for FormatTsTypeParameterList {
&& !f.options().source_type().variant().is_standard()
&& node.syntax().grand_parent().kind()
== Some(JsSyntaxKind::JS_ARROW_FUNCTION_EXPRESSION)
// Ignore Type parameter with an `extends`` clause or a default type.
// Ignore Type parameter with an `extends` clause or a default type.
&& !node.first().and_then(|param| param.ok())
.is_some_and(|type_parameter| type_parameter.constraint().is_some() || type_parameter.default().is_some())
{
Expand Down

0 comments on commit 554b721

Please sign in to comment.