This package has been deprecated

Author message:

this package has been deprecated; please use @chancedigital/config-eslint instead

@chancedigital/eslint-config-wp

0.1.2 • Public • Published

@chancedigital/eslint-config-wp

Chance Digital WordPress coding standards for JavaScript. This is a fork of the similar repository from Human Made.

We highly recommend using this via the chancedigital/wp-coding-standards Composer package..

Installation

This package is an ESLint shareable configuration, and requires babel-eslint, eslint, eslint-config-react-app, eslint-plugin-flowtype, eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-react.

To install this config and the peerDependencies:

npm info "@chancedigital/eslint-config-wp@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "@chancedigital/eslint-config-wp@latest"

(Thanks to Airbnb's package for the command.)

You can then use it directly on the command line:

eslint -c chancedigital MyFile.js

Alternatively, you can create your own configuration and extend these rules:

extends:
- chancedigital

While It is always encouraged to write modern Javascript that is properly processed and bundled to meet your project's browser/device support requirements. However in some rare cases you may be required to write in ES5, and you can set your configuration in index.js accordingly by setting the es6 variable to false.

Please note that the standards' tests and CLI tools are not set up to support this, but this will help suppress warnings in your editor.

Global Installation

We do not recommend installing these standards globally. If you must, however, you need to ensure the peer dependencies are also installed globally. Run the same command as above, but with -g added:

npm info "@chancedigital/eslint-config-wp@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "@chancedigital/eslint-config-wp@latest"

This allows you to use eslint -c chancedigital MyFile.js anywhere on your filesystem.

Readme

Keywords

none

Package Sidebar

Install

npm i @chancedigital/eslint-config-wp

Weekly Downloads

1

Version

0.1.2

License

none

Unpacked Size

5.89 kB

Total Files

4

Last publish

Collaborators

  • chancestrickland