ESLint rule package to prevent runtime nullability issues
npm install eslint-plugin-fk-null-checkDisallowing property access on records and object literals without type checking
You'll first need to install ESLint:
``sh`
npm i eslint --save-dev
Next, install eslint-plugin-fk-null-check:
`sh`
npm install eslint-plugin-fk-null-check --save-dev
Add fk-null-check to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
`json`
{
"plugins": [
"fk-null-check"
]
}
Then configure the rules you want to use under the rules section.
`json``
{
"rules": {
"fk-null-check/rule-name": 2
}
}
TODO: Run eslint-doc-generator to generate the rules list.