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

@chancedigital/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chancedigital/eslint-config

Shareable configuration for ESLint following Chance Digital Coding Standards.

  • 7.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

Chance Digital ESLint Config

Greenkeeper badge

Shareable configuration for ESLint following Chance Digital Coding Standards.

Installation

You should install this configuration along with its peerDependencies as devDependencies in your project:

yarn add -D @chancedigital/eslint-config eslint@7 eslint-plugin-import@2 babel-eslint@10

Usage

Extend the configuration from your project's ESLint configuration:

// .eslintrc
{
  "extends": ["@chancedigital"]
}

Supersets

In addition to the base ruleset, you may wish to install supersets of rules based on the project you are working on. Supersets are not mutually exclusive and can be combined (for example, if you are working on a WordPress project that uses React components, you can use both the react and wp supersets).

You can extend any superset in .eslintrc by adding the standard into an extends array.

// .eslintrc
{
  "extends": [
    "@chancedigital/eslint-config/[SUPERSET_NAME]"
  ]
}

The following is a table of available supersets along with their required devDependencies:

SupersetdevDependencies
jesteslint-plugin-jest@23
mochaeslint-plugin-mocha@7
nodeeslint-plugin-node@11
reacteslint-plugin-react@7 eslint-plugin-react-hooks@4 eslint-plugin-jsx-a11y
typescript@typescript-eslint/parser@3 @typescript-eslint/eslint-plugin@3
wpeslint-plugin-wpcalypso@4 @wordpress/eslint-plugin@7

Test Standards

As of v5.0, we have removed the Jest rules from the standard config. This is because some projects may use other tools such as Mocha. To use rules for Jest or Mocha, install the corresponding plugin and extend the superset as follows:

# For Jest
yarn add -D eslint-plugin-jest@23

# For Mocha
yarn add -D eslint-plugin-mocha@7
// .eslintrc
"extends": [
  // For Jest
  "@chancedigital/eslint-config/jest"
  // For Mocha
  "@chancedigital/eslint-config/mocha"
]

More Info

Refer to the ESLint documentation on Shareable Configs for more information.

Keywords

FAQs

Package last updated on 27 Jun 2020

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