pressmodo / phpcs-config
Package info
github.com/Pressmodo/phpcs-config
Type:phpcodesniffer-standard
pkg:composer/pressmodo/phpcs-config
dev-master
2019-03-23 17:50 UTC
This package is auto-updated.
Last update: 2026-02-24 09:39:49 UTC
README
Composer library to provide drop in installation and configuration of WPCS and PHPCompatibilityWP, setting reasonable defaults for WordPress development with nearly zero configuration.
Installation
Install the library via Composer:
$ composer require --dev pressmodo/phpcs-config:dev-master
That's it!
Usage
Lint your PHP files with the following command:
$ ./vendor/bin/phpcs .
If relying on Composer, edited the composer.json file by adding the following:
"scripts": { "lint": "phpcs .", "lint-fix": "phpcbf ." }
Then lint via:
$ composer run lint
IDE Integration
Some IDE integrations of PHPCS fail to register the Pressmodo-Default ruleset. In order to rectify this, place .phpcs.xml.dist at your project root:
<?xml version="1.0"?> <ruleset name="Project Rules"> <rule ref="Pressmodo-Default" /> </ruleset>