eslint-config-standard-js
A set of ESlint rules for optimal JavaScript programming.
"Everything should be made as simple as possible, but not simpler." - Albert Einstein
These rules have been carefully crafted to be consistent with the best practices in JavaScript, while still minimal.
Install
npm install --save-dev eslint eslint-config-standard-js
Usage
Add a .eslintrc.js
file to your project with these lines:
module.exports = {
"extends": "standard-js"
};
Optional
Edit your package.json
file and change the test script to precede it with eslint
. Adding the --fix
parameter will also fix files automatically when possible:
"scripts": {
"test": "eslint --fix . && node ./test.js"
},