Configs
Laravel
Pint
- For https://laravel.com/docs/10.x/pint
- VSCode extension: https://marketplace.visualstudio.com/items?itemName=open-southeners.laravel-pint
Pint config
PHP CS Fixer
- For https://github.com/PHP-CS-Fixer/PHP-CS-Fixer
- VSCode extension: https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer
PHP CS Fixer config
Composer scripts
{
"scripts": {
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force",
"@php artisan optimize:clear"
],
"helper": [
"@php artisan ide-helper:generate",
"@php artisan ide-helper:models --nowrite --reset",
"php artisan ide-helper:meta",
"@php artisan ide-helper:eloquent"
],
"format-pint": [
"pint"
],
"format-cs-fixer": [
"php-cs-fixer fix --ansi"
],
"analyse": [
"phpstan analyse --ansi --memory-limit=4G"
],
"serve": [
"Composer\\Config::disableProcessTimeout",
"php artisan serve"
],
"test": [
"@php artisan test"
],
"test:filter": [
"@php artisan test --filter"
],
"test:watch": [
"Composer\\Config::disableProcessTimeout",
"phpunit-watcher watch"
],
"test:filter:watch": [
"Composer\\Config::disableProcessTimeout",
"phpunit-watcher watch --filter"
]
}
}
JavaScript
ESLint
@antfu
pnpm add -D eslint @antfu/eslint-config typescript
touch .eslintrc ; touch .eslintignore
.eslintrc
{
"extends": "@antfu"
}
package.json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Table of Contents