-
Notifications
You must be signed in to change notification settings - Fork 86
front: fix simple oxlint violations #18456
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
Changes from all commits
11d339e
f8b610a
0a89c39
7a11f40
ebbcf16
23e2b2d
9be34c4
34314f5
810f49a
0947139
62aec8d
82543f8
29ee5b5
3e6ef59
3de0043
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,7 @@ export const LinearMetadataTooltip = <T extends Record<string, unknown>>({ | |
| <span className="mr-3"> | ||
| {((schema.properties || {})[k] as JSONSchema7 | undefined)?.title || k} | ||
| </span> | ||
| {/* oxlint-disable-next-line typescript/no-base-to-string */} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe you can get rid of this disable by changing the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Woah, good catch indeed! Thanks for that, I wouldn't have thought about that 👍 |
||
| {isNil(item[k]) ? '-' : `${item[k]}`} | ||
| </div> | ||
| ))} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,10 +43,10 @@ export type TransitionDto = { | |
| }; | ||
|
|
||
| export enum PortAlignment { | ||
| Top, | ||
| Bottom, | ||
| Left, | ||
| Right, | ||
| Top = 0, | ||
| Bottom = 1, | ||
| Left = 2, | ||
| Right = 3, | ||
|
Comment on lines
+46
to
+49
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, these originate from NGE. We should no longer need this file, see #18458. |
||
| } | ||
|
|
||
| export type TrainrunDto = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -212,6 +212,7 @@ const DebugMap = ({ failureData, simulationData }: DebugMapProps) => { | |
| <strong>{hovered.point.lastOPName}</strong> | ||
| </div> | ||
| <div>at: {hovered.point.at}</div> | ||
| {/* eslint-disable-next-line typescript/no-base-to-string */} | ||
| <div>caused by: {hovered.point.source?.toString()}</div> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be a JSON.stringify instead?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't dug because it was in |
||
| <div>time lost: {fmtSeconds(hovered.point.time_lost)}</div> | ||
| <div>best remaining: {fmtSeconds(hovered.point.best_remaining_time)}</div> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ export function castToNumber(value: unknown): number | null | undefined { | |
| if (typeof value === 'boolean') return +value; | ||
| if (value === '') return null; | ||
|
|
||
| /* eslint-disable-next-line typescript/no-base-to-string */ | ||
| const stringValue = `${value}`; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps this should also be a JSON.stringify instead |
||
| const castValue = +stringValue; | ||
|
|
||
|
|
||
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.
I'm unconvinced this rule is useful to us, though I guess trimming this list is nice