Skip to content

Commit

Permalink
Blade Formatter設定変更による開発体験向上
Browse files Browse the repository at this point in the history
  • Loading branch information
KentarouTakeda committed Dec 31, 2024
1 parent 914b0cb commit fa8db5d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .bladeformatterrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"componentPrefix": ["x-", "livewire:"],
"indentSize": 2,
"noMultipleEmptyLines": true,
"sortTailwindcssClasses": true,
"wrapAttributes": "force-expand-multiline",
"wrapAttributesMinAttrs": 5
}
2 changes: 2 additions & 0 deletions .bladeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources/views/email/**
resources/views/welcome.blade.php
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"junstyle.php-cs-fixer",
"onecentlin.laravel-blade",
"recca0120.vscode-phpunit",
"shufo.vscode-blade-formatter",
"stylelint.vscode-stylelint",
"xdebug.php-debug"
]
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
"source.fixAll.stylelint": "explicit"
}
},
"[blade]": {
"editor.defaultFormatter": "shufo.vscode-blade-formatter",
"editor.formatOnSave": true
},
"stylelint.validate": ["css", "scss", "postcss"],
"intelephense.environment.phpVersion": "8.4.0",
"intelephense.files.exclude": [
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"fix:css": "stylelint --fix 'resources/css/**/*'",
"fix:php": "php-cs-fixer fix",
"fix:js": "prettier --write '**/*.js'",
"fix:blade": "blade-formatter --w resources/views/**/*.blade.php --wrap 9999 -i 2"
"fix:blade": "blade-formatter --w resources/views/**/*.blade.php"
},
"dependencies": {
"autoprefixer": "^10.4.20",
Expand All @@ -36,7 +36,7 @@
"app/**/*.php": "php-cs-fixer fix --config=.php-cs-fixer.php --path-mode=intersection --",
"tests/**/*.php": "php-cs-fixer fix --config=.php-cs-fixer.php --path-mode=intersection --",
"resources/css/**/*.css": "stylelint --fix",
"resources/views/**/*.blade.php": "blade-formatter --w --wrap 9999 -i 2"
"resources/views/**/*.blade.php": "blade-formatter --w"
},
"run-if-changed": {
"app/View/Components/**/*.php": "./artisan view:clear",
Expand Down

0 comments on commit fa8db5d

Please sign in to comment.