{"id":15590926,"url":"https://github.com/joshuakgoldberg/prettier-plugin-curly","last_synced_at":"2025-05-07T07:19:42.052Z","repository":{"id":174433989,"uuid":"652228113","full_name":"JoshuaKGoldberg/prettier-plugin-curly","owner":"JoshuaKGoldberg","description":"Prettier plugin to enforce consistent brace style for all control statements. 🥌","archived":false,"fork":false,"pushed_at":"2025-05-06T14:54:06.000Z","size":2670,"stargazers_count":58,"open_issues_count":6,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T07:19:24.147Z","etag":null,"topics":["curly","formatting","prettier","prettier-plugin"],"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/JoshuaKGoldberg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"JoshuaKGoldberg"}},"created_at":"2023-06-11T13:52:48.000Z","updated_at":"2025-05-06T09:21:56.000Z","dependencies_parsed_at":"2024-04-14T13:28:19.501Z","dependency_job_id":"44d57ee4-1b81-48ef-819b-aeb7ea92141c","html_url":"https://github.com/JoshuaKGoldberg/prettier-plugin-curly","commit_stats":null,"previous_names":["joshuakgoldberg/prettier-plugin-curly"],"tags_count":13,"template":false,"template_full_name":"JoshuaKGoldberg/create-typescript-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoshuaKGoldberg%2Fprettier-plugin-curly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoshuaKGoldberg%2Fprettier-plugin-curly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoshuaKGoldberg%2Fprettier-plugin-curly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoshuaKGoldberg%2Fprettier-plugin-curly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoshuaKGoldberg","download_url":"https://codeload.github.com/JoshuaKGoldberg/prettier-plugin-curly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252831282,"owners_count":21810784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["curly","formatting","prettier","prettier-plugin"],"created_at":"2024-10-02T23:33:49.108Z","updated_at":"2025-05-07T07:19:42.039Z","avatar_url":"https://github.com/JoshuaKGoldberg.png","language":"TypeScript","funding_links":["https://github.com/sponsors/JoshuaKGoldberg"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eprettier-plugin-curly\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\tPrettier plugin to enforce consistent brace style for all control statements.\n\t🥌\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003c!-- prettier-ignore-start --\u003e\n\t\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\t\u003ca href=\"#contributors\" target=\"_blank\"\u003e\u003cimg alt=\"👪 All Contributors: 8\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-8-21bb42.svg\" /\u003e\u003c/a\u003e\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\t\u003c!-- prettier-ignore-end --\u003e\n\t\u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/blob/main/.github/CODE_OF_CONDUCT.md\" target=\"_blank\"\u003e\u003cimg alt=\"🤝 Code of Conduct: Kept\" src=\"https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42\" /\u003e\u003c/a\u003e\n\t\u003ca href=\"https://codecov.io/gh/JoshuaKGoldberg/prettier-plugin-curly\" target=\"_blank\"\u003e\u003cimg alt=\"🧪 Coverage\" src=\"https://img.shields.io/codecov/c/github/JoshuaKGoldberg/prettier-plugin-curly?label=%F0%9F%A7%AA%20coverage\" /\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/blob/main/LICENSE.md\" target=\"_blank\"\u003e\u003cimg alt=\"📝 License: MIT\" src=\"https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg\" /\u003e\u003c/a\u003e\n\t\u003ca href=\"http://npmjs.com/package/prettier-plugin-curly\" target=\"_blank\"\u003e\u003cimg alt=\"📦 npm version\" src=\"https://img.shields.io/npm/v/prettier-plugin-curly?color=21bb42\u0026label=%F0%9F%93%A6%20npm\" /\u003e\u003c/a\u003e\n\t\u003cimg alt=\"💪 TypeScript: Strict\" src=\"https://img.shields.io/badge/%F0%9F%92%AA_typescript-strict-21bb42.svg\" /\u003e\n\u003c/p\u003e\n\n## Usage\n\nFirst install this package as a dev dependency in your package manager of choice:\n\n```shell\nnpm i prettier-plugin-curly -D\n```\n\nYou'll then be able to list it as a [Prettier plugin](https://prettier.io/docs/en/plugins.html) in your [Prettier config](https://prettier.io/docs/en/configuration.html):\n\n```json\n{\n\t\"plugins\": [\"prettier-plugin-curly\"]\n}\n```\n\nAs a result, Prettier will add `{}` curly brackets to control flow statements such as `for`, `if`, and `while`:\n\n```diff\n- if (abc) def;\n+ if (abc) {\n+   def;\n+ }\n```\n\n### But Why?\n\nPrettier generally does not modify the structure of code: which includes [not enforcing curly brackets](https://github.com/prettier/prettier/issues/7659) to match [ESLint's `curly` rule](https://eslint.org/docs/latest/rules/curly).\nHowever, enforcing `curly` generally does not modify code runtime behavior, and is often desirable for code consistency and to avoid accidental bugs.\nThis plugin enforces the equivalent of [`curly`'s `all` option](https://eslint.org/docs/latest/rules/curly#all) at the Prettier level.\n\n\u003e See [The Blurry Line Between Formatting and Style](https://blog.joshuakgoldberg.com/the-blurry-line-between-formatting-and-style) for more details.\n\n## Development\n\nSee [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md), then [`.github/DEVELOPMENT.md`](./.github/DEVELOPMENT.md).\nThanks! 🥌\n\n## Contributors\n\n\u003c!-- spellchecker: disable --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://effectivetypescript.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/98301?v=4?s=100\" width=\"100px;\" alt=\"Dan Vanderkam\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDan Vanderkam\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=author%3Adanvk\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/HolgerJeromin\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/2410353?v=4?s=100\" width=\"100px;\" alt=\"Holger Jeromin\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHolger Jeromin\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=author%3Aholgerjeromin\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"http://www.joshuakgoldberg.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3335181?v=4?s=100\" width=\"100px;\" alt=\"Josh Goldberg\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJosh Goldberg\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#tool-JoshuaKGoldberg\" title=\"Tools\"\u003e🔧\u003c/a\u003e \u003ca href=\"#maintenance-JoshuaKGoldberg\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/commits?author=JoshuaKGoldberg\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#infra-JoshuaKGoldberg\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"#ideas-JoshuaKGoldberg\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=author%3AJoshuaKGoldberg\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"#content-JoshuaKGoldberg\" title=\"Content\"\u003e🖋\u003c/a\u003e \u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/commits?author=JoshuaKGoldberg\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#projectManagement-JoshuaKGoldberg\" title=\"Project Management\"\u003e📆\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://navinmoorthy.me/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/39694575?v=4?s=100\" width=\"100px;\" alt=\"Navin Moorthy\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eNavin Moorthy\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=author%3Anavin-moorthy\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/RobinHeidenis\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/29160608?v=4?s=100\" width=\"100px;\" alt=\"Robin Heidenis\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRobin Heidenis\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#tool-robinheidenis\" title=\"Tools\"\u003e🔧\u003c/a\u003e \u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/commits?author=robinheidenis\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"http://hyoban.xlog.page\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/38493346?v=4?s=100\" width=\"100px;\" alt=\"Stephen Zhou\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eStephen Zhou\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=author%3Ahyoban\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Tawpie\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/7697076?v=4?s=100\" width=\"100px;\" alt=\"tawpie\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003etawpie\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=author%3Atawpie\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://mk1.io\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/58381667?v=4?s=100\" width=\"100px;\" alt=\"ʀᴀʏ\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eʀᴀʏ\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/commits?author=so1ve\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/commits?author=so1ve\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=author%3Aso1ve\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\u003c!-- spellchecker: enable --\u003e\n\n\u003e 💝 This package was templated with [`create-typescript-app`](https://github.com/JoshuaKGoldberg/create-typescript-app) using the [Bingo framework](https://create.bingo).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshuakgoldberg%2Fprettier-plugin-curly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshuakgoldberg%2Fprettier-plugin-curly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshuakgoldberg%2Fprettier-plugin-curly/lists"}