diff --git a/src/main/comments/attach.js b/src/main/comments/attach.js index 6bf14c22d..956d8267b 100644 --- a/src/main/comments/attach.js +++ b/src/main/comments/attach.js @@ -142,8 +142,6 @@ function attachComments(ast, options) { const tiesToBreak = []; const { - locStart, - locEnd, printer: { experimentalFeatures: { // TODO: Make this as default behavior @@ -180,25 +178,6 @@ function attachComments(ast, options) { isLastComment, } = context; - if ( - options.parser === "json" || - options.parser === "json5" || - options.parser === "jsonc" || - options.parser === "__js_expression" || - options.parser === "__ts_expression" || - options.parser === "__vue_expression" || - options.parser === "__vue_ts_expression" - ) { - if (locStart(comment) - locStart(ast) <= 0) { - addLeadingComment(ast, comment); - continue; - } - if (locEnd(comment) > locEnd(ast)) { - addTrailingComment(ast, comment); - continue; - } - } - let args; if (avoidAstMutation) { args = [context];