9.2.0 • Published 5 months ago

eslint-config-iplayer v9.2.0

Weekly downloads
234
License
Apache-2.0
Repository
github
Last release
5 months ago

eslint-config-iplayer

The main eslint config for BBC iPlayer

Installation

npm install --save-dev eslint-config-iplayer

Usage

Adding the following to your eslintConfig in package.json will import the iPlayer ES6 config rules:

{
  "eslintConfig": {
    "extends": "iplayer"
  }
}

jsx rules:

{
  "eslintConfig": {
    "extends": "iplayer/jsx"
  }
}

ts rules:

{
  "eslintConfig": {
    "extends": "iplayer/ts"
  }
}

tsx rules:

{
  "eslintConfig": {
    "extends": "iplayer/tsx"
  }
}

base rules:

{
  "eslintConfig": {
    "extends": "iplayer/base"
  }
}

legacy rules:

{
  "eslintConfig": {
    "extends": "iplayer/legacy"
  }
}

This package currently sets the default ECMAScript Version to be 9 for the base rules, with the legacy rules set to use ECMAScript Version 5. If you require a different version you can change it like so:

{
  "eslintConfig": {
    "extends": "iplayer"
  },
  "parserOptions": {
    "ecmaVersion": 6
  }
}