mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ff4336010c
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
7 lines
66 B
Plaintext
7 lines
66 B
Plaintext
{
|
|
"extends": "airbnb",
|
|
"rules": {
|
|
"init-declarations": 1
|
|
}
|
|
}
|