@huggingface/prettier-plugin-vertical-align
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -63,6 +63,6 @@ import prettier from "prettier"; | ||
// console.log("node", inspect(node, {depth: 10})); | ||
const properties = nodeProperties(node).filter((node) => options.alignInGroups === "always" || !isProperty(node) | ||
? // Multiline values break groups | ||
const properties = nodeProperties(node).filter((node) => !isProperty(node) | ||
? | ||
node.loc.start.line === node.loc.end.line | ||
: node.key.loc.start.line === node.key.loc.end.line); | ||
: node.key.loc.start.line === node[valueField(node)].loc.start.line); | ||
for (const prop of properties) { | ||
@@ -69,0 +69,0 @@ const propStart = prop.comments ? prop.comments[0].loc.start.line : prop.loc.start.line; |
{ | ||
"name": "@huggingface/prettier-plugin-vertical-align", | ||
"packageManager": "pnpm@9.11.0", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -81,6 +81,6 @@ import type { AstPath, Printer } from "prettier"; | ||
const properties: Node[] = nodeProperties(node).filter((node: Node) => | ||
options.alignInGroups === "always" || !isProperty(node) | ||
? // Multiline values break groups | ||
!isProperty(node) | ||
? | ||
node.loc.start.line === node.loc.end.line | ||
: node.key.loc.start.line === node.key.loc.end.line, | ||
: node.key.loc.start.line === node[valueField(node)].loc.start.line, | ||
); | ||
@@ -87,0 +87,0 @@ |
Sorry, the diff of this file is not supported yet
47873