webapp
webapp copied to clipboard
add a linter
Can we plz add eslint to the project at some point thx
also this should include running the linter and adding the linter to whatever CI we have set up
@seport The linter config file is this one no?
then this story is to run the linter on all the project files 😂
I like the eslint recommended set of rules, which roughly are the de facto standards. I'd suggest:
module.exports = {
env: {
node: true,
browser: true,
},
extends: 'eslint:recommended',
parserOptions: {
sourceType: 'script',
ecmaVersion: 10,
},
rules: {
'no-console': 0, // I'd leave this in til we get a proper logging library
},
}
I ran eslint . with that config and we have: 14 errors, 29 warnings. Most warnings are about console logs and the errors don't look too complicated.