[improvement] optimize eslint-disable (#4070)

This commit is contained in:
neverland
2019-08-08 20:01:41 +08:00
committed by GitHub
parent 5777762249
commit c74d90c561
13 changed files with 9 additions and 20 deletions
+1 -2
View File
@@ -1,5 +1,3 @@
/* eslint-disable no-self-compare */
export function isNumber(value: string): boolean {
return /^\d+(\.\d+)?$/.test(value);
}
@@ -9,5 +7,6 @@ export function isNaN(value: any): boolean {
return Number.isNaN(value);
}
// eslint-disable-next-line no-self-compare
return value !== value;
}