fix/suppress new react-hooks/preserve-manual-memoization errors
eslint-plugin-react-hooks bumped from 7.0.1 to 7.1.1 under pnpm resolution, which tightened preserve-manual-memoization. Real fixes: - RichTextTag: correct typo'd optional chain in deps array - ContentHider: match post-guard narrowing in deps array - ProfileHoverCard: add (stable) dispatch to deps arrays Bulk-suppress the remaining 6 cases where the compiler can't preserve memoization across a memo boundary; those need real refactors, follow-up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -147,6 +147,9 @@
|
||||
"src/components/dialogs/PostInteractionSettingsDialog.tsx": {
|
||||
"@typescript-eslint/no-explicit-any": {
|
||||
"count": 2
|
||||
},
|
||||
"react-hooks/preserve-manual-memoization": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/components/dialogs/lists/CreateOrEditListDialog.tsx": {
|
||||
@@ -397,6 +400,9 @@
|
||||
"src/screens/PostThread/index.tsx": {
|
||||
"@typescript-eslint/no-explicit-any": {
|
||||
"count": 2
|
||||
},
|
||||
"react-hooks/preserve-manual-memoization": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/screens/Profile/Header/EditProfileDialog.tsx": {
|
||||
@@ -542,6 +548,9 @@
|
||||
"src/view/com/composer/Composer.tsx": {
|
||||
"@typescript-eslint/no-explicit-any": {
|
||||
"count": 2
|
||||
},
|
||||
"react-hooks/preserve-manual-memoization": {
|
||||
"count": 3
|
||||
}
|
||||
},
|
||||
"src/view/com/composer/drafts/state/queries.ts": {
|
||||
@@ -594,6 +603,11 @@
|
||||
"count": 4
|
||||
}
|
||||
},
|
||||
"src/view/com/pager/Pager.web.tsx": {
|
||||
"react-hooks/preserve-manual-memoization": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/view/com/pager/PagerWithHeader.tsx": {
|
||||
"@typescript-eslint/no-explicit-any": {
|
||||
"count": 3
|
||||
|
||||
@@ -288,24 +288,24 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
|
||||
didFireHover.current = true
|
||||
dispatch('hovered-target')
|
||||
}
|
||||
}, [prefetchIfNeeded])
|
||||
}, [prefetchIfNeeded, dispatch])
|
||||
|
||||
const onPointerLeaveTarget = useCallback(() => {
|
||||
didFireHover.current = false
|
||||
dispatch('unhovered-target')
|
||||
}, [])
|
||||
}, [dispatch])
|
||||
|
||||
const onPointerEnterCard = useCallback(() => {
|
||||
dispatch('hovered-card')
|
||||
}, [])
|
||||
}, [dispatch])
|
||||
|
||||
const onPointerLeaveCard = useCallback(() => {
|
||||
dispatch('unhovered-card')
|
||||
}, [])
|
||||
}, [dispatch])
|
||||
|
||||
const onPress = useCallback(() => {
|
||||
dispatch('pressed')
|
||||
}, [])
|
||||
}, [dispatch])
|
||||
|
||||
const isVisible =
|
||||
currentState.stage === 'showing' ||
|
||||
|
||||
@@ -62,7 +62,7 @@ export function RichTextTag({
|
||||
optimisticUpsert?.find(
|
||||
m => m.value === tag && m.targets.includes('tag'),
|
||||
)) &&
|
||||
!optimisticRemove?.find(m => m?.value === tag),
|
||||
!optimisticRemove?.find(m => m?.value === tag),
|
||||
)
|
||||
|
||||
/*
|
||||
@@ -74,7 +74,7 @@ export function RichTextTag({
|
||||
return word.value === tag
|
||||
}) || []
|
||||
)
|
||||
}, [tag, preferences?.moderationPrefs?.mutedWords])
|
||||
}, [tag, preferences?.moderationPrefs.mutedWords])
|
||||
|
||||
return (
|
||||
<Menu.Root>
|
||||
|
||||
@@ -139,7 +139,7 @@ function ContentHiderActive({
|
||||
return [...new Set(selfBlurNames)].join(', ')
|
||||
}, [
|
||||
_,
|
||||
modui?.blurs,
|
||||
modui.blurs,
|
||||
blur,
|
||||
desc.name,
|
||||
desc.isSubjectAccount,
|
||||
|
||||
Reference in New Issue
Block a user