Use isBlockComment/isLineComment in canAttachComment (#9849)
This commit is contained in:
1 parent
643f8906e0
commit
f49e72e371
1 file changed
+3
-4
@@ -45,6 +45,7 @@ const {
|
||||
isGetterOrSetter,
|
||||
isTheOnlyJSXElementInMarkdown,
|
||||
isBlockComment,
|
||||
isLineComment,
|
||||
needsHardlineAfterDanglingComment,
|
||||
rawText,
|
||||
shouldPrintComma,
|
||||
@@ -1271,10 +1272,8 @@ function printRegex(node) {
|
||||
function canAttachComment(node) {
|
||||
return (
|
||||
node.type &&
|
||||
node.type !== "CommentBlock" &&
|
||||
node.type !== "CommentLine" &&
|
||||
node.type !== "Line" &&
|
||||
node.type !== "Block" &&
|
||||
!isBlockComment(node) &&
|
||||
!isLineComment(node) &&
|
||||
node.type !== "EmptyStatement" &&
|
||||
node.type !== "TemplateElement" &&
|
||||
node.type !== "Import"
|
||||
|
||||
Reference in new issue
Block a user