This repository has moved!

January 9, 2019 ยท View on GitHub

It is now part of the Calypso repository.

The published npm package will continue to be available as before, no changes necessary!

eslint-plugin-wpcalypso

Custom ESLint rules for the WordPress.com Calypso project.

Installation

You'll first need to install ESLint:

$ npm install eslint --save-dev

Next, install eslint-plugin-wpcalypso:

$ npm install eslint-plugin-wpcalypso --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-wpcalypso globally.

Usage

Add wpcalypso to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "wpcalypso"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "wpcalypso/rule-name": 2
    }
}

Supported Rules

License

Calypso is licensed under GNU General Public License v2 (or later).