1.0.1 • Published 2 years ago
eslint-config-popovoleksandr v1.0.1
eslint-config
Personal ESLint configuration with sensible defaults that I use in my JavaScript projects.
Install
To use it in your project, run:
npm install --save-dev eslint eslint-config-popovoleksandrThen add a following .eslintrc file in the repo root:
{
"extends": "popovoleksandr"
}Finally, add eslint to a package.json script:
"scripts": {
"lint": "eslint index.js test/test*.js",
"pretest": "npm run lint"
}Now run npm run lint and enjoy thousands of errors! :)
Automatic fixes
To make things easier, you can run eslint with --fix option
that automatically fixes all simple errors like indentation and quotes for you.
Overrides
Some of the rules may be too strict for your project, but you can easily override any rules or options like this:
{
"extends": "eslint-config-popovoleksandr",
"rules": {
"space-before-function-paren": 0,
"indent": [2, 2]
},
"env": {
"mocha": true
}
}