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

v2.1.0 2020-12-14 17:38 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: