Clean js plugins (#18839)
This commit is contained in:
1 parent
5f88a9314f
commit
91625a1220
3 files changed
+6
-8
No files matched your search
+2
-2
@@ -2,7 +2,7 @@ import { addLeadingComment } from "../../../main/comments/utilities.js";
|
|||||||
import { locStart } from "../../loc.js";
|
import { locStart } from "../../loc.js";
|
||||||
import { stripComments } from "../../utilities/strip-comments.js";
|
import { stripComments } from "../../utilities/strip-comments.js";
|
||||||
|
|
||||||
function handleForXComments({
|
function handleForXStatementComments({
|
||||||
comment,
|
comment,
|
||||||
enclosingNode,
|
enclosingNode,
|
||||||
followingNode,
|
followingNode,
|
||||||
@@ -29,4 +29,4 @@ function handleForXComments({
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export { handleForXComments };
|
export { handleForXStatementComments };
|
||||||
@@ -29,7 +29,7 @@ import {
|
|||||||
isUnionType,
|
isUnionType,
|
||||||
} from "../utilities/node-types.js";
|
} from "../utilities/node-types.js";
|
||||||
import { stripComments } from "../utilities/strip-comments.js";
|
import { stripComments } from "../utilities/strip-comments.js";
|
||||||
import { handleForXComments } from "./attach/handle-for-x-statement.js";
|
import { handleForXStatementComments } from "./attach/handle-for-x-statement-comments.js";
|
||||||
import { handleIfStatementComments } from "./attach/handle-if-statement-comments.js";
|
import { handleIfStatementComments } from "./attach/handle-if-statement-comments.js";
|
||||||
import { handleWhileLikeComments } from "./attach/handle-while-like-comments.js";
|
import { handleWhileLikeComments } from "./attach/handle-while-like-comments.js";
|
||||||
import {
|
import {
|
||||||
@@ -71,7 +71,7 @@ function handleOwnLineComment(context) {
|
|||||||
handleWhileLikeComments,
|
handleWhileLikeComments,
|
||||||
handleTryStatementComments,
|
handleTryStatementComments,
|
||||||
handleClassComments,
|
handleClassComments,
|
||||||
handleForXComments,
|
handleForXStatementComments,
|
||||||
handleUnionTypeComments,
|
handleUnionTypeComments,
|
||||||
handleMatchOrPatternComments,
|
handleMatchOrPatternComments,
|
||||||
handleOnlyComments,
|
handleOnlyComments,
|
||||||
@@ -101,7 +101,7 @@ function handleEndOfLineComment(context) {
|
|||||||
handleWhileLikeComments,
|
handleWhileLikeComments,
|
||||||
handleTryStatementComments,
|
handleTryStatementComments,
|
||||||
handleClassComments,
|
handleClassComments,
|
||||||
handleForXComments,
|
handleForXStatementComments,
|
||||||
handleLabeledStatementComments,
|
handleLabeledStatementComments,
|
||||||
handleCallExpressionComments,
|
handleCallExpressionComments,
|
||||||
handlePropertyComments,
|
handlePropertyComments,
|
||||||
@@ -127,7 +127,7 @@ function handleRemainingComment(context) {
|
|||||||
handleIgnoreComments,
|
handleIgnoreComments,
|
||||||
handleIfStatementComments,
|
handleIfStatementComments,
|
||||||
handleWhileLikeComments,
|
handleWhileLikeComments,
|
||||||
handleForXComments,
|
handleForXStatementComments,
|
||||||
handleMethodNameComments,
|
handleMethodNameComments,
|
||||||
handleOnlyComments,
|
handleOnlyComments,
|
||||||
handleTSMappedTypeComments,
|
handleTSMappedTypeComments,
|
||||||
|
|||||||
@@ -281,12 +281,10 @@ function printEstree(path, options, print, args) {
|
|||||||
return printTryStatement(path, options, print);
|
return printTryStatement(path, options, print);
|
||||||
case "CatchClause":
|
case "CatchClause":
|
||||||
return printCatchClause(path, options, print);
|
return printCatchClause(path, options, print);
|
||||||
// Note: ignoring n.lexical because it has no printing consequences.
|
|
||||||
case "SwitchStatement":
|
case "SwitchStatement":
|
||||||
return printSwitchStatement(path, options, print);
|
return printSwitchStatement(path, options, print);
|
||||||
case "SwitchCase":
|
case "SwitchCase":
|
||||||
return printSwitchCase(path, options, print);
|
return printSwitchCase(path, options, print);
|
||||||
// JSX extensions below.
|
|
||||||
case "DebuggerStatement":
|
case "DebuggerStatement":
|
||||||
return ["debugger", options.semi ? ";" : ""];
|
return ["debugger", options.semi ? ";" : ""];
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user