ESLint Config - nsymester/Front-end-Engineering-Journal GitHub Wiki
Install ESLint on VS Code
Create the following:
file: .elintignore
file: elintrc.json
/*
* off | 0
* warn | 1
* error | 2
*/
{
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2018
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"globals": {
"rx": "writable"
},
"rules": {
"no-console": [2, { "allow": ["warn", "error"] }],
"linebreak-style": 0,
"no-tabs": 0,
"indent": [1, "tab", { "SwitchCase": 1 }],
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"max-len": [2, { "code": 150 }],
"no-plusplus": 0,
"eqeqeq": ["error", "smart"],
"semi": [2, "never"],
"no-var": 2,
"prefer-arrow-callback": 1
}
}
`