Laravel Pint task runner from GrumPHP
MIT License
This package extends GrumPHP with a task that runs Laravel Pint for your Laravel projects.
The easiest way to install this package is through composer:
composer require --dev hungthai1401/grumphp-pint-task
Add the extension loader to your grumphp.yml
or grumphp.yml.dist
.
The task lives under the laravel_pint
namespace and has following
configurable parameters:
grumphp:
tasks:
laravel_pint:
config: 'pint.json'
files_on_pre_commit: false
paths: ['src']
extensions:
- HT\GrumPhpPintTask\ExtensionLoader
By default, this won't update your code, you need to do it manually.
Default: 'pint.json'
If you want to use a different config file than the default pint.json
, you can specify your custom config file location with this option.
Default: false
This option makes it possible to use the changed files as paths during pre-commits. It will use the paths option to make sure only committed files that match the path are validated.
Default: []
Can only be used when files_on_pre_commit=false
If you want to run on particular directories only, specify it with this option.
Create pint.json
in your project root and configure as follows. This example file I am using for my Laravel project. Also you no need to set all these settings, please add or remove as per your requirements.
{
"preset": "laravel",
"rules": {
"concat_space": {
"spacing": "one"
},
"fully_qualified_strict_types": true,
"global_namespace_import": {
"import_constants": true,
"import_functions": true,
"import_classes": true
}
}
}
Please visit Laravel Pint for more configuration examples.
If you want to uninstall this extension remove configuration files first: pint.json
from your application, then remove package:
composer remove hungthai1401/grumphp-pint-task
Please see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.