{"id":50607876,"url":"https://github.com/ony3000/prettier-plugin-brace-style","last_synced_at":"2026-06-06T00:31:33.827Z","repository":{"id":176479314,"uuid":"652086067","full_name":"ony3000/prettier-plugin-brace-style","owner":"ony3000","description":"A Prettier plugin that can apply ESLint's brace-style rules.","archived":false,"fork":false,"pushed_at":"2026-03-26T15:19:50.000Z","size":2275,"stargazers_count":34,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-27T06:07:50.386Z","etag":null,"topics":["brace","brace-style","bracket","curly","eslint","plugin","prettier","prettier-plugin","style"],"latest_commit_sha":null,"homepage":"","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/ony3000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-11T03:25:39.000Z","updated_at":"2026-03-26T15:24:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8743ec0-2b0c-43b5-9e58-62902640526a","html_url":"https://github.com/ony3000/prettier-plugin-brace-style","commit_stats":null,"previous_names":["ony3000/prettier-plugin-brace-style"],"tags_count":24,"template":false,"template_full_name":"ony3000/node-library-template","purl":"pkg:github/ony3000/prettier-plugin-brace-style","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony3000%2Fprettier-plugin-brace-style","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony3000%2Fprettier-plugin-brace-style/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony3000%2Fprettier-plugin-brace-style/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony3000%2Fprettier-plugin-brace-style/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ony3000","download_url":"https://codeload.github.com/ony3000/prettier-plugin-brace-style/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ony3000%2Fprettier-plugin-brace-style/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33965591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"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":["brace","brace-style","bracket","curly","eslint","plugin","prettier","prettier-plugin","style"],"created_at":"2026-06-06T00:31:33.285Z","updated_at":"2026-06-06T00:31:33.818Z","avatar_url":"https://github.com/ony3000.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prettier-plugin-brace-style\n\nA Prettier plugin that can apply ESLint's [brace-style](https://eslint.style/rules/brace-style) rules.\n\n![A use case for this plugin.](.github/banner.png)\n\n## Installation[^1]\n\n```sh\nnpm install -D prettier prettier-plugin-brace-style\n```\n\n[^1]: If your version of `prettier-plugin-brace-style` is less than `0.5.0`, you will also need to install `@prettier/sync`.\n\n## Configuration\n\nJSON example:\n\n```json\n{\n  \"plugins\": [\"prettier-plugin-brace-style\"]\n}\n```\n\nJS example (CommonJS module):\n\n```javascript\nmodule.exports = {\n  plugins: ['prettier-plugin-brace-style'],\n  braceStyle: 'stroustrup',\n};\n```\n\nJS example (ES module):\n\n```javascript\nexport default {\n  plugins: ['prettier-plugin-brace-style'],\n  braceStyle: 'allman',\n};\n```\n\n### Markdown/MDX Override\n\nThis plugin does not support Markdown and MDX, but if this plugin supports a language inside code blocks (e.g. Vue), unintended formatting may occur inside the code blocks.\n\nTo prevent unintended formatting, you can use configuration overrides for Markdown and MDX.\n\nJSON example:\n\n```json\n{\n  \"plugins\": [\"prettier-plugin-brace-style\"],\n  \"braceStyle\": \"stroustrup\",\n  \"overrides\": [\n    {\n      \"files\": [\"*.md\", \"*.mdx\"],\n      \"options\": {\n        \"plugins\": []\n      }\n    }\n  ]\n}\n```\n\n## Options\n\n### Brace Style\n\nEnforces consistent brace style for blocks. Same as ESLint, you can select one of `1tbs` (default), `stroustrup`, `allman`.\n\n- `1tbs` example:\n\n  ```\n  if (condition) {\n    statement1;\n  } else {\n    statement2;\n  }\n  ```\n\n- `stroustrup` example:\n\n  ```\n  if (condition) {\n    statement1;\n  }\n  else {\n    statement2;\n  }\n  ```\n\n- `allman` example:\n\n  ```\n  if (condition)\n  {\n    statement1;\n  }\n  else\n  {\n    statement2;\n  }\n  ```\n\n\u003c!-- prettier-ignore --\u003e\nDefault | CLI\u0026nbsp;Override | API\u0026nbsp;Override\n--- | --- | ---\n`\"1tbs\"` | `--brace-style \u003c1tbs\\|stroustrup\\|allman\u003e` | `braceStyle: \"\u003c1tbs\\|stroustrup\\|allman\u003e\"`\n\n## Version correlation with sibling plugins\n\nStarting with `0.6.0`, when there is a minor release on one side, I plan to reflect that change on the other side as well if possible.\n\n![Version correlation.](.github/correlation.png)\n\n## Compatibility with other Prettier plugins\n\nIf more than one Prettier plugin can handle the text you want to format, Prettier will only use the last of those plugins.\n\nIn this case, you can configure it as follows by adding [prettier-plugin-merge](https://github.com/ony3000/prettier-plugin-merge) to apply those plugins sequentially.\n\nJSON example:\n\n\u003c!-- prettier-ignore --\u003e\n```json\n{\n  \"plugins\": [\n    \"@trivago/prettier-plugin-sort-imports\",\n    \"prettier-plugin-brace-style\",\n    \"prettier-plugin-merge\"\n  ],\n  \"braceStyle\": \"stroustrup\"\n}\n```\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/ony3000/prettier-plugin-brace-style.svg?variant=adaptive)](https://starchart.cc/ony3000/prettier-plugin-brace-style)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fony3000%2Fprettier-plugin-brace-style","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fony3000%2Fprettier-plugin-brace-style","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fony3000%2Fprettier-plugin-brace-style/lists"}