Skip to content

Commit bd8e652

Browse files
committed
feat(lint): enable useExhaustiveDependencies rule with suppressions
Enable the biome correctness/useExhaustiveDependencies lint rule (was previously "off"). All existing violations are suppressed with biome-ignore comments added via `biome lint --suppress`. Co-authored-by: Claude <noreply@anthropic.com> https://claude.ai/code/session_01EHt5dM7Rts48s8HzcCaZCz
1 parent 4463d3c commit bd8e652

89 files changed

Lines changed: 133 additions & 24 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"noUnusedFunctionParameters": "off",
4242
"noUnusedImports": "off",
4343
"noUnusedVariables": "off",
44-
"useExhaustiveDependencies": "off",
44+
"useExhaustiveDependencies": "warn",
4545
"useHookAtTopLevel": "off",
4646
"useJsxKeyInIterable": "off",
4747
"useParseIntRadix": "off"

src/Apps/Article/Components/ArticleHTML.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const ArticleHTML: FC<React.PropsWithChildren<ArticleHTMLProps>> = ({
8787

8888
const [transformed, setTransformed] = useState<string | null>(null)
8989

90+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
9091
useEffect(() => {
9192
// Relies on the DOMParser global being available in the browser.
9293
import("@artsy/react-html-parser").then(({ default: reactHtmlParser }) => {

src/Apps/Article/Components/ArticleZoomGallery/ArticleZoomGalleryFigure.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ const Image: FC<
179179

180180
const ref = useRef<HTMLImageElement>(null)
181181

182+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
182183
useEffect(() => {
183184
if (ref.current?.complete) {
184185
setMode("Ready")

src/Apps/Artist/Routes/AuctionResults/Components/AuctionFilterMobileActionSheet.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const AuctionFilterMobileActionSheet: FC<
3232
filterContext.stagedFilters,
3333
)
3434

35+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
3536
useEffect(() => {
3637
// While mobile sheet is mounted, the effect of the user's filter selections
3738
// should be merely staged until the Apply button is pressed, rather than

src/Apps/Artist/Routes/AuctionResults/Components/AuctionFilters/KeywordFilter.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ export const KeywordFilter: React.FC<React.PropsWithChildren<unknown>> = () => {
1515
filterContext.setFilter?.("keyword", text)
1616
}
1717

18+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
1819
const handleChangeText = useMemo(
1920
() => debounce(updateKeywordFilter, DEBOUNCE_DELAY),
2021
// FIXME:
2122
[filterContext],
2223
)
2324

2425
// Stop the invocation of the debounced function after unmounting
25-
useEffect(() => {
26+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
27+
useEffect(() => {
2628
return () => handleChangeText?.cancel?.()
2729
// FIXME:
2830
}, [])

src/Apps/Artwork/ArtworkApp.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ export const ArtworkApp: React.FC<React.PropsWithChildren<Props>> = props => {
105105

106106
// If the user is expecting a partner offer, require login and remove
107107
// the query param from the URL after login.
108-
useEffect(() => {
108+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
109+
useEffect(() => {
109110
const expectingPartnerOffer = !!match?.location?.query?.partner_offer_id
110111
const isLoggedIn = !!me
111112

src/Apps/Artwork/Components/ArtworkErrorApp/ArtworkErrorApp.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const ArtworkErrorApp: React.FC<
4646
}
4747
}, [])
4848

49+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
4950
useEffect(() => {
5051
trackPageview()
5152
}, [])

src/Apps/Artwork/Components/ArtworkSidebar/ArtworkSidebarAuctionInfoPolling.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const ArtworkSidebarAuctionPolling: React.FC<
3131
const isMounted = useRef(false)
3232
const tracking = useTracking()
3333

34+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
3435
useEffect(() => {
3536
if (isMounted.current) {
3637
setCurrentBidChanged(true)

src/Apps/Artwork/Components/ArtworkVideoPlayer/ArtworkVideoPlayer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const ArtworkVideoPlayer: FC<
5959
}, 0)
6060
}
6161

62+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
6263
useEffect(() => {
6364
window.addEventListener("blur", trackClickedPlayVideo)
6465

src/Apps/Auction/AuctionApp.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const AuctionApp: React.FC<React.PropsWithChildren<AuctionAppProps>> = ({
5454

5555
const isFullBleedHeaderFixed = !cascadingEndTimeIntervalMinutes
5656

57+
// biome-ignore lint/correctness/useExhaustiveDependencies: ignored using `--suppress`
5758
useEffect(() => {
5859
tracking.auctionPageView({ sale, me })
5960
}, [])

0 commit comments

Comments
 (0)