prettier-plugin-blade-volt
v0.1.0
Published
A Prettier plugin for formatting Blade files with support for Laravel Livewire Volt
Downloads
4
Maintainers
Readme
This plugin has been https://github.com/shufo/prettier-plugin-blade extended for use with Livewire Volt.
The original functionality is retained, with the addition of the option addPrettierIgnoreForVolt
.
By setting this option to true
, the <?php
start tag and the closing tag ? >
before and after <! -- prettier-ignore-start -->
and <! -- prettier-ignore-end -->
before and after the closing tag `?
This allows you to exclude prettier formatting between php tags in the blade.
Installation
npm install --save-dev @nxsdev/rettier-plugin-blade-volt
# yarn
yarn add -D @nxsdev/rettier-plugin-blade-volt
# pnpm
pnpm add -D @nxsdev/rettier-plugin-blade-volt
then, add in your Prettier configuration:
{
"plugins": ["@nxsdev/prettier-plugin-blade-volt"],
"overrides": [
{
"files": ["*.blade.php"],
"options": {
"parser": "blade",
"tabWidth": 4,
"addPrettierIgnoreForVolt": true
}
}
]
}
Since the rest is basically the same, please refer to this GitHub.
https://github.com/shufo/prettier-plugin-blade