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