Skip to content

Commit 89606d2

Browse files
authored
chore: Fix biome linting stuff (#812)
1 parent 0df5b24 commit 89606d2

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"javascript": {
2525
"formatter": {
26-
"trailingComma": "none",
26+
"trailingCommas": "none",
2727
"arrowParentheses": "asNeeded",
2828
"quoteStyle": "single"
2929
}

sites/avivator/src/hooks.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import {
2020
isInterleaved
2121
} from './utils';
2222

23+
/** @typedef {{ urlOrFile: string | File; description: string; isDemoImage: boolean; }} ImageSource */
24+
25+
/** @param {ImageSource} source */
2326
export const useImage = source => {
2427
const [use3d, toggleUse3d, toggleIsOffsetsSnackbarOn] = useViewerStore(
2528
store => [store.use3d, store.toggleUse3d, store.toggleIsOffsetsSnackbarOn],
@@ -81,6 +84,15 @@ export const useImage = source => {
8184
}
8285
}
8386
if (source) changeLoader();
87+
88+
// FIXME: biome warns that source shouldn't be a dep because it changes every render,
89+
// but it's necessary to trigger the effect (and make avivator functional).
90+
//
91+
// The overall implementation of this "hook" is very strange. It is all async side effects
92+
// that eventually update global state and is very tricky to reason about. There is probably
93+
// a more ideomatic way to do this with zustand.
94+
//
95+
// biome-ignore lint/correctness/useExhaustiveDependencies: see above
8496
}, [source, history]);
8597

8698
// biome-ignore lint/correctness/useExhaustiveDependencies: Carried over from eslint, without explanation.

0 commit comments

Comments
 (0)