eslint-config
Installation
$ npm install --save-dev @napopravku/eslint-config-napopravku
Usage
Once the eslint-config-napopravku
package is installed, you can use it by specifying napopravku
in the extends
section of your ESLint configuration.
For validating ECMAScript 5 project use es5
version:
{
"extends": "@napopravku/eslint-config-napopravku/es5.js",
"rules": {
// Additional rules...
}
}
For validating ECMAScript 2015 (ES6) project use es6
version:
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"env": {
"es6": true
},
"extends": "@napopravku/eslint-config-napopravku/es6.js",
"rules": {
// Additional rules...
}
}
For validating ECMAScript 2015 (ES6) in Node.js environment project use es6
version:
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"env": {
"es6": true,
"browser": false,
"node": true
},
"extends": "@napopravku/eslint-config-napopravku/node.js",
"rules": {
// Additional rules...
}
}