Commit Graph

2 Commits

Author SHA1 Message Date
Ingo Schommer
ff4336010c Enforce JS var declaration with value
This caught us out recently where code did a strict type check for `myVar === undefined`.
The var was defined as `let myVar;`, without a value - so the check returned false (it's `null`).
To avoid this situation, we've decided to enforce declarations with values.
Note that preference should be given to single, immutable assignments via const where possible.

See http://eslint.org/docs/rules/init-declarations
2016-09-13 10:08:32 +12:00
Ingo Schommer
db42ab772f Adding ESLint
Not much too lint yet in terms of new code, but it's consistent with framework and asset-admin modules
2016-04-08 15:08:08 +12:00