@huggingface/prettier-plugin-vertical-align
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -20,3 +20,6 @@ import tsParsers from "prettier/parser-typescript.js"; | ||
setOriginalPrinter(options.printer); | ||
options.printer = printer; | ||
options.printer = { | ||
...options.printer, | ||
...printer | ||
}; | ||
return parser.preprocess?.(text, options) ?? text; | ||
@@ -23,0 +26,0 @@ } |
import prettier from "prettier"; | ||
import { inspect } from "node:util"; | ||
// import { inspect } from "node:util"; | ||
const { doc } = prettier; | ||
@@ -12,5 +12,9 @@ import { getOriginalPrinter } from "./original-printer.js"; | ||
const node = path.node; | ||
if (node.type === "Program") { | ||
console.log("node", inspect(node.body, { depth: 10 })); | ||
} | ||
// if (node.comments) { | ||
// console.log("!!COMMENTS"); | ||
// } | ||
// if (node.type === "Program") { | ||
// console.log("node", inspect(path, {depth: 10})); | ||
// console.log(options); | ||
// } | ||
if (node[keyLengthSymbol]) { | ||
@@ -17,0 +21,0 @@ const keyLength = node[keyLengthSymbol]; |
{ | ||
"name": "@huggingface/prettier-plugin-vertical-align", | ||
"packageManager": "pnpm@9.11.0", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -25,3 +25,6 @@ import type { Parser, Printer } from "prettier"; | ||
setOriginalPrinter(options.printer as Printer); | ||
options.printer = printer; | ||
options.printer = { | ||
...(options.printer as Printer), | ||
...printer | ||
}; | ||
return parser.preprocess?.(text, options) ?? text; | ||
@@ -28,0 +31,0 @@ } |
@@ -19,4 +19,9 @@ import type { AstPath, Printer } from "prettier"; | ||
// if (node.comments) { | ||
// console.log("!!COMMENTS"); | ||
// } | ||
// if (node.type === "Program") { | ||
// console.log("node", inspect(node.body, {depth: 10})); | ||
// console.log("node", inspect(path, {depth: 10})); | ||
// console.log(options); | ||
// } | ||
@@ -23,0 +28,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15208
270