automattic / jetpack-codesniffer
Jetpack Coding Standards. Based on the WordPress Coding Standards, with some additions.
Installs: 3 160
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Type:phpcodesniffer-standard
Requires
Requires (Dev)
- yoast/phpunit-polyfills: 0.2.0
This package is auto-updated.
Last update: 2021-01-19 14:29:16 UTC
README
This is a package implementing phpcs sniffs for the Jetpack Coding Standard.
This standard is generally that of WordPress, with a few additions.
Usage
In your project's composer.json
, add the following lines:
{ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "*", "automattic/jetpack-codesniffer": "^1" } }
Your project must use the default composer vendor directory, vendor
.
You should then include the Jetpack rules in your .phpcs.xml.dist
, like
<rule ref="Jetpack" />
You will also likely want to set some configuration for other included rulesets:
<config name="minimum_supported_wp_version" value="5.4" /> <config name="testVersion" value="5.6-"/>
Included Standards
The Jetpack standard includes the following other standards:
- PHPCompatibilityWP
- WordPress-Core, WordPress-Docs, and WordPress-Extra
- VariableAnalysis
- Selected sniffs from MediaWiki