Skip to content

Latest commit

 

History

History
68 lines (55 loc) · 1.51 KB

README.md

File metadata and controls

68 lines (55 loc) · 1.51 KB

eslint-config-restrict

Build Status

eslint

An ESLint shareable config for the restrict js coding style.

Ensure your source code adheres to the restrict js coding style by linting your code with ESLint. Hook ESLint into your editor and build pipeline for maximum effect.

Install

npm i --save-dev eslint-config-restrict

Usage

In your .eslintrc.json file:

{
  "extends": "restrict"
}

Overrides

You can easily override rules in your own .eslintrc.json config. For example, to use 4 space indents instead of 2:

{
  "extends": "restrict",
  "rules": {
    "indent": ["error", 4]
  }
}

ES5

eslint-config-restrict is ES6+ by default. To use ES5, extend restrict/es-5 in your .eslintrc.json:

{
  "extends": "restrict/es-5"
}

Angular 1.x

To use Angular 1.x, extend restrict/angular-1 in your .eslintrc.json:

{
  "extends": "restrict/angular-1"
}

Jasmine

To use Jasmine, extend restrict/jasmine in your .eslintrc.json:

{
  "extends": "restrict/jasmine"
}