Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chancedigital/eslint-config-wp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chancedigital/eslint-config-wp

Chance Digital WordPress coding standards for JavaScript. This is a fork of the similar repository from [Human Made](https://github.com/chancedigital/wp-coding-standards).

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@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.

FAQs

Package last updated on 09 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc