{"id":15287154,"url":"https://github.com/simonhaenisch/prettier-plugin-md-title-case","last_synced_at":"2026-01-23T04:57:17.562Z","repository":{"id":254999282,"uuid":"848204991","full_name":"simonhaenisch/prettier-plugin-md-title-case","owner":"simonhaenisch","description":"Make Prettier convert your Markdown headings to title-case.","archived":false,"fork":false,"pushed_at":"2024-08-30T08:50:59.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-26T00:58:50.647Z","etag":null,"topics":["markdown","prettier","prettier-plugin","title-case"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/prettier-plugin-md-title-case","language":"JavaScript","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/simonhaenisch.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"simonhaenisch"}},"created_at":"2024-08-27T10:30:48.000Z","updated_at":"2024-09-12T06:27:24.000Z","dependencies_parsed_at":"2024-10-14T18:31:05.470Z","dependency_job_id":null,"html_url":"https://github.com/simonhaenisch/prettier-plugin-md-title-case","commit_stats":null,"previous_names":["simonhaenisch/prettier-plugin-md-title-case"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/simonhaenisch/prettier-plugin-md-title-case","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonhaenisch%2Fprettier-plugin-md-title-case","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonhaenisch%2Fprettier-plugin-md-title-case/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonhaenisch%2Fprettier-plugin-md-title-case/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonhaenisch%2Fprettier-plugin-md-title-case/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonhaenisch","download_url":"https://codeload.github.com/simonhaenisch/prettier-plugin-md-title-case/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonhaenisch%2Fprettier-plugin-md-title-case/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28680623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T04:33:33.518Z","status":"ssl_error","status_checked_at":"2026-01-23T04:33:30.433Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["markdown","prettier","prettier-plugin","title-case"],"created_at":"2024-09-30T15:25:05.783Z","updated_at":"2026-01-23T04:57:17.542Z","avatar_url":"https://github.com/simonhaenisch.png","language":"JavaScript","funding_links":["https://github.com/sponsors/simonhaenisch"],"categories":[],"sub_categories":[],"readme":"[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/simonhaenisch/prettier-plugin-md-title-case/test.yml?label=CI)](https://github.com/simonhaenisch/prettier-plugin-md-title-case/actions?query=branch%3Amaster)\n\n# Prettier Plugin: Markdown Title Case\n\n\u003e Make sure that your Markdown headings stay consistent no matter who writes them.\n\nA plugin that makes Prettier convert your markdown headings to title case using the [title-case](https://npmjs.com/packages/title-case) npm package.\n\n**Features**\n\n- 🚀 Zero config (but configurable).\n- 🤓 No more inconsistent headings.\n- 🤙 No more fixing other people's titles.\n\n**Caveat**\n\nThis plugin overrides the built-in Prettier parser for `markdown`. This means that it is incompatible with other plugins that do the same; only the last loaded plugin that exports one of those parsers will function.\n\n## Installation\n\n```sh\nnpm install --save-dev prettier-plugin-md-title-case\n```\n\n_Note that `prettier` is a peer dependency, so make sure you have it installed in your project. Prettier 2 is not supported as this package is written with ESM syntax._\n\n## Usage\n\nConfigure Prettier to use the plugin according to the [Plugins docs](https://prettier.io/docs/en/plugins.html), for example by adding it to the `plugins` config:\n\n```js\n// prettier.config.js\n\n/** @type {import('prettier').Config} */\nexport default {\n  plugins: ['prettier-plugin-md-title-case'],\n};\n```\n\nIt doesn't support inline HTML headings.\n\n## Configuration\n\nYou can pass the supported options of `title-case` (see [npmjs.com/package/title-case#options](https://www.npmjs.com/package/title-case#options)) to your Prettier config as a JSON-stringified object via the `titleCase` option.\n\n```js\n// prettier.config.js\n\n/** @type {import('title-case').Options} */\nconst titleCaseOptions = { locale: 'en_US' };\n\n/** @type {import('prettier').Config} */\nexport default {\n  plugins: ['prettier-plugin-md-title-case'],\n  titleCase: JSON.stringify(titleCaseOptions),\n};\n```\n\n## Debug Logs\n\nIf it doesn't work, you can try to prefix your `prettier` command with `DEBUG=true` (or any truthy value) which will make this plugin print runtime exception logs.\n\n## Rationale/Disclaimer\n\nThis plugin acts outside of [Prettier's scope](https://prettier.io/docs/en/rationale#what-prettier-is-_not_-concerned-about) because _\"Prettier only prints code. It does not transform it.\"_, and technically converting the case is a code transformation. In my opinion however, Markdown is just markup and not really code, and it doesn't change the AST of the Markdown file (just the content of some text node values). Therefore the practical benefits outweigh sticking with the philosophy in this case.\n\n## License\n\n[MIT](/license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonhaenisch%2Fprettier-plugin-md-title-case","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonhaenisch%2Fprettier-plugin-md-title-case","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonhaenisch%2Fprettier-plugin-md-title-case/lists"}