@swis/php-cs-fixer-proxy
v0.1.4 php-cs-fixer proxy
@swis/php-cs-fixer-proxy
Node.js proxy for PHP-CS-Fixer to run Git Hooks from Windows. This package is intended to be used with lint-staged.
N.B. Includes a fallback to local PHP-CS-Fixer when not on Windows.
How does it work?
This package sets up an SSH connection to swisdev.nl and runs PHP-CS-Fixer on your virtual machine. All arguments are directly passed to PHP-CS-Fixer. If you don't work on a Windows PC, PHP-CS-Fixer is run directly on your machine. Please see the PHP-CS-Fixer documentation for all options.
Requirements
PHP-CS-Fixer needs to be installed (and configured) in your project i.e.
$ composer require --dev friendsofphp/php-cs-fixer
Installation
$ npm install @swis/php-cs-fixer-proxy
Example lint-staged config
Lint
package.json
{
"lint-staged": {
"*.php": [
"php-cs-fixer-proxy --dry-run"
]
}
}
Fix
package.json
{
"lint-staged": {
"*.php": [
"php-cs-fixer-proxy",
"git add"
]
}
}
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
npm i @swis/php-cs-fixer-proxy
Metadata
- MIT
- Whatever
- Jasper Zonneveld
- released 10/28/2021