ESLint rule to disallow null literals, to encourage using undefined instead.
After having installed ESLint, install the rule:
$ npm install eslint-plugin-no-null --save-dev
Add no-null
to your .eslintrc
:
{
"plugins": [
"no-null"
],
"rules": {
"no-null/no-null": 2
}
}