-
Notifications
You must be signed in to change notification settings - Fork 510
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
Fix linting warnings for Function, Boolean and String types #1916
Conversation
Signed-off-by: deren.toy <derentoy@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
📢 Thoughts on this report? Let us know!. |
Signed-off-by: deren.toy <derentoy@gmail.com>
{typeof value === 'number' && row.dataPoints.service_operation_latencies.length > 0 | ||
? formatTimeValue(value * 1000) | ||
: ''} | ||
{row.dataPoints.service_operation_latencies.length > 0 ? formatTimeValue(value * 1000) : ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This replacement is not completely equivalent. What would be a situation when value
would not be a number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
In this case, the value of 'value' is 'ServiceOpsMetrics['latency']', and 'latency' is defined as a number type.
export type ServiceOpsMetrics = {
dataPoints: OpsDataPoints;
errRates: number;
impact: number;
latency: number;
name: string;
requests: number;
key: number;
};
Therefore, I thought that there is no need for additional type checking because 'value' is always of type number. Am I mistaken?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, except the question about the first file
Thanks! |
@yurishkuro 🙏🏻🙏🏻🙏🏻 |
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test