{"id":13448603,"url":"https://github.com/prettier/plugin-pug","last_synced_at":"2026-02-24T03:00:53.376Z","repository":{"id":39579632,"uuid":"193110398","full_name":"prettier/plugin-pug","owner":"prettier","description":"Prettier Pug Plugin","archived":false,"fork":false,"pushed_at":"2026-02-19T17:57:45.000Z","size":6414,"stargazers_count":208,"open_issues_count":34,"forks_count":49,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-20T08:52:01.326Z","etag":null,"topics":["format-pug","formatter","prettier","prettier-plugin","pug","typescript"],"latest_commit_sha":null,"homepage":"https://prettier.github.io/plugin-pug","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prettier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"prettier","open_collective":"prettier","tidelift":"npm/prettier"}},"created_at":"2019-06-21T14:20:15.000Z","updated_at":"2026-01-12T07:12:09.000Z","dependencies_parsed_at":"2024-02-17T22:22:44.885Z","dependency_job_id":"2cd9fc7d-ec11-47cb-89fb-5642d2f00005","html_url":"https://github.com/prettier/plugin-pug","commit_stats":{"total_commits":1032,"total_committers":28,"mean_commits":"36.857142857142854","dds":0.4593023255813954,"last_synced_commit":"4b13e6d67f731482534199c0e9f58bcd13f921f6"},"previous_names":["shinigami92/prettier-plugin-pug"],"tags_count":105,"template":false,"template_full_name":null,"purl":"pkg:github/prettier/plugin-pug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Fplugin-pug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Fplugin-pug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Fplugin-pug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Fplugin-pug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prettier","download_url":"https://codeload.github.com/prettier/plugin-pug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Fplugin-pug/sbom","scorecard":{"id":129065,"data":{"date":"2025-08-04","repo":{"name":"github.com/prettier/plugin-pug","commit":"25329d1968f7aad2a9793f1ffe6658cd9f35518a"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":5,"checks":[{"name":"Code-Review","score":2,"reason":"Found 2/9 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:10","Warn: no topLevel permission defined: .github/workflows/coverage-report.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/coverage.yml:8","Info: topLevel 'contents' permission set to 'read': .github/workflows/docs.yml:13","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:  22 out of  22 GitHub-owned GitHubAction dependencies pinned","Info:   8 out of   8 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/prettier/.github/security.md:1","Info: Found linked content: github.com/prettier/.github/security.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/prettier/.github/security.md:1","Info: Found text in security policy: github.com/prettier/.github/security.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T04:45:54.514Z","repository_id":39579632,"created_at":"2025-08-16T04:45:54.514Z","updated_at":"2025-08-16T04:45:54.514Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29770192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T01:40:24.820Z","status":"online","status_checked_at":"2026-02-24T02:00:07.497Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["format-pug","formatter","prettier","prettier-plugin","pug","typescript"],"created_at":"2024-07-31T05:01:50.169Z","updated_at":"2026-02-24T03:00:53.337Z","avatar_url":"https://github.com/prettier.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://prettier.io\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Prettier\" src=\"https://cdn.rawgit.com/prettier/prettier-logo/master/images/prettier-icon-light.svg\"\u003e\n  \u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://pugjs.org\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Pug\" src=\"https://cdn.rawgit.com/pugjs/pug-logo/eec436cee8fd9d1726d7839cbe99d1f694692c0c/SVG/pug-final-logo-_-colour-128.svg\" height=\"210\"\u003e\n  \u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003ePrettier Pug plugin\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/prettier/plugin-pug/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"license: MIT\" src=\"https://img.shields.io/github/license/prettier/plugin-pug.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@prettier/plugin-pug\" target=\"_blank\"\u003e\n    \u003cimg alt=\"NPM package\" src=\"https://img.shields.io/npm/v/@prettier/plugin-pug.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@prettier/plugin-pug\" target=\"_blank\"\u003e\n    \u003cimg alt=\"downloads\" src=\"https://img.shields.io/npm/dt/@prettier/plugin-pug.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://prettier.io\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Code Style: Prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/prettier/plugin-pug/actions/workflows/ci.yml\"\u003e\n    \u003cimg alt=\"Build Status\" src=\"https://github.com/prettier/plugin-pug/actions/workflows/ci.yml/badge.svg?branch=main\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Intro\n\nPrettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.\n\nThis plugin adds support for the Pug language to Prettier.\n\n---\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Workarounds / Known Issues](#workarounds--known-issues)\n- [Integration with editors](#integration-with-editors)\n- [Implementation details](#implementation-details)\n- [Contributing](#contributing)\n- [Credits](#credits)\n\n## Getting started\n\nSimply install `prettier` and `@prettier/plugin-pug` as your project’s `devDependencies`:\n\n```bash\nnpm add --save-dev prettier @prettier/plugin-pug\n# or\nyarn add --dev prettier @prettier/plugin-pug\n# or\npnpm add --save-dev prettier @prettier/plugin-pug\n```\n\n## Usage\n\n### CLI\n\n```bash\nnpx prettier --write \"**/*.pug\" --plugin=\"@prettier/plugin-pug\"\n# or\nyarn prettier --write \"**/*.pug\" --plugin=\"@prettier/plugin-pug\"\n# or\npnpm prettier --write \"**/*.pug\" --plugin=\"@prettier/plugin-pug\"\n```\n\n### Configuration file (.prettierrc)\n\n```json\n{\n  \"plugins\": [\"@prettier/plugin-pug\"]\n}\n```\n\nSee [Standard Prettier overrides](https://prettier.github.io/plugin-pug/guide/standard-prettier-overrides.html) and [Pug specific options](https://prettier.github.io/plugin-pug/guide/pug-specific-options.html) for more options.\n\n### API\n\n```js\nawait prettier.format('code', {\n  parser: 'pug',\n  plugins: ['@prettier/plugin-pug'],\n});\n```\n\n## Workaround / Known Issue\n\nThere are some code examples that are not formatted well with this plugin and can damage your code.  \nBut there are workarounds for it. These generate even better pug code!\n\n### Example\n\n[Issue 114](https://github.com/prettier/plugin-pug/issues/114)\n\nIf you have tags at the top/root that are indented, they will lose indentation due to a technical limitation of pug.  \nPlease check these before committing after running this plugin for the first time and fix them manually.\n\n## Integration with editors\n\nIf you are using a text editor that supports Prettier integration (e.g. [Atom](https://atom.io/packages/prettier-atom)), you can have all Prettier perks for your Pug code too!\n\nUse [VSCode extension](https://github.com/prettier/prettier-vscode) to get support for [VSCode](https://code.visualstudio.com).\n\nIn order to get `@prettier/plugin-pug` working in projects that do not have local npm dependencies, you can install this plugin globally:\n\n```bash\nnpm install --global prettier @prettier/plugin-pug\n```\n\nIn this case, you might need to check the settings of your editor’s Prettier extension to make sure that a globally installed Prettier is used when it is not found in project dependencies (i.e. `package.json`).\n\nNevertheless, it is recommended to rely on local copies of `prettier` and `@prettier/plugin-pug` as this reduces the chance of formatting conflicts between project collaborators.\nThis may happen if different global versions of Prettier or its Pug plugin are used.\n\nInstalling `@prettier/plugin-pug` either locally or globally may require you to restart the editor if formatting does not work right away.\n\n## Implementation details\n\nThis plugin is written in TypeScript and its quality is maintained using Prettier and [Vitest](https://vitest.dev).\n\n## Contributing\n\nIf you’re interested in contributing to the development of Prettier for Pug, you can follow the [CONTRIBUTING guide from Prettier](https://github.com/prettier/prettier/blob/master/CONTRIBUTING.md), as it all applies to this repository too.\n\nTo run `@prettier/plugin-pug` locally:\n\n- Clone this repository.\n- Execute `pnpm run preflight`.\n\n## Credits\n\nThis project was inspired by https://github.com/gicentre/prettier-plugin-elm.  \nMany thanks also to [@j-f1](https://github.com/j-f1), [@lipis](https://github.com/lipis) and [@azz](https://github.com/azz) for the help in transferring this repository to the prettier organization.\n\nThanks to [@fisker](https://github.com/fisker) for the constant help and support in terms of Prettier Core support.\n\nThanks to [@Peilonrayz](https://github.com/Peilonrayz), who gave me the [idea](https://codereview.stackexchange.com/a/236031/128216) to rewrite the printer into a [class](https://github.com/prettier/plugin-pug/commit/a6e3a4b776ce67f0d5d763aaf1f88c0c860c6ed3) and thus make the code a lot more maintainable.\n\nThanks to [@lehni](https://github.com/lehni), [@SkyaTura](https://github.com/SkyaTura) and [@shadowgate15](https://github.com/shadowgate15) for the massive contribution and the introduction of many new features into the project.\n\nThanks to [@maoberlehner](https://github.com/maoberlehner) to acknowledge `@prettier/plugin-pug` as officially well TTD tested at Vue Amsterdam 2023.\n","funding_links":["https://github.com/sponsors/prettier","https://opencollective.com/prettier","https://tidelift.com/funding/github/npm/prettier"],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprettier%2Fplugin-pug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprettier%2Fplugin-pug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprettier%2Fplugin-pug/lists"}