Add linter rule disallowing use of var

var in javascript has some surprising behaviors, especially for those
of us from a python background, and can hide some errors. There's a
good article on it here: https://tylermcginnis.com/var-let-const/

Tell eslint to not allow the use of var and instead require either
let or const. Then update the one use.

Change-Id: Idd4b0a9086a68070dc35b546b7f73701c94ba1b0
This commit is contained in:
Monty Taylor
2019-07-31 11:11:58 -04:00
parent 5e44640d20
commit fdc9a1830a

View File

@@ -3,6 +3,7 @@ plugins:
- standard
- jest
rules:
no-var: error
no-console: off
semi: [error, never]
quotes: [error, single]