Skip to content

Flow: Enable "sketchy-number" lint rule #1834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/validation/__tests__/PossibleTypeExtensions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down