-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: Fix lints in examples [DT-7060] #54
Conversation
Lint job is expected to fail, but you can look at it and see that the number of errors is lower now with this PR! |
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.
Found a few things I'm wondering about!
@@ -274,7 +274,6 @@ export function getVisibleTiles( | |||
): { layer: number; view: box2D; tiles: VoxelTile[] } { | |||
// const { axes, datasets } = dataset.multiscales[0]; | |||
// const zIndex = indexOfDimension(axes, sliceDimension[plane]); | |||
const sliceSize = sizeInUnits(uvTable[plane], dataset.multiscales[0].axes, dataset.multiscales[0].datasets[0])!; |
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.
Was this line removed by Biome, or was this a change made for other reasons?
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 removed it as I was looking through issues because it was marked as completely unused. I could comment it out like the ones above though 🤔
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.
Well, if it's completely unused, I see no problem removing it!
console.warn('no size for plane', plane, axes, best); | ||
continue; | ||
} | ||
|
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 assuming this wasn't added by Biome; what does this relate to?
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.
Replied to a related item elsewhere, it's to make TypeScript happy because of the !
assertion.
examples/src/dzi/dzi-demo.tsx
Outdated
@@ -1,7 +1,7 @@ | |||
import type { DziImage, DziRenderSettings } from '@alleninstitute/vis-dzi'; | |||
import { Box2D, type box2D, type vec2 } from '@alleninstitute/vis-geometry'; | |||
import { useEffect, useMemo, useRef, useState } from 'react'; | |||
import React from 'react'; | |||
import type React from 'react'; |
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 didn't realize React
was a type 🤔
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.
Ugh, I missed this one. It auto-fixed it to this. We were importing it because we didn't have Vite set up correctly to just have React
be available. Will remove!
if (!s) { | ||
console.warn('no size for plane', data.plane, data.dataset.multiscales[0].axes); | ||
return; | ||
} |
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.
Assuming this isn't Biome-related?
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.
It is, previously the s
was asserted to exist with s!
, and Biome throws linting errors since we're overriding TypeScript. So I added a guard with a log and quit early. This is in the examples
, so that seemed fine enough.
We'll want to be more cautious about fixing the type assertions in the actual packages
with the next PR though.
<Button | ||
name="layer" |
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.
Were these added by Biome? They seem like functional changes
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 added these to resolve Biome lint errors that the labels weren't attached to anything!
What
examples
folderHow
pnpm lint
PR Checklist
main
?