When checking that a value is undefined or null (but not false or ''), it is more concise to use _.isNil instead.
This rule takes no arguments.
The following patterns are considered warnings:
var t = !_.isNull(x) && !_.isUndefined(x);
var t = x === undefined || x === null;
The following patterns are not considered warnings:
var t = _.isNil(x);
var t = _.isUndefined(x) || _.isNull(y);
If you do not want to enforce using _.isNil
, and prefer using specific checks instead.