Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pressmodo/phpcs-config
Pressmodo custom PHPCS rules for WordPress projects.
https://github.com/pressmodo/phpcs-config
phpcs phpcs-config phpcs-standard pressmodo wordpress
Last synced: 6 days ago
JSON representation
Pressmodo custom PHPCS rules for WordPress projects.
- Host: GitHub
- URL: https://github.com/pressmodo/phpcs-config
- Owner: Pressmodo
- License: mit
- Created: 2019-02-25T16:04:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-23T17:50:57.000Z (almost 6 years ago)
- Last Synced: 2024-12-18T07:02:20.043Z (about 1 month ago)
- Topics: phpcs, phpcs-config, phpcs-standard, pressmodo, wordpress
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Pressmodo PHPCS Configuration
Composer library to provide drop in installation and configuration of [WPCS](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) and [PHPCompatibilityWP](https://github.com/PHPCompatibility/PHPCompatibilityWP), setting reasonable defaults for WordPress development with nearly zero configuration.## Installation
Install the library via Composer:
```bash
$ composer require --dev pressmodo/phpcs-config:dev-master
```That's it!
## Usage
Lint your PHP files with the following command:
```bash
$ ./vendor/bin/phpcs .
```If relying on Composer, edited the `composer.json` file by adding the following:
```json
"scripts": {
"lint": "phpcs .",
"lint-fix": "phpcbf ."
}
```Then lint via:
```bash
$ 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
```