prettier-plugin-stylus
Advanced tools
Comparing version 0.0.1-beta.9 to 0.1.0
@@ -157,2 +157,17 @@ "use strict"; | ||
return ["@" + node.type, child(node, "block")]; | ||
case "object": | ||
const fields = []; | ||
for (const key in node.vals) { | ||
const isLast = Object.keys(node.vals).indexOf(key) === node.length - 1; | ||
const value = path.call(print, "vals", key, "first"); | ||
fields.push([ | ||
key, | ||
": ", | ||
value, | ||
options.trailingComma !== "none" || !isLast ? "," : "" | ||
]); | ||
} | ||
return ["{", block(fields), b.hardline, "}"]; | ||
case "member": | ||
return [child(node, "left"), ".", child(node, "right")]; | ||
default: | ||
@@ -159,0 +174,0 @@ console.error(node); |
{ | ||
"name": "prettier-plugin-stylus", | ||
"version": "0.0.1-beta.9", | ||
"version": "0.1.0", | ||
"description": "Prettier plugin for Stylus", | ||
"main": "dist/index.js", | ||
"packageManager": "pnpm@8.12.1", | ||
"files": [ | ||
@@ -42,2 +43,3 @@ "dist/!(*.js.map)" | ||
"build": "esbuild src/parser.ts src/index.ts src/utils.ts --sourcemap --format=cjs --outdir=dist", | ||
"format": "prettier . --write", | ||
"example": "pnpm build && prettier --plugin . ", | ||
@@ -44,0 +46,0 @@ "typeCheck": "tsc --noEmit", |
@@ -33,2 +33,6 @@ # prettier-plugin-stylus | ||
## Contributing | ||
Make sure you use the right version of `pnpm` as specified in `package.json`. It is also recommended to use `corepack` to automatically switch to the correct version of `pnpm`. | ||
## TODO | ||
@@ -35,0 +39,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13152
307
44