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.
npm i --save-dev eslint-config-restrict
In your .eslintrc.json
file:
{
"extends": "restrict"
}
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]
}
}
eslint-config-restrict
is ES6+ by default. To use ES5, extend restrict/es-5
in your .eslintrc.json
:
{
"extends": "restrict/es-5"
}
To use Angular 1.x, extend restrict/angular-1
in your .eslintrc.json
:
{
"extends": "restrict/angular-1"
}
To use Jasmine, extend restrict/jasmine
in your .eslintrc.json
:
{
"extends": "restrict/jasmine"
}