Add eqeqeq rule but require == for null

This commit is contained in:
Jamie Kyle 2022-09-14 14:40:44 -07:00 committed by GitHub
parent 64a4d2e717
commit 0086216c9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 64 additions and 63 deletions

View file

@ -336,7 +336,7 @@ function binaryToUint8Array(
length: number
): Uint8Array {
const target = get(object, path);
if (target === null || target === undefined) {
if (target == null) {
throw new Error(`binaryToUint8Array: Falsey path ${path}`);
}
@ -357,7 +357,7 @@ function binaryToUint8Array(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getInteger(object: any, path: string): number {
const target = get(object, path);
if (target === null || target === undefined) {
if (target == null) {
throw new Error(`getInteger: Falsey path ${path}`);
}