VideoAmp's shared base configuration for ESLint
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
rules
.eslintrc
.gitignore
.nvmrc
LICENSE
README.md
index.js
package.json
yarn.lock

README.md

eslint-config-videoamp

Build Status npm version

This package uses ESLint to enforce VideoAmp's code style and provides a shared base configuration for our JavaScript projects.

We have two other configurations that we primarily use that extend this base, listed below:

Install

yarn

yarn add --dev eslint-config-videoamp eslint

npm

npm install --save-dev eslint-config-videoamp eslint

Usage

Add "extends": "videoamp" to your .eslintrc.

Using configuration with Chai

Chai does not play well with the no-unused-expressions rule in ESLint, so we use eslint-plugin-chai-friendly as a workaround. To set up linting for tests, add this to your test folder's .eslintrc:

"rules": {
    "no-unused-expressions": "off",
    "chai-friendly/no-unused-expressions": "error",
},

Using eslint-config-videoamp on legacy projects (ES5)

For projects that use ES5, see documentation from the v2.1.0 config here.

Resources

Contributing

You can make sure this module lints with itself using yarn lint.