eslint-plugin-remeda
Version:
ESLint plugin for Remeda library.
28 lines (16 loc) • 578 B
Markdown
When checking that a value is undefined or null (but not false or ''), it is more concise to use R.isNullish instead.
## Rule Details
This rule takes no arguments.
The following patterns are considered warnings:
```js
var t = !R.isNull(x) && !R.isUndefined(x);
var t = x === undefined || x === null;
```
The following patterns are not considered warnings:
```js
var t = R.isNullish(x);
var t = R.isUndefined(x) || R.isNull(y);
```
If you do not want to enforce using `R.isNullish`, and prefer using specific checks instead.