{"id":20413,"library":"prettier-plugin-scaffdog","title":"Prettier Plugin for Scaffdog","description":"A Prettier plugin for formatting scaffdog template syntax. Current stable version is 4.1.0, released with scaffdog monorepo. It automatically resolves scaffdog configuration to handle custom tags and Markdown file paths. Key differentiator: no manual configuration needed after install as Prettier auto-discovers the plugin. Active development with regular releases. Requires Node.js 18+. Supports TypeScript types for configuration.","status":"active","version":"4.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/scaffdog/scaffdog","tags":["javascript","scaffdog","markdown","template","prettier-plugin","prettier","formatter","typescript"],"install":[{"cmd":"npm install prettier-plugin-scaffdog","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-plugin-scaffdog","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-plugin-scaffdog","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core engine for parsing and formatting scaffdog templates","package":"@scaffdog/engine","optional":false}],"imports":[{"note":"Config type is exported since v4.1.0 for type-safe configuration files. ESM import preferred.","wrong":"const { Config } = require('prettier-plugin-scaffdog')","symbol":"Config","correct":"import { Config } from 'prettier-plugin-scaffdog'"},{"note":"Plugin object for use with Prettier API. ESM import works; CJS require works too but not tree-shakable.","wrong":"const plugin = require('prettier-plugin-scaffdog')","symbol":"default (plugin object)","correct":"import plugin from 'prettier-plugin-scaffdog'"}],"quickstart":{"code":"// 1. Install\n// npm install --save-dev prettier prettier-plugin-scaffdog\n\n// 2. Create a scaffdog template file: example.md\n// {{ inputs.name | camel }}\n\n// 3. Format with Prettier\n// npx prettier --write example.md\n\n// 4. The file becomes:\n// {{ inputs.name | camel }}\n\n// Note: No manual plugin configuration needed; Prettier auto-detects it.","lang":"typescript","description":"Install plugin, then format a scaffdog template file with Prettier CLI. Plugin auto-discovers configuration."},"warnings":[{"fix":"Upgrade Node.js to 18+ or use version 3.x if on older Node.js.","message":"Requires Node.js 18 or later","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Set scaffdogProject option in Prettier config file relative to that config file.","message":"Plugin may not auto-resolve scaffdog project if run from a different directory","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to 4.1.0 or later to use typed config.","message":"Config type export is new in 4.1.0; previously types were not exported","severity":"deprecated","affected_versions":"<4.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev prettier-plugin-scaffdog","cause":"Plugin not installed or not in node_modules","error":"[error] Unknown plugin: \"prettier-plugin-scaffdog\""},{"fix":"Check that @scaffdog/engine is installed (should be a dependency of prettier-plugin-scaffdog)","cause":"Missing peer dependency","error":"Error: Cannot find module '@scaffdog/engine'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}