Laravel PHP CS Fixer 대체 Laravel Pint |
지금까지 Lalavel PHP CS Fixer를 사용하여 스타일을 관리했었다.
Laravel Pint라고 9버전부터 기본으로 포함된 스타일관리가 되는 패키지가 있어서 교체를 진행했다.
https://laravel.com/docs/9.x/pint
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
laravel.com
프리셋은 Laravel, Psr12, Symfony를 지원하며 Laravel은 Laravel 개발팀이 사용하는 스타일이다.
VScode 확장 프로그램을 설치하면 저장할때 자동으로 실행이 가능하다.
https://marketplace.visualstudio.com/items?itemName=msamgan.laravel-pint-vscode
Laravel Pint Formatter - Visual Studio Marketplace
Extension for Visual Studio Code - vscode extension for laravel pint with zero config and optional format on save option.
marketplace.visualstudio.com
설치를 하고 저렇게 VScode 설정에서 추가를 해주면 된다.
설명에 저장될때 포멧을 사용하지 않을려면이라고 되있는데 unable이 아니라 enable 같다.
아닌가.. 사용하지 않을려면 false 로 설정을 해주면 된다는 말인가..
뭐 어쨋든...
더 많이 설치한 아래 확장자도 설치해봤는데 애는 저장될때 설정하는 부분이 지원을 안하는것 같다.
https://marketplace.visualstudio.com/items?itemName=open-southeners.laravel-pint
Laravel Pint - Visual Studio Marketplace
Extension for Visual Studio Code - Integrates Laravel Pint into your VSCode projects for automatic code formatting
marketplace.visualstudio.com
09.21 동작을 안해서 아래로 교체
https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave
Run on Save - Visual Studio Marketplace
Extension for Visual Studio Code - Run commands when a file is saved in vscode.
marketplace.visualstudio.com
settings.json 파일에 아래 추가
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.php$",
"cmd": "${workspaceFolder}/vendor/bin/pint ${file}"
}
]
}
'Infomation' 카테고리의 다른 글
공유기 와이파이 연결안됨 (0) | 2024.07.14 |
---|---|
OIDC error in handling response type (0) | 2024.01.23 |
LiveWire3 SweetAlert2 사용하기 (0) | 2023.09.18 |
Laravel 10 Auth::attempt field define (0) | 2023.08.30 |
Chrome-php Operation timed out after 5s error (0) | 2023.08.17 |