{"id":13610859,"url":"https://github.com/shufo/vscode-blade-formatter","last_synced_at":"2025-05-13T20:21:24.266Z","repository":{"id":36983483,"uuid":"281278680","full_name":"shufo/vscode-blade-formatter","owner":"shufo","description":"An opinionated Blade file formatter for VSCode","archived":false,"fork":false,"pushed_at":"2025-04-28T02:12:15.000Z","size":8757,"stargazers_count":4738,"open_issues_count":12,"forks_count":34,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-28T11:56:03.132Z","etag":null,"topics":["formatter","laravel","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=shufo.vscode-blade-formatter","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/shufo.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":["shufo"],"patreon":"shufo"}},"created_at":"2020-07-21T02:49:39.000Z","updated_at":"2025-04-28T05:08:18.000Z","dependencies_parsed_at":"2024-02-28T16:31:37.434Z","dependency_job_id":"7e6dd804-674e-4df4-85c7-4973225d98bb","html_url":"https://github.com/shufo/vscode-blade-formatter","commit_stats":{"total_commits":773,"total_committers":11,"mean_commits":70.27272727272727,"dds":"0.36869340232858994","last_synced_commit":"ad2bc729a8cf22d8aadecc63805dc1a7c3ea2732"},"previous_names":[],"tags_count":166,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shufo%2Fvscode-blade-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shufo%2Fvscode-blade-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shufo%2Fvscode-blade-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shufo%2Fvscode-blade-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shufo","download_url":"https://codeload.github.com/shufo/vscode-blade-formatter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311332,"owners_count":21569008,"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":["formatter","laravel","vscode","vscode-extension"],"created_at":"2024-08-01T19:01:48.713Z","updated_at":"2025-04-28T11:56:21.046Z","avatar_url":"https://github.com/shufo.png","language":"TypeScript","funding_links":["https://github.com/sponsors/shufo","https://patreon.com/shufo"],"categories":["vscode-extension","后端开发框架及项目","TypeScript"],"sub_categories":["PHP开发"],"readme":"[![CI](https://img.shields.io/github/actions/workflow/status/shufo/vscode-blade-formatter/test.yml?style=flat-square)](https://github.com/shufo/vscode-blade-formatter/actions/workflows/test.yml)\n[![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/shufo.vscode-blade-formatter?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=shufo.vscode-blade-formatter)\n[![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/shufo.vscode-blade-formatter?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=shufo.vscode-blade-formatter)\n[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/shufo.vscode-blade-formatter?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=shufo.vscode-blade-formatter\u0026ssr=false#version-history)\n[![Visual Studio Marketplace Rating](https://img.shields.io/visual-studio-marketplace/r/shufo.vscode-blade-formatter?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=shufo.vscode-blade-formatter\u0026ssr=false#review-details)\n\n# vscode-blade-formatter\n\nAn opinionated Blade file formatter for VSCode. Marketplace page is [here](https://marketplace.visualstudio.com/items?itemName=shufo.vscode-blade-formatter).\n\nYou can also format programmatically with the same syntax using the [blade-formatter](https://github.com/shufo/blade-formatter) that this extension relies on.\n\n## Features\n\n-   Automatically indent markup inside directives\n-   Automatically add spacing to blade template markers\n-   PHP 8 support (null safe operator, named arguments) 🐘\n-   PSR-2 support (format inside directives)\n-   Automatically sort Tailwind CSS classes with respect of `tailwind.config.js`\n\n## Screencast\n\n![Screencast](https://github.com/shufo/vscode-blade-formatter/blob/main/screencast.gif?raw=true)\n\n## Extension Settings\n\n| setting                                                | description                                                                                                                                                                                                                                                                     | default |\n| :----------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------ |\n| `Blade Formatter: format Enabled`                      | Whether it enables or not                                                                                                                                                                                                                                                       | true    |\n| `Blade Formatter: format Indent Size`                  | An indent size                                                                                                                                                                                                                                                                  | 4       |\n| `Blade Formatter: format Wrap Line Length`             | The length of line wrap size                                                                                                                                                                                                                                                    | 120     |\n| `Blade Formatter: format Wrap Attributes`              | The way to wrap attributes. `[auto\\|force\\|force-aligned\\|force-expand-multiline\\|aligned-multiple\\|preserve\\|preserve-aligned]`                                                                                                                                                | `auto`  |\n| `Blade Formatter: format Wrap Attributes Min Attrs`    | Minimum number of html tag attributes for force wrap attribute options. Wrap the first attribute only if `force-expand-multiline` is specified in wrap attributes                                                                                                               | 2       |\n| `Blade Formatter: format Sort Tailwind Css Classes`    | Sort Tailwind CSS classes automatically                                                                                                                                                                                                                                         | false   |\n| `Blade Formatter: format Sort HTML Attributes`         | Sort HTML Attributes in the specified order. [`none` \\| `alphabetical` \\| [`code-guide`](https://codeguide.co/#attribute-order) \\| [`idiomatic`](https://github.com/necolas/idiomatic-html#attribute-order) \\| [`vuejs`](https://eslint.vuejs.org/rules/attributes-order.html)] | `none`  |\n| `Blade Formatter: format Indent Inner Html`            | Indent `\u003chead\u003e` and `\u003cbody\u003e` sections in html.                                                                                                                                                                                                                                  | false   |\n| `Blade Formatter: format use Tabs`                     | Use tab as indentation character                                                                                                                                                                                                                                                | false   |\n| `Blade Formatter: format Custom Html Attributes Order` | Comma separated custom HTML attributes order. e.g. `id, data-.+, class, name`. To enable this you must specify sort html attributes option as `custom`. You can use regex for attribute names.                                                                                  | `none`  |\n| `Blade Formatter: format No Multiple Empty Lines`      | Collapses multiple blank lines into a single blank line.                                                                                                                                                                                                                        | false   |\n| `Blade Formatter: format No PHP Syntax Check`          | Disable PHP Syntax check. Enabling this will suppress syntax error reporing.                                                                                                                                                                                                    | \"\"      |\n| `Blade Formatter: format No Single Quote`              | Use double quotes instead of single quotes for php expression.                                                                                                                                                                                                                  | false   |\n| `Blade Formatter: Dont Show New Version Message`       | If set to 'true', the new version message won't be shown anymore.                                                                                                                                                                                                               | false   |\n\n## Configuration file: .bladeformatterrc.json or .bladeformatterrc\n\nTo configure settings per project, put `.bladeformatterrc.json` or `.bladeformatterrc` to your project root will vscode-blade-formatter treat it as setting files.\n\nConfiguration file will like below:\n\n```json\n{\n    \"indentSize\": 4,\n    \"wrapAttributes\": \"auto\",\n    \"wrapAttributesMinAttrs\": 2,\n    \"wrapLineLength\": 120,\n    \"endWithNewLine\": true,\n    \"noMultipleEmptyLines\": false,\n    \"useTabs\": false,\n    \"sortTailwindcssClasses\": true,\n    \"sortHtmlAttributes\": \"none\",\n    \"noPhpSyntaxCheck\": false,\n    \"noSingleQuote\": false\n}\n```\n\n## Ignoring Files: .bladeignore\n\nTo exclude files from formatting, create a `.bladeignore` file in the root of your project. `.bladeignore` uses [gitignore syntax](https://git-scm.com/docs/gitignore#_pattern_format)\n\n```gitignore\n# Ignore email templates\nresources/views/email/**\n```\n\n## Disabling format in file\n\nTo disable formatting in your file, you can use blade comments in the following format:\n\n```blade\n{{-- blade-formatter-disable --}}\n    {{ $foo }}\n    {{ $bar }}\n{{-- blade-formatter-enable --}}\n```\n\nTo disable formatting on a specific line, you can use comment in the following format:\n\n```blade\n{{-- blade-formatter-disable-next-line --}}\n    {{ $foo }}\n```\n\nTo disable formatting for an entire file, put a `{{-- blade-formatter-disable --}}` comment at the beginning of the file:\n\n```blade\n{{-- blade-formatter-disable --}}\n\n{{ $foo }}\n```\n\n## TODO\n\n-   [ ] Add more option for HTML formatting rules\n-   [ ] Add option for PHP formatting rules\n-   [x] Automate package publishing flow\n-   [x] Integration test\n\n## Release Notes\n\nsee [CHANGELOG.md](https://github.com/shufo/vscode-blade-formatter/blob/master/CHANGELOG.md)\n\n## Related Projects\n\n-   [blade-formatter](https://github.com/shufo/blade-formatter) - CLI blade formatter this extension relies on\n-   [prettier-plugin-blade](https://github.com/shufo/prettier-plugin-blade) - Prettier plugin for Blade\n-   [coc-blade](https://github.com/yaegassy/coc-blade) - [coc.nvim](https://github.com/neoclide/coc.nvim) Extension by [@yaegassy](https://github.com/yaegassy)\n\n## Contributing\n\n1.  Fork it\n2.  Create your feature branch (`git checkout -b my-new-feature`)\n3.  Commit your changes (`git commit -am 'Add some feature'`)\n4.  Push to the branch (`git push origin my-new-feature`)\n5.  Create new Pull Request\n\n## Development\n\n```bash\n$ yarn install\n$ cp .env.example .env # set your app insight key\n$ yarn run watch # watch changes\n```\n\n## Testing\n\n```bash\n$ yarn install\n$ cp .env.example .env # set your app insight key\n$ yarn run compile\n$ yarn run test\n```\n\n## Sponsors\n\n![](./sponsorkit/sponsors.png)\n\n## Contributors\n\n\u003c!-- readme: collaborators,contributors -start --\u003e\n\u003ctable\u003e\n\u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://github.com/shufo\"\u003e\n            \u003cimg src=\"https://avatars.githubusercontent.com/u/1641039?v=4\" width=\"100;\" alt=\"shufo\"/\u003e\n            \u003cbr /\u003e\n            \u003csub\u003e\u003cb\u003eShuhei Hayashibara\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://github.com/slovenianGooner\"\u003e\n            \u003cimg src=\"https://avatars.githubusercontent.com/u/1257629?v=4\" width=\"100;\" alt=\"slovenianGooner\"/\u003e\n            \u003cbr /\u003e\n            \u003csub\u003e\u003cb\u003eSlovenianGooner\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://github.com/yaegassy\"\u003e\n            \u003cimg src=\"https://avatars.githubusercontent.com/u/188642?v=4\" width=\"100;\" alt=\"yaegassy\"/\u003e\n            \u003cbr /\u003e\n            \u003csub\u003e\u003cb\u003eYaegassy\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://github.com/notdian\"\u003e\n            \u003cimg src=\"https://avatars.githubusercontent.com/u/4225509?v=4\" width=\"100;\" alt=\"notdian\"/\u003e\n            \u003cbr /\u003e\n            \u003csub\u003e\u003cb\u003eNull\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://github.com/1cbyc\"\u003e\n            \u003cimg src=\"https://avatars.githubusercontent.com/u/35623334?v=4\" width=\"100;\" alt=\"1cbyc\"/\u003e\n            \u003cbr /\u003e\n            \u003csub\u003e\u003cb\u003eIsaac Emmanuel\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://github.com/j3j5\"\u003e\n            \u003cimg src=\"https://avatars.githubusercontent.com/u/1239921?v=4\" width=\"100;\" alt=\"j3j5\"/\u003e\n            \u003cbr /\u003e\n            \u003csub\u003e\u003cb\u003eJulio J. Foulquie\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://github.com/snyk-bot\"\u003e\n            \u003cimg src=\"https://avatars.githubusercontent.com/u/19733683?v=4\" width=\"100;\" alt=\"snyk-bot\"/\u003e\n            \u003cbr /\u003e\n            \u003csub\u003e\u003cb\u003eSnyk Bot\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\u003c!-- readme: collaborators,contributors -end --\u003e\n\n## LICENSE\n\nMIT\n\n## Data and telemetry\n\nThis extension collects usage data and sends it to [Azure Application Insight](https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview) to improve extension. This extension respects the `telemetry.enableTelemetry` setting.\n\nTo opt out, please set the `telemetry.enableTelemetry` setting to false. Learn more in [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshufo%2Fvscode-blade-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshufo%2Fvscode-blade-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshufo%2Fvscode-blade-formatter/lists"}