From adda19701208df9f2197d47a199582a37ca8b0b2 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Sat, 27 Apr 2019 09:00:38 +0300 Subject: [PATCH] Flow: Enable "sketchy-number" lint rule --- .flowconfig | 2 +- src/validation/__tests__/PossibleTypeExtensions-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.flowconfig b/.flowconfig index 385a9dde28..75fcf47dbe 100644 --- a/.flowconfig +++ b/.flowconfig @@ -14,7 +14,7 @@ sketchy-null-bool=off sketchy-null-string=off sketchy-null-number=error sketchy-null-mixed=off -sketchy-number=off +sketchy-number=error untyped-type-import=error nonstrict-import=off untyped-import=off diff --git a/src/validation/__tests__/PossibleTypeExtensions-test.js b/src/validation/__tests__/PossibleTypeExtensions-test.js index b140f5e8ad..115f5c57bc 100644 --- a/src/validation/__tests__/PossibleTypeExtensions-test.js +++ b/src/validation/__tests__/PossibleTypeExtensions-test.js @@ -35,7 +35,7 @@ function extendingDifferentTypeKind(typeName, kind, l1, c1, l2, c2) { const message = extendingDifferentTypeKindMessage(typeName, kind); const locations = [{ line: l1, column: c1 }]; - if (l2 && c2) { + if (l2 !== undefined && c2 !== undefined) { locations.push({ line: l2, column: c2 }); } return { message, locations };