diff --git a/.eslintrc.js b/.eslintrc.js index 3d136069d31cb5..50f999009e0dd5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,6 +23,7 @@ module.exports = { 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react/recommended', + 'plugin:react-hooks/recommended', 'plugin:eslint-comments/recommended', 'plugin:storybook/recommended', 'prettier', @@ -53,6 +54,8 @@ module.exports = { html: true, }, ], + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'error', 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': [ 'error', @@ -236,6 +239,12 @@ module.exports = { '@typescript-eslint/no-var-requires': 'off', }, }, + { + files: ['*Type.ts'], + rules: { + 'no-restricted-imports': 'off', + }, + }, ], reportUnusedDisableDirectives: true, } diff --git a/frontend/src/layout/FeaturePreviews/FeaturePreviewsModal.tsx b/frontend/src/layout/FeaturePreviews/FeaturePreviewsModal.tsx index c80860f034a311..94ec6b4035e505 100644 --- a/frontend/src/layout/FeaturePreviews/FeaturePreviewsModal.tsx +++ b/frontend/src/layout/FeaturePreviews/FeaturePreviewsModal.tsx @@ -15,6 +15,8 @@ export function FeaturePreviewsModal({ useValues(featurePreviewsLogic) const { hideFeaturePreviewsModal, loadEarlyAccessFeatures } = useActions(featurePreviewsLogic) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps useLayoutEffect(() => loadEarlyAccessFeatures(), []) return ( diff --git a/frontend/src/layout/navigation-3000/Navigation.stories.tsx b/frontend/src/layout/navigation-3000/Navigation.stories.tsx index a46783d69fabaf..90f0c6d0e59def 100644 --- a/frontend/src/layout/navigation-3000/Navigation.stories.tsx +++ b/frontend/src/layout/navigation-3000/Navigation.stories.tsx @@ -35,6 +35,8 @@ export function LightMode(): JSX.Element { useEffect(() => { router.actions.push(urls.projectHomepage()) overrideTheme(false) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return @@ -45,6 +47,8 @@ export function DarkMode(): JSX.Element { useEffect(() => { router.actions.push(urls.projectHomepage()) overrideTheme(true) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return diff --git a/frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx b/frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx index 4176e5a156a154..ed3e00b475776e 100644 --- a/frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx +++ b/frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx @@ -42,6 +42,8 @@ export function Dashboards(): JSX.Element { const { activeNavbarItem } = useValues(navigation3000Logic) useEffect(() => { showSidebar(Scene.Dashboards) // Active this sidebar + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( @@ -61,6 +63,8 @@ export function FeatureFlags(): JSX.Element { const { activeNavbarItem } = useValues(navigation3000Logic) useEffect(() => { showSidebar(Scene.FeatureFlags) // Activate this sidebar + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/frontend/src/layout/navigation/Navigation.stories.tsx b/frontend/src/layout/navigation/Navigation.stories.tsx index dbb4e54b94bbce..dce3122718439d 100644 --- a/frontend/src/layout/navigation/Navigation.stories.tsx +++ b/frontend/src/layout/navigation/Navigation.stories.tsx @@ -73,6 +73,8 @@ export function AppPageWithSideBarHidden(): JSX.Element { useEffect(() => { toggleSideBarBase(false) toggleSideBarMobile(false) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return @@ -84,6 +86,8 @@ export function AppPageWithSideBarShown(): JSX.Element { useEffect(() => { toggleSideBarBase(true) toggleSideBarMobile(true) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return diff --git a/frontend/src/lib/components/ActivityLog/activityLogLogic.test.setup.ts b/frontend/src/lib/components/ActivityLog/activityLogLogic.test.setup.ts index 42e23c2fc2da5c..e7f4ffb6f47f0b 100644 --- a/frontend/src/lib/components/ActivityLog/activityLogLogic.test.setup.ts +++ b/frontend/src/lib/components/ActivityLog/activityLogLogic.test.setup.ts @@ -45,6 +45,8 @@ async function testSetup( scope: ActivityScope, url: string ): Promise> { + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks useMocks({ get: { [url]: { diff --git a/frontend/src/lib/components/AnnotationsOverlay/useAnnotationsPositioning.ts b/frontend/src/lib/components/AnnotationsOverlay/useAnnotationsPositioning.ts index ab9510ab35d173..41490e8b63bf95 100644 --- a/frontend/src/lib/components/AnnotationsOverlay/useAnnotationsPositioning.ts +++ b/frontend/src/lib/components/AnnotationsOverlay/useAnnotationsPositioning.ts @@ -36,5 +36,7 @@ export function useAnnotationsPositioning( firstTickLeftPx: 0, } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [chart, chartWidth, chartHeight]) } diff --git a/frontend/src/lib/components/BillingAlertsV2.tsx b/frontend/src/lib/components/BillingAlertsV2.tsx index 21a4023a6262af..d52fdf4f5bd464 100644 --- a/frontend/src/lib/components/BillingAlertsV2.tsx +++ b/frontend/src/lib/components/BillingAlertsV2.tsx @@ -15,6 +15,8 @@ export function BillingAlertsV2(): JSX.Element | null { if (billingAlert) { reportBillingAlertShown(billingAlert) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [billingAlert]) if (!billingAlert || alertHidden) { diff --git a/frontend/src/lib/components/Cards/CardMeta.tsx b/frontend/src/lib/components/Cards/CardMeta.tsx index 7692089baeca9b..d2b375c6e19418 100644 --- a/frontend/src/lib/components/Cards/CardMeta.tsx +++ b/frontend/src/lib/components/Cards/CardMeta.tsx @@ -49,6 +49,8 @@ export function CardMeta({ useEffect(() => { setPrimaryHeight?.(primaryHeight) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [primaryHeight]) const foldedHeight = `calc(${primaryHeight}px ${ diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx b/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx index 8fa80e6934cb9b..032523c2d22ef4 100644 --- a/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx +++ b/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx @@ -207,6 +207,8 @@ export function FilterBasedCardContent({ ) { window.dispatchEvent(new Event('resize')) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [style?.height]) return ( diff --git a/frontend/src/lib/components/DefinitionPopover/DefinitionPopoverContents.tsx b/frontend/src/lib/components/DefinitionPopover/DefinitionPopoverContents.tsx index cb4af914b655ba..a83d152266b408 100644 --- a/frontend/src/lib/components/DefinitionPopover/DefinitionPopoverContents.tsx +++ b/frontend/src/lib/components/DefinitionPopover/DefinitionPopoverContents.tsx @@ -391,15 +391,23 @@ export function ControlledDefinitionPopover({ return null } + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { state, singularType, isElement, definition } = useValues(definitionPopoverLogic) + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { setDefinition } = useActions(definitionPopoverLogic) const icon = group.getIcon?.(definition || item) // Must use `useEffect` here to hydrate popover card with the newest item, since lifecycle of `ItemPopover` is controlled // independently by `infiniteListLogic` + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks useEffect(() => { setDefinition(item) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [item]) return ( diff --git a/frontend/src/lib/components/EditableField/EditableField.tsx b/frontend/src/lib/components/EditableField/EditableField.tsx index 40e61b3e57d081..b046826b2a10ab 100644 --- a/frontend/src/lib/components/EditableField/EditableField.tsx +++ b/frontend/src/lib/components/EditableField/EditableField.tsx @@ -264,12 +264,16 @@ const AutosizeInput = ({ const inputStyles = useMemo(() => { return inputRef.current ? window.getComputedStyle(inputRef.current) : null + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [inputRef.current]) useLayoutEffect(() => { if (inputStyles && placeHolderSizerRef.current) { copyStyles(inputStyles, placeHolderSizerRef.current) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [placeHolderSizerRef, placeHolderSizerRef]) useLayoutEffect(() => { @@ -291,6 +295,8 @@ const AutosizeInput = ({ if (newInputWidth !== inputWidth) { setInputWidth(newInputWidth) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [sizerRef.current, placeHolderSizerRef.current, placeholder, value]) return ( diff --git a/frontend/src/lib/components/ExportButton/exporter.tsx b/frontend/src/lib/components/ExportButton/exporter.tsx index 84ebf2a5eecb97..6277c2d278be19 100644 --- a/frontend/src/lib/components/ExportButton/exporter.tsx +++ b/frontend/src/lib/components/ExportButton/exporter.tsx @@ -131,6 +131,8 @@ function DelayedContent({ atStart, afterDelay }: DelayedContentProps): JSX.Eleme setTimeout(() => { setContent(afterDelay) }, 30000) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return <>{content} } diff --git a/frontend/src/lib/components/FullScreen.tsx b/frontend/src/lib/components/FullScreen.tsx index 2ca3ec95706e08..0dbe4f6918e42f 100644 --- a/frontend/src/lib/components/FullScreen.tsx +++ b/frontend/src/lib/components/FullScreen.tsx @@ -52,6 +52,8 @@ export function FullScreen({ onExit }: { onExit?: () => any }): null { // will break on IE11 } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return null diff --git a/frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.tsx b/frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.tsx index c777e1d06c0a9e..0ebd132daa54ce 100644 --- a/frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.tsx +++ b/frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.tsx @@ -414,6 +414,8 @@ export function HedgehogBuddy({ useEffect(() => { return actor.setupKeyboardListeners() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -422,10 +424,14 @@ export function HedgehogBuddy({ useEffect(() => { actor.accessories = accessories + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [accessories]) useEffect(() => { actor.darkMode = isDarkModeOn + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isDarkModeOn]) useEffect(() => { @@ -441,6 +447,8 @@ export function HedgehogBuddy({ return () => { clearTimeout(timer) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { @@ -455,6 +463,8 @@ export function HedgehogBuddy({ useEffect(() => { onPositionChange?.(actor) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [actor.x, actor.y]) const onClick = (): void => { diff --git a/frontend/src/lib/components/Map/Map.tsx b/frontend/src/lib/components/Map/Map.tsx index 0b72d136d04d4f..22bb788243e90d 100644 --- a/frontend/src/lib/components/Map/Map.tsx +++ b/frontend/src/lib/components/Map/Map.tsx @@ -49,6 +49,8 @@ export function MapComponent({ center, markers, className, mapLibreStyleUrl }: M marker.addTo(map.current) } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useResizeObserver({ diff --git a/frontend/src/lib/components/PropertiesTable/PropertiesTable.tsx b/frontend/src/lib/components/PropertiesTable/PropertiesTable.tsx index da07df85f3d74f..1be001e77d9f7b 100644 --- a/frontend/src/lib/components/PropertiesTable/PropertiesTable.tsx +++ b/frontend/src/lib/components/PropertiesTable/PropertiesTable.tsx @@ -197,6 +197,8 @@ export function PropertiesTable({ ) } + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const objectProperties = useMemo(() => { if (!properties || !(properties instanceof Object)) { return [] @@ -243,6 +245,8 @@ export function PropertiesTable({ }) } return entries + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [properties, sortProperties, searchTerm, filtered]) if (properties instanceof Object) { diff --git a/frontend/src/lib/components/PropertyFilters/PathItemFilters.tsx b/frontend/src/lib/components/PropertyFilters/PathItemFilters.tsx index a79aa8c953e3d7..5ca80eb7a96294 100644 --- a/frontend/src/lib/components/PropertyFilters/PathItemFilters.tsx +++ b/frontend/src/lib/components/PropertyFilters/PathItemFilters.tsx @@ -34,6 +34,8 @@ export function PathItemFilters({ if (propertyFilters && !objectsEqual(propertyFilters, filtersWithNew)) { setFilters([...propertyFilters, {} as EmptyPropertyFilter]) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [propertyFilters]) return ( diff --git a/frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx b/frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx index 53cfa3972e9a63..bd736f5a65f0a0 100644 --- a/frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx +++ b/frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx @@ -57,6 +57,8 @@ export function PropertyFilters({ // Update the logic's internal filters when the props change useEffect(() => { setFilters(propertyFilters ?? []) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [propertyFilters]) return ( diff --git a/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.tsx b/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.tsx index 838569a81c8ab6..75a1b4c3979546 100644 --- a/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.tsx +++ b/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.tsx @@ -89,6 +89,8 @@ export function OperatorValueSelect({ } else if (limitedElementProperty && !operators.includes(currentOperator)) { setCurrentOperator(PropertyOperator.Exact) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [propertyDefinition, propkey, operator]) return ( diff --git a/frontend/src/lib/components/PropertyFilters/components/PropertyValue.tsx b/frontend/src/lib/components/PropertyFilters/components/PropertyValue.tsx index 3d07a4bed12615..ff1e388325da19 100644 --- a/frontend/src/lib/components/PropertyFilters/components/PropertyValue.tsx +++ b/frontend/src/lib/components/PropertyFilters/components/PropertyValue.tsx @@ -73,6 +73,8 @@ export function PropertyValue({ setInput(toString(value)) } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [value]) const load = (newInput: string | undefined): void => { @@ -94,6 +96,8 @@ export function PropertyValue({ useEffect(() => { load('') + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [propertyKey]) useEffect(() => { diff --git a/frontend/src/lib/components/ResizableTable/index.tsx b/frontend/src/lib/components/ResizableTable/index.tsx index 1f560fd3667525..e03537651ae7e0 100644 --- a/frontend/src/lib/components/ResizableTable/index.tsx +++ b/frontend/src/lib/components/ResizableTable/index.tsx @@ -206,6 +206,8 @@ export function ResizableTable = any>({ updateScrollGradient() setHeaderShouldRender(true) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/frontend/src/lib/components/RestrictedArea.tsx b/frontend/src/lib/components/RestrictedArea.tsx index 9d86714ce8cd60..ea9cebde28eb4c 100644 --- a/frontend/src/lib/components/RestrictedArea.tsx +++ b/frontend/src/lib/components/RestrictedArea.tsx @@ -57,6 +57,8 @@ export function RestrictedArea({ )}s and up. Your level is ${membershipLevelToName.get(scopeAccessLevel)}.` } return null + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [currentOrganization]) return restrictionReason ? ( diff --git a/frontend/src/lib/components/StickyView/StickyView.tsx b/frontend/src/lib/components/StickyView/StickyView.tsx index a411236d108526..6234c7b3e43a91 100644 --- a/frontend/src/lib/components/StickyView/StickyView.tsx +++ b/frontend/src/lib/components/StickyView/StickyView.tsx @@ -24,6 +24,8 @@ export function StickyView({ children, top = '0px', marginTop = 0 }: StickyViewP window.addEventListener('scroll', onScroll) return () => window.removeEventListener('scroll', onScroll) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [fixed]) return ( diff --git a/frontend/src/lib/components/Subscriptions/views/EditSubscription.tsx b/frontend/src/lib/components/Subscriptions/views/EditSubscription.tsx index 7034d975c324b3..93792a1b63aeeb 100644 --- a/frontend/src/lib/components/Subscriptions/views/EditSubscription.tsx +++ b/frontend/src/lib/components/Subscriptions/views/EditSubscription.tsx @@ -82,6 +82,8 @@ export function EditSubscription({ if (subscription?.target_type === 'slack' && slackIntegration) { loadSlackChannels() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [subscription?.target_type, slackIntegration]) // If slackChannels aren't loaded, make sure we display only the channel name and not the actual underlying value diff --git a/frontend/src/lib/components/Support/SupportModal.tsx b/frontend/src/lib/components/Support/SupportModal.tsx index a681dd85925fae..a0cc566fdb1e7c 100644 --- a/frontend/src/lib/components/Support/SupportModal.tsx +++ b/frontend/src/lib/components/Support/SupportModal.tsx @@ -55,8 +55,12 @@ export function SupportModal({ loggedIn = true }: { loggedIn?: boolean }): JSX.E } return null } + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const dropRef = useRef(null) + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { setFilesToUpload, filesToUpload, uploading } = useUploadFiles({ onUpload: (url, fileName) => { setSendSupportRequestValue('message', sendSupportRequest.message + `\n\nAttachment "${fileName}": ${url}`) diff --git a/frontend/src/lib/components/TZLabel/index.tsx b/frontend/src/lib/components/TZLabel/index.tsx index 859552654342b5..e95342b3aa2846 100644 --- a/frontend/src/lib/components/TZLabel/index.tsx +++ b/frontend/src/lib/components/TZLabel/index.tsx @@ -33,6 +33,8 @@ const TZLabelPopoverContent = React.memo(function TZLabelPopoverContent({ useEffect(() => { reportTimezoneComponentViewed('label', currentTeam?.timezone, shortTimeZone()) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( @@ -106,6 +108,8 @@ function TZLabelRaw({ } }, 1000) return () => clearInterval(interval) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [parsedTime, format]) const innerContent = ( diff --git a/frontend/src/lib/components/Table/Table.tsx b/frontend/src/lib/components/Table/Table.tsx index b8eeb568e1311c..7a6522155730ce 100644 --- a/frontend/src/lib/components/Table/Table.tsx +++ b/frontend/src/lib/components/Table/Table.tsx @@ -25,6 +25,8 @@ export function createdAtColumn = Record = Record>(items: T[]): ColumnType { + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { user } = useValues(userLogic) return { title: normalizeColumnTitle('Created by'), diff --git a/frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx b/frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx index 57926c1f468b7b..7bb1efb444d876 100644 --- a/frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx +++ b/frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx @@ -32,6 +32,8 @@ export const EventsFree: StoryFn = (args) => { // Highlight the second item, as the first one is "All events", which doesn't have a definition to show // - we do want to show the definition popover here too setIndex(1) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return (
@@ -66,6 +68,8 @@ export const Actions: StoryFn = (args) => { // Highlight the second item, as the first one is "All events", which doesn't have a definition to show // - we do want to show the definition popover here too setIndex(0) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return (
diff --git a/frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.tsx b/frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.tsx index 87280adf25c600..57c7cfe9b0add8 100644 --- a/frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.tsx +++ b/frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.tsx @@ -62,6 +62,8 @@ export function TaxonomicFilter({ if (groupType !== TaxonomicFilterGroupType.HogQLExpression) { window.setTimeout(() => focusInput(), 1) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) const style = { diff --git a/frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx b/frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx index abf4589005691c..a838938ad83488 100644 --- a/frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx +++ b/frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx @@ -72,6 +72,8 @@ export function TaxonomicPopover { setLocalFormativeElementValue(chooseFormativeElementValue(formativeElement, trendsFilter)) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [formativeElement]) if (formativeElement === null) { diff --git a/frontend/src/lib/components/VisibilitySensor/VisibilitySensor.tsx b/frontend/src/lib/components/VisibilitySensor/VisibilitySensor.tsx index 8ff2d988e37eff..233d5a449d8bcb 100644 --- a/frontend/src/lib/components/VisibilitySensor/VisibilitySensor.tsx +++ b/frontend/src/lib/components/VisibilitySensor/VisibilitySensor.tsx @@ -17,6 +17,8 @@ export function VisibilitySensor({ id, offset, children }: VisibilityProps): JSX const element = ref.current document.addEventListener('scroll', () => element && scrolling(element)) return () => document.removeEventListener('scroll', () => element && scrolling(element)) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ref.current]) return
{children}
diff --git a/frontend/src/lib/hooks/useD3.ts b/frontend/src/lib/hooks/useD3.ts index 19de5fab0171c8..21715c99c255ca 100644 --- a/frontend/src/lib/hooks/useD3.ts +++ b/frontend/src/lib/hooks/useD3.ts @@ -17,7 +17,8 @@ export const useD3 = ( } return () => {} }, - + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps dependencies ) return ref diff --git a/frontend/src/lib/hooks/useEventListener.ts b/frontend/src/lib/hooks/useEventListener.ts index f24d04ebce0d2d..3bfebbf8b3d44f 100644 --- a/frontend/src/lib/hooks/useEventListener.ts +++ b/frontend/src/lib/hooks/useEventListener.ts @@ -51,6 +51,8 @@ export function useEventListener( } }, + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps [eventName, element, ...(deps || [])] // Re-run if eventName or element changes ) } diff --git a/frontend/src/lib/hooks/useKeyHeld.tsx b/frontend/src/lib/hooks/useKeyHeld.tsx index aa88e18aee42bb..60696be8dee242 100644 --- a/frontend/src/lib/hooks/useKeyHeld.tsx +++ b/frontend/src/lib/hooks/useKeyHeld.tsx @@ -11,6 +11,8 @@ export function useKeyHeld(key: string, deps?: DependencyList): boolean { useEffect(() => { checkKeysHeld() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [key, ...(deps || [])]) useEventListener( diff --git a/frontend/src/lib/hooks/useLongPress.js b/frontend/src/lib/hooks/useLongPress.js index 83beb5df2b7650..78e772f7af2829 100644 --- a/frontend/src/lib/hooks/useLongPress.js +++ b/frontend/src/lib/hooks/useLongPress.js @@ -42,6 +42,8 @@ export function useLongPress( return () => { clearTimeout(timerId) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [callback, ms, startLongPress]) function start(e) { diff --git a/frontend/src/lib/hooks/useOutsideClickHandler.ts b/frontend/src/lib/hooks/useOutsideClickHandler.ts index c69acfd21fb204..c5dee7203cb854 100644 --- a/frontend/src/lib/hooks/useOutsideClickHandler.ts +++ b/frontend/src/lib/hooks/useOutsideClickHandler.ts @@ -45,5 +45,7 @@ export function useOutsideClickHandler( document.removeEventListener('touchend', handleClick) } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [...allRefs, ...extraDeps]) } diff --git a/frontend/src/lib/hooks/usePageVisibility.ts b/frontend/src/lib/hooks/usePageVisibility.ts index f40f9f59721c00..4b2829eb5e96e3 100644 --- a/frontend/src/lib/hooks/usePageVisibility.ts +++ b/frontend/src/lib/hooks/usePageVisibility.ts @@ -37,5 +37,7 @@ export function usePageVisibility(callback: (pageIsVisible: boolean) => void): v return function cleanUp() { document.removeEventListener(visibilityChange, onVisibilityChange) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) } diff --git a/frontend/src/lib/hooks/useScrollable.ts b/frontend/src/lib/hooks/useScrollable.ts index 08fe12247725d2..647fb112b4c024 100644 --- a/frontend/src/lib/hooks/useScrollable.ts +++ b/frontend/src/lib/hooks/useScrollable.ts @@ -32,6 +32,8 @@ export function useScrollable(): [React.RefObject, [boolean, boo clearInterval(timeout) } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [scrollRef.current]) useLayoutEffect(() => { diff --git a/frontend/src/lib/hooks/useSecondRender.js b/frontend/src/lib/hooks/useSecondRender.js index 7b997898fe4561..0a7f86bbd46fd5 100644 --- a/frontend/src/lib/hooks/useSecondRender.js +++ b/frontend/src/lib/hooks/useSecondRender.js @@ -8,6 +8,8 @@ export function useSecondRender(callback) { setSecondRender(true) callback() }) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return secondRender diff --git a/frontend/src/lib/hooks/useUploadFiles.ts b/frontend/src/lib/hooks/useUploadFiles.ts index 1b21c2613e3a59..3ffd659626aed5 100644 --- a/frontend/src/lib/hooks/useUploadFiles.ts +++ b/frontend/src/lib/hooks/useUploadFiles.ts @@ -67,6 +67,8 @@ export function useUploadFiles({ } } uploadFiles().catch(console.error) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [filesToUpload]) return { setFilesToUpload, filesToUpload, uploading } diff --git a/frontend/src/lib/hooks/useWhyDidIRender.ts b/frontend/src/lib/hooks/useWhyDidIRender.ts index 2650dd3d7882d4..dd653f0a17bc8e 100644 --- a/frontend/src/lib/hooks/useWhyDidIRender.ts +++ b/frontend/src/lib/hooks/useWhyDidIRender.ts @@ -20,5 +20,6 @@ export function useWhyDidIRender(name: string, props: Record): void } } oldProps.current = props + // eslint-disable-next-line react-hooks/exhaustive-deps }, [Object.values(props)]) } diff --git a/frontend/src/lib/hooks/useWindowSize.js b/frontend/src/lib/hooks/useWindowSize.js index dc0615e5d9196f..af5f781d780886 100644 --- a/frontend/src/lib/hooks/useWindowSize.js +++ b/frontend/src/lib/hooks/useWindowSize.js @@ -25,7 +25,8 @@ export function useWindowSize() { window.addEventListener('resize', handleResize) return () => window.removeEventListener('resize', handleResize) }, - + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps [] // Empty array ensures that effect is only run on mount and unmount ) diff --git a/frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx b/frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx index 25fcc5c4cfeccf..b9e3a6d6454512 100644 --- a/frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx +++ b/frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx @@ -43,6 +43,8 @@ export function LemonCalendar(props: LemonCalendarProps): JSX.Element { if (props.leftmostMonth && props.leftmostMonth.isSame(leftmostMonth, 'd')) { setLeftmostMonth(props.leftmostMonth) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [props.leftmostMonth]) return ( diff --git a/frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.tsx b/frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.tsx index 8a25fd4d1fae19..02189ef1fc98d0 100644 --- a/frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.tsx +++ b/frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.tsx @@ -67,6 +67,8 @@ export function LemonCalendarRangeInline({ ) { setLeftmostMonth(leftmostMonthForRange) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [rangeStart, rangeEnd]) return ( diff --git a/frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx b/frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx index 4a9c211e2b2e33..1849fe920aeaf2 100644 --- a/frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx +++ b/frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx @@ -43,6 +43,8 @@ export function LemonCollapse({ let isPanelExpanded: (key: K) => boolean let onPanelChange: (key: K, isExpanded: boolean) => void if (props.multiple) { + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const [localActiveKeys, setLocalActiveKeys] = useState>(new Set(props.defaultActiveKeys ?? [])) const effectiveActiveKeys = props.activeKeys ? new Set(props.activeKeys) : localActiveKeys isPanelExpanded = (key: K) => effectiveActiveKeys.has(key) @@ -57,6 +59,8 @@ export function LemonCollapse({ setLocalActiveKeys(newActiveKeys) } } else { + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const [localActiveKey, setLocalActiveKey] = useState(props.defaultActiveKey ?? null) const effectiveActiveKey = props.activeKey ?? localActiveKey isPanelExpanded = (key: K) => key === effectiveActiveKey diff --git a/frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsx b/frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsx index 316b64abf2ab63..6b61f2d7c0540c 100644 --- a/frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsx +++ b/frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsx @@ -61,6 +61,8 @@ export function LemonDialog({ setIsOpen(false) } lastLocation.current = currentLocation.pathname + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [currentLocation]) return ( diff --git a/frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.tsx b/frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.tsx index 25cf4daf6e04dc..2480953ebe8bde 100644 --- a/frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.tsx +++ b/frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.tsx @@ -40,6 +40,8 @@ export const LemonFileInput = ({ if (value && value !== files) { setFiles(value) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [value]) const onInputChange = (e: ChangeEvent): void => { @@ -104,6 +106,8 @@ export const LemonFileInput = ({ div?.removeEventListener('dragover', handleDrag) div?.removeEventListener('drop', handleDrop) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [value]) useEffect(() => { diff --git a/frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx b/frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx index c00145d40f4497..71d56122d99df3 100644 --- a/frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx +++ b/frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx @@ -105,6 +105,8 @@ export function LemonMenu({ setTimeout(() => itemsRef?.current?.[activeItemIndex]?.current?.scrollIntoView({ block: 'center' }), 0) } }, + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps [onVisibilityChange, activeItemIndex] ) diff --git a/frontend/src/lib/lemon-ui/LemonMenu/useKeyboardNavigation.ts b/frontend/src/lib/lemon-ui/LemonMenu/useKeyboardNavigation.ts index 19b4fb92442f10..d8645a0ccfaf45 100644 --- a/frontend/src/lib/lemon-ui/LemonMenu/useKeyboardNavigation.ts +++ b/frontend/src/lib/lemon-ui/LemonMenu/useKeyboardNavigation.ts @@ -45,7 +45,11 @@ export function useKeyboardNavigation { + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps referenceRef.current?.removeEventListener('keydown', handleKeyDown) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps for (const item of itemsRef.current) { item.current?.removeEventListener('keydown', handleKeyDown) } diff --git a/frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx b/frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx index 5686b6af194124..c06febbe7b04d9 100644 --- a/frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx +++ b/frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx @@ -116,6 +116,8 @@ export function LemonSelect({ } onSelect?.(newValue) }), + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps [options, value] ) diff --git a/frontend/src/lib/lemon-ui/LemonTable/LemonTable.tsx b/frontend/src/lib/lemon-ui/LemonTable/LemonTable.tsx index b3c5deae984917..b6e8d4d868415d 100644 --- a/frontend/src/lib/lemon-ui/LemonTable/LemonTable.tsx +++ b/frontend/src/lib/lemon-ui/LemonTable/LemonTable.tsx @@ -147,6 +147,8 @@ export function LemonTable>({ ) } }, + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps [location, searchParams, hashParams, push] ) @@ -190,6 +192,8 @@ export function LemonTable>({ } } return dataSource + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [dataSource, currentSorting]) const paginationState = usePagination(sortedDataSource, pagination, id) @@ -203,6 +207,8 @@ export function LemonTable>({ window.scrollTo(window.scrollX, window.scrollY + realTableOffsetTop) } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [paginationState.currentPage, scrollRef.current]) if (firstColumnSticky && expandable) { diff --git a/frontend/src/lib/lemon-ui/PaginationControl/usePagination.ts b/frontend/src/lib/lemon-ui/PaginationControl/usePagination.ts index 24beda803877b4..088ae47e310d2b 100644 --- a/frontend/src/lib/lemon-ui/PaginationControl/usePagination.ts +++ b/frontend/src/lib/lemon-ui/PaginationControl/usePagination.ts @@ -16,6 +16,8 @@ export function usePagination( const setCurrentPage = useCallback( (newPage: number) => push(location.pathname, { ...searchParams, [currentPageParam]: newPage }, hashParams), + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps [location, searchParams, hashParams, push] ) @@ -39,6 +41,8 @@ export function usePagination( currentStartIndex: calculatedStartIndex, currentEndIndex: calculatedEndIndex, } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [currentPage, pageCount, pagination, dataSource]) return { diff --git a/frontend/src/lib/lemon-ui/Popover/Popover.tsx b/frontend/src/lib/lemon-ui/Popover/Popover.tsx index cec6c54b546c1b..20dc45ffdf2a21 100644 --- a/frontend/src/lib/lemon-ui/Popover/Popover.tsx +++ b/frontend/src/lib/lemon-ui/Popover/Popover.tsx @@ -150,6 +150,8 @@ export const Popover = React.forwardRef(function P if (referenceElement) { reference(referenceElement) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [referenceElement]) useEventListener( @@ -180,6 +182,8 @@ export const Popover = React.forwardRef(function P if (visible && referenceRef?.current && floatingRef?.current) { return autoUpdate(referenceRef.current, floatingRef.current, update) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [visible, referenceRef?.current, floatingRef?.current, ...additionalRefs]) const _onClickInside: MouseEventHandler = (e): void => { diff --git a/frontend/src/lib/lemon-ui/ProfilePicture/ProfilePicture.tsx b/frontend/src/lib/lemon-ui/ProfilePicture/ProfilePicture.tsx index c97db6270d428d..7ed61527904e21 100644 --- a/frontend/src/lib/lemon-ui/ProfilePicture/ProfilePicture.tsx +++ b/frontend/src/lib/lemon-ui/ProfilePicture/ProfilePicture.tsx @@ -55,6 +55,8 @@ export function ProfilePicture({ } }) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [email]) if (gravatarUrl) { diff --git a/frontend/src/lib/lemon-ui/hooks.ts b/frontend/src/lib/lemon-ui/hooks.ts index 32625c2d499bd7..a63bbd11201841 100644 --- a/frontend/src/lib/lemon-ui/hooks.ts +++ b/frontend/src/lib/lemon-ui/hooks.ts @@ -35,6 +35,8 @@ export function useSliderPositioning { startAutoLoad() return () => stopAutoLoad() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/frontend/src/queries/nodes/DataTable/DataTable.tsx b/frontend/src/queries/nodes/DataTable/DataTable.tsx index 47f10de575e5b9..35adae40710850 100644 --- a/frontend/src/queries/nodes/DataTable/DataTable.tsx +++ b/frontend/src/queries/nodes/DataTable/DataTable.tsx @@ -370,6 +370,8 @@ export function DataTable({ uniqueKey, query, setQuery, context, cachedResults } const setQuerySource = useCallback( (source: EventsNode | EventsQuery | PersonsNode | PersonsQuery | HogQLQuery) => setQuery?.({ ...query, source }), + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps [setQuery] ) diff --git a/frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx b/frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx index 872cf62478bcb2..e1f9647ea2ac00 100644 --- a/frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx +++ b/frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx @@ -39,6 +39,8 @@ export function HogQLQueryEditor(props: HogQLQueryEditorProps): JSX.Element { const monacoDisposables = useRef([] as IDisposable[]) useEffect(() => { return () => { + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps monacoDisposables.current.forEach((d) => d?.dispose()) } }, []) diff --git a/frontend/src/queries/nodes/TimeToSeeData/Trace/Trace.tsx b/frontend/src/queries/nodes/TimeToSeeData/Trace/Trace.tsx index 7b697ffd9d9fee..f165b7f4ba7326 100644 --- a/frontend/src/queries/nodes/TimeToSeeData/Trace/Trace.tsx +++ b/frontend/src/queries/nodes/TimeToSeeData/Trace/Trace.tsx @@ -41,6 +41,8 @@ function SpanBar({ if (nextStartMargin !== startMargin) { setStartMargin(nextStartMargin) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [spanData, maxSpan]) return ( diff --git a/frontend/src/scenes/apps/AppMetricsGraph.tsx b/frontend/src/scenes/apps/AppMetricsGraph.tsx index b8bb316a2bf3f9..40fce1531c294a 100644 --- a/frontend/src/scenes/apps/AppMetricsGraph.tsx +++ b/frontend/src/scenes/apps/AppMetricsGraph.tsx @@ -83,6 +83,8 @@ export function AppMetricsGraph({ tab, metrics, metricsLoading }: AppMetricsGrap chart?.destroy() } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [metrics]) if (metricsLoading || !metrics) { diff --git a/frontend/src/scenes/apps/HistoricalExportsTab.tsx b/frontend/src/scenes/apps/HistoricalExportsTab.tsx index ed94dcbeb14331..abed345c9715f7 100644 --- a/frontend/src/scenes/apps/HistoricalExportsTab.tsx +++ b/frontend/src/scenes/apps/HistoricalExportsTab.tsx @@ -32,6 +32,8 @@ export function HistoricalExportsTab(): JSX.Element { updateTimer() return () => timer && clearTimeout(timer) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [hasRunningExports]) return ( diff --git a/frontend/src/scenes/authentication/Login.tsx b/frontend/src/scenes/authentication/Login.tsx index b3c3cf1f70149c..263f130d6ded2c 100644 --- a/frontend/src/scenes/authentication/Login.tsx +++ b/frontend/src/scenes/authentication/Login.tsx @@ -68,6 +68,8 @@ export function Login(): JSX.Element { } catch (e) { captureException(e) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { diff --git a/frontend/src/scenes/batch_exports/BatchExportScene.tsx b/frontend/src/scenes/batch_exports/BatchExportScene.tsx index 9de5c77a43a035..a6e3188eee4bb7 100644 --- a/frontend/src/scenes/batch_exports/BatchExportScene.tsx +++ b/frontend/src/scenes/batch_exports/BatchExportScene.tsx @@ -312,7 +312,11 @@ export function LogsTab({ batchExportId }: BatchExportLogsProps): JSX.Element { batchExportLogsBackground, isThereMoreToLoad, batchExportLogsTypes, + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks } = useValues(logic) + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { revealBackground, loadBatchExportLogsMore, setBatchExportLogsTypes, setSearchTerm } = useActions(logic) return ( @@ -377,6 +381,8 @@ export function BatchExportScene(): JSX.Element { useEffect(() => { loadBatchExportConfig() loadBatchExportRuns() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) if (!batchExportConfig && !batchExportConfigLoading) { diff --git a/frontend/src/scenes/billing/Billing.tsx b/frontend/src/scenes/billing/Billing.tsx index 481b89aa9defd0..0f73bcd58f84a1 100644 --- a/frontend/src/scenes/billing/Billing.tsx +++ b/frontend/src/scenes/billing/Billing.tsx @@ -47,6 +47,8 @@ export function Billing(): JSX.Element { if (billing) { reportBillingV2Shown() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [!!billing]) const { ref, size } = useResizeBreakpoints({ diff --git a/frontend/src/scenes/billing/PlanComparison.tsx b/frontend/src/scenes/billing/PlanComparison.tsx index 646c553ce8dc8f..55218145076470 100644 --- a/frontend/src/scenes/billing/PlanComparison.tsx +++ b/frontend/src/scenes/billing/PlanComparison.tsx @@ -94,7 +94,11 @@ export const PlanComparison = ({ return null } const fullyFeaturedPlan = plans[plans.length - 1] + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { reportBillingUpgradeClicked } = useActions(eventUsageLogic) + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { redirectPath, billing } = useValues(billingLogic) const upgradeButtons = plans?.map((plan) => { diff --git a/frontend/src/scenes/dashboard/Dashboard.tsx b/frontend/src/scenes/dashboard/Dashboard.tsx index b91f23eba7cb04..1138e55147e5ea 100644 --- a/frontend/src/scenes/dashboard/Dashboard.tsx +++ b/frontend/src/scenes/dashboard/Dashboard.tsx @@ -67,6 +67,8 @@ function DashboardScene(): JSX.Element { // request cancellation of any running queries when this component is no longer in the dom abortAnyRunningQuery() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useKeyboardHotkeys( diff --git a/frontend/src/scenes/data-management/events/EventDefinitionProperties.tsx b/frontend/src/scenes/data-management/events/EventDefinitionProperties.tsx index 70a5b6a88a8e82..4175ad27829a19 100644 --- a/frontend/src/scenes/data-management/events/EventDefinitionProperties.tsx +++ b/frontend/src/scenes/data-management/events/EventDefinitionProperties.tsx @@ -17,6 +17,8 @@ export function EventDefinitionProperties({ definition }: { definition: EventDef useEffect(() => { loadPropertiesForEvent(definition) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) const columns: LemonTableColumns = [ diff --git a/frontend/src/scenes/experiments/Experiment.tsx b/frontend/src/scenes/experiments/Experiment.tsx index 2717a1f523750e..647082bde00188 100644 --- a/frontend/src/scenes/experiments/Experiment.tsx +++ b/frontend/src/scenes/experiments/Experiment.tsx @@ -106,6 +106,8 @@ export function Experiment(): JSX.Element { useEffect(() => { setExposureAndSampleSize(exposure, sampleSize) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [exposure, sampleSize]) // Parameters for experiment results diff --git a/frontend/src/scenes/feature-flags/FeatureFlag.tsx b/frontend/src/scenes/feature-flags/FeatureFlag.tsx index 8de7aa6162fed7..bdab82193d68d8 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlag.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlag.tsx @@ -601,6 +601,8 @@ function UsageTab({ featureFlag }: { id: string; featureFlag: FeatureFlagType }) ) { enrichUsageDashboard() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [dashboard]) const propertyFilter: AnyPropertyFilter[] = [ diff --git a/frontend/src/scenes/feature-flags/FeatureFlagInstructions.tsx b/frontend/src/scenes/feature-flags/FeatureFlagInstructions.tsx index 2c32d7f615bf32..7c2ceffbe40f27 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlagInstructions.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlagInstructions.tsx @@ -132,6 +132,8 @@ export function CodeInstructions({ if (featureFlag?.ensure_experience_continuity) { setShowLocalEvalCode(false) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [selectedLanguage, featureFlag]) const groups = featureFlag?.filters?.groups || [] diff --git a/frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx b/frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx index eb74c9fe612483..f95875c0317431 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx @@ -62,6 +62,8 @@ export function EditFeatureFlag(): JSX.Element { export function EditMultiVariateFeatureFlag(): JSX.Element { useEffect(() => { + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks useAvailableFeatures([AvailableFeature.MULTIVARIATE_FLAGS]) router.actions.push(urls.featureFlag(1502)) }, []) diff --git a/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.tsx b/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.tsx index 8db62510709bb1..4e0e0caca4ad60 100644 --- a/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.tsx +++ b/frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.tsx @@ -107,6 +107,8 @@ export function FunnelBarChart({ ) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [visibleStepsWithConversionMetrics, height]) // negative margin-top so that the scrollable shadow is visible on the canvas label as well diff --git a/frontend/src/scenes/funnels/FunnelBarGraph/Bar.tsx b/frontend/src/scenes/funnels/FunnelBarGraph/Bar.tsx index 9fd86c95b9dd68..267b2d747469f0 100644 --- a/frontend/src/scenes/funnels/FunnelBarGraph/Bar.tsx +++ b/frontend/src/scenes/funnels/FunnelBarGraph/Bar.tsx @@ -76,6 +76,8 @@ export function Bar({ useEffect(() => { decideLabelPosition() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [wrapperWidth]) return ( diff --git a/frontend/src/scenes/funnels/useFunnelTooltip.tsx b/frontend/src/scenes/funnels/useFunnelTooltip.tsx index 495969b8103d17..9197997bdfd5ae 100644 --- a/frontend/src/scenes/funnels/useFunnelTooltip.tsx +++ b/frontend/src/scenes/funnels/useFunnelTooltip.tsx @@ -148,6 +148,8 @@ export function useFunnelTooltip(showPersonsModal: boolean): React.RefObject { reportInsightViewedForRecentInsights() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [insightId]) // Show the skeleton if loading an insight for which we only know the id diff --git a/frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.tsx b/frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.tsx index adcbb55787bb9b..73d51a55a444a1 100644 --- a/frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.tsx +++ b/frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.tsx @@ -115,6 +115,8 @@ export const ActionFilter = React.forwardRef( // to be shown on the /funnels page, even if we try to use a selector with props to hydrate it useEffect(() => { setLocalFilters(filters) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [filters]) function onSortEnd({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }): void { diff --git a/frontend/src/scenes/insights/filters/ActionFilter/RenameModal.tsx b/frontend/src/scenes/insights/filters/ActionFilter/RenameModal.tsx index 21645cd702d64a..6e4c5fb9f043ed 100644 --- a/frontend/src/scenes/insights/filters/ActionFilter/RenameModal.tsx +++ b/frontend/src/scenes/insights/filters/ActionFilter/RenameModal.tsx @@ -78,6 +78,8 @@ function useSelectAllText( return () => clearTimeout(autoFocusTimeout) }, + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps dependencies ) } diff --git a/frontend/src/scenes/insights/filters/AggregationSelect.tsx b/frontend/src/scenes/insights/filters/AggregationSelect.tsx index a4ef9cc6cfb52b..cc811314915981 100644 --- a/frontend/src/scenes/insights/filters/AggregationSelect.tsx +++ b/frontend/src/scenes/insights/filters/AggregationSelect.tsx @@ -65,7 +65,11 @@ export function AggregationSelect({ updateQuerySource({ aggregation_group_type_index: groupIndex } as FunnelsQuery) } } + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { groupTypes, aggregationLabel } = useValues(groupsModel) + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { needsUpgradeForGroups, canStartUsingGroups } = useValues(groupsAccessLogic) const baseValues = [UNIQUE_USERS] diff --git a/frontend/src/scenes/insights/utils/cleanFilters.ts b/frontend/src/scenes/insights/utils/cleanFilters.ts index bd16e3ca1ba797..65d739a35d46ae 100644 --- a/frontend/src/scenes/insights/utils/cleanFilters.ts +++ b/frontend/src/scenes/insights/utils/cleanFilters.ts @@ -83,6 +83,8 @@ const cleanBreakdownParams = (cleanedParams: Partial, filters: Parti // For the map, make sure we are breaking down by country // Support automatic switching to country code breakdown both from no breakdown and from country name breakdown cleanedParams['breakdown'] = '$geoip_country_code' + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks useMostRelevantBreakdownType(cleanedParams, filters) return } diff --git a/frontend/src/scenes/insights/views/BoldNumber/BoldNumber.tsx b/frontend/src/scenes/insights/views/BoldNumber/BoldNumber.tsx index f8526346a0b750..bc2699b9b74a43 100644 --- a/frontend/src/scenes/insights/views/BoldNumber/BoldNumber.tsx +++ b/frontend/src/scenes/insights/views/BoldNumber/BoldNumber.tsx @@ -76,6 +76,8 @@ function useBoldNumberTooltip({ } } ) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isTooltipShown]) return divRef diff --git a/frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx b/frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx index 8d05cea3b4e599..d783319719b62a 100644 --- a/frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx +++ b/frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx @@ -65,9 +65,16 @@ const Textfit = ({ min, max, children }: { min: number; max: number; children: R useEffect(() => { window.addEventListener('resize', handleWindowResize) return () => window.removeEventListener('resize', handleWindowResize) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) - useEffect(() => handleWindowResize(), [parentRef, childRef]) + useEffect( + () => handleWindowResize(), + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps + [parentRef, childRef] + ) return ( // eslint-disable-next-line react/forbid-dom-props diff --git a/frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.tsx b/frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.tsx index eda03e199dd28e..1b33437b9779d1 100644 --- a/frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.tsx +++ b/frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.tsx @@ -52,6 +52,8 @@ export function FunnelCorrelationTable(): JSX.Element | null { if (loadedEventCorrelationsTableOnce) { loadEventCorrelations({}) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [querySource]) const { openCorrelationPersonsModal } = useActions(funnelPersonsModalLogic(insightProps)) diff --git a/frontend/src/scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.tsx b/frontend/src/scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.tsx index a06bac784f4258..3fee97395e5c62 100644 --- a/frontend/src/scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.tsx +++ b/frontend/src/scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.tsx @@ -43,6 +43,8 @@ export function FunnelPropertyCorrelationTable(): JSX.Element | null { if (loadedPropertyCorrelationsTableOnce) { loadPropertyCorrelations({}) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [querySource]) const { openCorrelationPersonsModal } = useActions(funnelPersonsModalLogic(insightProps)) diff --git a/frontend/src/scenes/insights/views/Histogram/Histogram.tsx b/frontend/src/scenes/insights/views/Histogram/Histogram.tsx index d3abb1548470c0..11226355e3f22f 100644 --- a/frontend/src/scenes/insights/views/Histogram/Histogram.tsx +++ b/frontend/src/scenes/insights/views/Histogram/Histogram.tsx @@ -87,6 +87,8 @@ export function Histogram({ config.margin.right ) setConfig(getConfig(layout, isDashboardItem ? width : minWidth, height)) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [data.length, layout, width, height]) const ref = useD3( diff --git a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx index 7333db5adf9ecd..e9e8949c854910 100644 --- a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx +++ b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx @@ -368,6 +368,8 @@ export function LineGraph_({ } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps datasets = datasets.map((dataset) => processDataset(dataset)) const seriesMax = Math.max(...datasets.flatMap((d) => d.data).filter((n) => !!n)) diff --git a/frontend/src/scenes/insights/views/LineGraph/PieChart.tsx b/frontend/src/scenes/insights/views/LineGraph/PieChart.tsx index 34b107de7e26ea..50e132f937c00a 100644 --- a/frontend/src/scenes/insights/views/LineGraph/PieChart.tsx +++ b/frontend/src/scenes/insights/views/LineGraph/PieChart.tsx @@ -86,6 +86,8 @@ export function PieChart({ // Hide intentionally hidden keys if (!areObjectValuesEmpty(hiddenLegendKeys)) { // If series are nested (for ActionsHorizontalBar and Pie), filter out the series by index + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps datasets = filterNestedDataset(hiddenLegendKeys, datasets) } diff --git a/frontend/src/scenes/insights/views/WorldMap/WorldMap.tsx b/frontend/src/scenes/insights/views/WorldMap/WorldMap.tsx index 4aa976d50243f8..3d5c7b86044381 100644 --- a/frontend/src/scenes/insights/views/WorldMap/WorldMap.tsx +++ b/frontend/src/scenes/insights/views/WorldMap/WorldMap.tsx @@ -94,6 +94,8 @@ function useWorldMapTooltip(showPersonsModal: boolean): React.RefObject loadAsyncMigrations(), STATUS_RELOAD_INTERVAL_MS) return () => clearInterval(interval) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isAnyMigrationRunning]) const nameColumn: AsyncMigrationColumnType = { diff --git a/frontend/src/scenes/instance/SystemStatus/InstanceConfigTab.tsx b/frontend/src/scenes/instance/SystemStatus/InstanceConfigTab.tsx index da0fdf6f31f3a8..fa888c3b56167f 100644 --- a/frontend/src/scenes/instance/SystemStatus/InstanceConfigTab.tsx +++ b/frontend/src/scenes/instance/SystemStatus/InstanceConfigTab.tsx @@ -21,6 +21,8 @@ export function InstanceConfigTab(): JSX.Element { useEffect(() => { loadInstanceSettings() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useKeyboardHotkeys({ diff --git a/frontend/src/scenes/notebooks/Nodes/NodeWrapper.tsx b/frontend/src/scenes/notebooks/Nodes/NodeWrapper.tsx index fea1b437f3d21c..962a5e4c47b8ac 100644 --- a/frontend/src/scenes/notebooks/Nodes/NodeWrapper.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NodeWrapper.tsx @@ -94,6 +94,8 @@ function NodeWrapper(props: NodeWrapperP useEffect(() => { // TRICKY: child nodes mount the parent logic so we need to control the mounting / unmounting directly in this component return () => unregisterNodeLogic(nodeId) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useWhyDidIRender('NodeWrapper.logicProps', { diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeCohort.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeCohort.tsx index 60fa028e0814a8..0faa7181b1faa9 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeCohort.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeCohort.tsx @@ -118,6 +118,8 @@ const Component = ({ attributes }: NotebookNodeProps { setTitlePlaceholder( earlyAccessFeature.name ? `Early Access Management: ${earlyAccessFeature.name}` : 'Early Access Management' ) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [earlyAccessFeature?.name]) if (earlyAccessFeatureMissing) { diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeExperiment.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeExperiment.tsx index 28801d7c356a71..631b717e0759d7 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeExperiment.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeExperiment.tsx @@ -41,6 +41,8 @@ const Component = ({ attributes }: NotebookNodeProps { loadExperiment() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [id]) if (experimentMissing) { diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeFlag.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeFlag.tsx index 28941e0ccec118..d53f81eaa287c8 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeFlag.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeFlag.tsx @@ -93,6 +93,8 @@ const Component = ({ attributes }: NotebookNodeProps } : undefined, ]) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [featureFlag]) if (featureFlagMissing) { diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeFlagCodeExample.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeFlagCodeExample.tsx index deb1dac4eb25f6..9055f4a1757516 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeFlagCodeExample.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeFlagCodeExample.tsx @@ -19,6 +19,8 @@ const Component = ({ attributes }: NotebookNodeProps { @@ -108,6 +112,8 @@ const Component = ({ }, 100) }, }) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx index 7db59b716cd6a3..84f7f11b14eeec 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx @@ -56,6 +56,8 @@ const Component = ({ attributes }: NotebookNodeProps { diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeRecording.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeRecording.tsx index a104932395c83d..0f1fdcdf13385b 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeRecording.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeRecording.tsx @@ -56,6 +56,8 @@ const Component = ({ attributes }: NotebookNodeProps { loadRecordingMeta() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) // TODO Only load data when in view... @@ -86,6 +88,8 @@ const Component = ({ attributes }: NotebookNodeProps { @@ -100,6 +104,8 @@ const Component = ({ attributes }: NotebookNodeProps { const logicById = sourceNodeId ? findNodeLogicById(sourceNodeId) : null return logicById ?? findNodeLogic(NotebookNodeType.Recording, { id: sessionRecordingId }) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [findNodeLogic]) const handlePlayInNotebook = (): void => { diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeSurvey.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeSurvey.tsx index 8ebfa1be59f983..f3ad16e00c8d67 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeSurvey.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeSurvey.tsx @@ -36,10 +36,14 @@ const Component = ({ attributes }: NotebookNodeProps { setTitlePlaceholder(survey.name ? `Survey: ${survey.name}` : 'Survey') + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [survey.name]) if (surveyMissing) { diff --git a/frontend/src/scenes/notebooks/Nodes/components/NotebookNodeTitle.tsx b/frontend/src/scenes/notebooks/Nodes/components/NotebookNodeTitle.tsx index 4e7f6e2a2b0456..8bf264d70fedbc 100644 --- a/frontend/src/scenes/notebooks/Nodes/components/NotebookNodeTitle.tsx +++ b/frontend/src/scenes/notebooks/Nodes/components/NotebookNodeTitle.tsx @@ -14,6 +14,8 @@ export function NotebookNodeTitle(): JSX.Element { useEffect(() => { setNewValue(nodeAttributes.title ?? '') + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [editing]) const commitEdit = (): void => { diff --git a/frontend/src/scenes/notebooks/Nodes/utils.tsx b/frontend/src/scenes/notebooks/Nodes/utils.tsx index 70016ffc8f60d1..6cb5b4574bbadd 100644 --- a/frontend/src/scenes/notebooks/Nodes/utils.tsx +++ b/frontend/src/scenes/notebooks/Nodes/utils.tsx @@ -141,6 +141,8 @@ export function useSyncedAttributes( // NOTE: queueMicrotask protects us from TipTap's flushSync calls, ensuring we never modify the state whilst the flush is happening queueMicrotask(() => props.updateAttributes(stringifiedAttrs)) }, + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps [props.updateAttributes] ) diff --git a/frontend/src/scenes/notebooks/Notebook/Editor.tsx b/frontend/src/scenes/notebooks/Notebook/Editor.tsx index feaffd333ae788..9e4105b157d4f8 100644 --- a/frontend/src/scenes/notebooks/Notebook/Editor.tsx +++ b/frontend/src/scenes/notebooks/Notebook/Editor.tsx @@ -56,6 +56,8 @@ export function Editor(): JSX.Element { const { resetSuggestions, setPreviousNode } = useActions(insertionSuggestionsLogic) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps const headingPlaceholder = useMemo(() => sampleOne(PLACEHOLDER_TITLES), [shortId]) const updatePreviousNode = useCallback(() => { @@ -63,6 +65,8 @@ export function Editor(): JSX.Element { if (editor) { setPreviousNode(getNodeBeforeActiveNode(editor)) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [editorRef.current]) const _editor = useEditor({ diff --git a/frontend/src/scenes/notebooks/Notebook/Notebook.tsx b/frontend/src/scenes/notebooks/Notebook/Notebook.tsx index f320808bf90c96..f190dee09bfc68 100644 --- a/frontend/src/scenes/notebooks/Notebook/Notebook.tsx +++ b/frontend/src/scenes/notebooks/Notebook/Notebook.tsx @@ -42,6 +42,8 @@ export function Notebook({ if (initialContent && mode === 'canvas') { setLocalContent(initialContent) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [notebook]) useWhyDidIRender('Notebook', { @@ -58,10 +60,14 @@ export function Notebook({ if (!notebook && !notebookLoading) { loadNotebook() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { setEditable(editable) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [editable]) useEffect(() => { @@ -72,6 +78,8 @@ export function Notebook({ if (editor) { editor.focus(initialAutofocus) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [editor]) // TODO - Render a special state if the notebook is empty diff --git a/frontend/src/scenes/notebooks/Notebook/NotebookMeta.tsx b/frontend/src/scenes/notebooks/Notebook/NotebookMeta.tsx index a3da6c0b0c11cb..2a74b5f7380ff2 100644 --- a/frontend/src/scenes/notebooks/Notebook/NotebookMeta.tsx +++ b/frontend/src/scenes/notebooks/Notebook/NotebookMeta.tsx @@ -65,6 +65,8 @@ export const NotebookSyncInfo = (props: NotebookLogicProps): JSX.Element | null clearTimeout(t) clearDebounceTimeout() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [syncStatus]) if (!debouncedSyncStatus) { diff --git a/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx b/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx index f820f876cce36d..94deebd45fe946 100644 --- a/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx +++ b/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx @@ -136,6 +136,8 @@ export function NotebookPopover(): JSX.Element { if (ref.current) { setElementRef(ref) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ref.current]) return ( diff --git a/frontend/src/scenes/notebooks/Notebook/SlashCommands.tsx b/frontend/src/scenes/notebooks/Notebook/SlashCommands.tsx index 17e68a26237399..06f4e6ef697f41 100644 --- a/frontend/src/scenes/notebooks/Notebook/SlashCommands.tsx +++ b/frontend/src/scenes/notebooks/Notebook/SlashCommands.tsx @@ -309,6 +309,8 @@ export const SlashCommands = forwardRef(fu const [selectedIndex, setSelectedIndex] = useState(0) const [selectedHorizontalIndex, setSelectedHorizontalIndex] = useState(0) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps const allCommmands = [...TEXT_CONTROLS, ...SLASH_COMMANDS] const fuse = useMemo(() => { @@ -323,6 +325,8 @@ export const SlashCommands = forwardRef(fu return allCommmands } return fuse.search(query).map((result) => result.item) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [query, fuse]) const filteredSlashCommands = useMemo( @@ -377,6 +381,8 @@ export const SlashCommands = forwardRef(fu return false }, + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps [selectedIndex, selectedHorizontalIndex, filteredCommands] ) diff --git a/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx b/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx index 76f201e9df2962..6dd15645082e16 100644 --- a/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx +++ b/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx @@ -115,6 +115,8 @@ export function NotebookSelectList(props: NotebookSelectProps): JSX.Element { loadNotebooksContainingResource() } loadAllNotebooks() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( @@ -215,6 +217,8 @@ export function NotebookSelectButton({ children, ...props }: NotebookSelectButto if (!nodeLogic) { loadNotebooksContainingResource() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [nodeLogic]) const button = ( diff --git a/frontend/src/scenes/notebooks/NotebooksTable/NotebooksTable.tsx b/frontend/src/scenes/notebooks/NotebooksTable/NotebooksTable.tsx index 6f57e08427f011..0992044b0a45b1 100644 --- a/frontend/src/scenes/notebooks/NotebooksTable/NotebooksTable.tsx +++ b/frontend/src/scenes/notebooks/NotebooksTable/NotebooksTable.tsx @@ -23,6 +23,8 @@ export function NotebooksTable(): JSX.Element { useEffect(() => { loadNotebooks() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) const columns: LemonTableColumns = [ diff --git a/frontend/src/scenes/notebooks/Suggestions/FloatingSuggestions.tsx b/frontend/src/scenes/notebooks/Suggestions/FloatingSuggestions.tsx index ce2f90609bb19a..2327d88130ce84 100644 --- a/frontend/src/scenes/notebooks/Suggestions/FloatingSuggestions.tsx +++ b/frontend/src/scenes/notebooks/Suggestions/FloatingSuggestions.tsx @@ -17,6 +17,8 @@ export function FloatingSuggestions({ editor }: { editor: TTEditor }): JSX.Eleme useEffect(() => { setEditor(notebookEditor) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [notebookEditor]) return ( diff --git a/frontend/src/scenes/onboarding/Onboarding.tsx b/frontend/src/scenes/onboarding/Onboarding.tsx index 50a1ff9f25956d..974ef191fa4a6a 100644 --- a/frontend/src/scenes/onboarding/Onboarding.tsx +++ b/frontend/src/scenes/onboarding/Onboarding.tsx @@ -31,6 +31,8 @@ const OnboardingWrapper = ({ children }: { children: React.ReactNode }): JSX.Ele useEffect(() => { createAllSteps() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [children]) useEffect(() => { @@ -38,6 +40,8 @@ const OnboardingWrapper = ({ children }: { children: React.ReactNode }): JSX.Ele return } setAllOnboardingSteps(allSteps) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [allSteps]) if (!product || !children) { @@ -127,6 +131,8 @@ export function Onboarding(): JSX.Element | null { if (featureFlags[FEATURE_FLAGS.PRODUCT_SPECIFIC_ONBOARDING] !== 'test') { location.href = urls.ingestion() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) if (!product) { diff --git a/frontend/src/scenes/onboarding/sdks/SDKs.tsx b/frontend/src/scenes/onboarding/sdks/SDKs.tsx index fda0e0d52e4867..051dd6a65e2aaa 100644 --- a/frontend/src/scenes/onboarding/sdks/SDKs.tsx +++ b/frontend/src/scenes/onboarding/sdks/SDKs.tsx @@ -26,6 +26,8 @@ export function SDKs({ useEffect(() => { setAvailableSDKInstructionsMap(sdkInstructionMap) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/frontend/src/scenes/paths/Paths.tsx b/frontend/src/scenes/paths/Paths.tsx index 7ddebb7033fb09..0f1caa87bdb9ef 100644 --- a/frontend/src/scenes/paths/Paths.tsx +++ b/frontend/src/scenes/paths/Paths.tsx @@ -37,6 +37,8 @@ export function Paths(): JSX.Element { elements?.forEach((node) => node?.parentNode?.removeChild(node)) renderPaths(canvasRef, canvasWidth, canvasHeight, paths, pathsFilter || {}, setNodeCards) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [paths, !insightDataLoading, canvasWidth, canvasHeight]) if (insightDataError) { diff --git a/frontend/src/scenes/persons/PersonCohorts.tsx b/frontend/src/scenes/persons/PersonCohorts.tsx index 7ae2d11912d38e..a7e613a31d41f2 100644 --- a/frontend/src/scenes/persons/PersonCohorts.tsx +++ b/frontend/src/scenes/persons/PersonCohorts.tsx @@ -12,6 +12,8 @@ export function PersonCohorts(): JSX.Element { useEffect(() => { loadCohorts() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [person]) const columns: LemonTableColumns = [ diff --git a/frontend/src/scenes/persons/PersonDashboard.tsx b/frontend/src/scenes/persons/PersonDashboard.tsx index 877bd35efb3c38..b84e860dd3295d 100644 --- a/frontend/src/scenes/persons/PersonDashboard.tsx +++ b/frontend/src/scenes/persons/PersonDashboard.tsx @@ -40,6 +40,8 @@ export function PersonDashboard({ person }: { person: PersonType }): JSX.Element ]) } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [dashboard, person]) return ( diff --git a/frontend/src/scenes/persons/PersonPreview.tsx b/frontend/src/scenes/persons/PersonPreview.tsx index 7b9e61fe377aaa..0c88485fcc7568 100644 --- a/frontend/src/scenes/persons/PersonPreview.tsx +++ b/frontend/src/scenes/persons/PersonPreview.tsx @@ -20,6 +20,8 @@ export function PersonPreview(props: PersonPreviewProps): JSX.Element | null { return null } + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { person, personLoading } = useValues(personLogic({ id: props.distinctId })) if (personLoading) { diff --git a/frontend/src/scenes/persons/PersonsSearch.tsx b/frontend/src/scenes/persons/PersonsSearch.tsx index 8b4c5166cad21b..d2b7a22fff32e8 100644 --- a/frontend/src/scenes/persons/PersonsSearch.tsx +++ b/frontend/src/scenes/persons/PersonsSearch.tsx @@ -15,11 +15,15 @@ export const PersonsSearch = (): JSX.Element => { useEffect(() => { setSearchTerm(listFilters.search || '') + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { setListFilters({ search: searchTerm || undefined }) loadPersonsDebounced() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [searchTerm]) return ( diff --git a/frontend/src/scenes/plugins/edit/PluginDrawer.tsx b/frontend/src/scenes/plugins/edit/PluginDrawer.tsx index a467750a365cb9..f4e128348b9df0 100644 --- a/frontend/src/scenes/plugins/edit/PluginDrawer.tsx +++ b/frontend/src/scenes/plugins/edit/PluginDrawer.tsx @@ -70,6 +70,8 @@ export function PluginDrawer(): JSX.Element { form.resetFields() } updateInvisibleAndRequiredFields() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [editingPlugin?.id, editingPlugin?.config_schema]) const updateInvisibleAndRequiredFields = (): void => { diff --git a/frontend/src/scenes/plugins/plugin/PluginImage.tsx b/frontend/src/scenes/plugins/plugin/PluginImage.tsx index 67120a11074d89..ec7df5d6727597 100644 --- a/frontend/src/scenes/plugins/plugin/PluginImage.tsx +++ b/frontend/src/scenes/plugins/plugin/PluginImage.tsx @@ -30,6 +30,8 @@ export function PluginImage({ image: `https://raw.githubusercontent.com/${user}/${repo}/${path || 'main'}/logo.png`, }) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [url]) return pluginType === 'source' ? ( diff --git a/frontend/src/scenes/plugins/tabs/apps/AppManagementView.tsx b/frontend/src/scenes/plugins/tabs/apps/AppManagementView.tsx index 6324af5a536b87..927f368721b0a1 100644 --- a/frontend/src/scenes/plugins/tabs/apps/AppManagementView.tsx +++ b/frontend/src/scenes/plugins/tabs/apps/AppManagementView.tsx @@ -23,7 +23,11 @@ export function AppManagementView({ return <> } const { installingPluginUrl, pluginsNeedingUpdates, pluginsUpdating, loading, unusedPlugins } = + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks useValues(pluginsLogic) + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { installPlugin, editPlugin, updatePlugin, uninstallPlugin, patchPlugin } = useActions(pluginsLogic) return ( diff --git a/frontend/src/scenes/plugins/tabs/apps/AppsManagementTab.tsx b/frontend/src/scenes/plugins/tabs/apps/AppsManagementTab.tsx index ea6dc22ccae73f..e2232f51fd210d 100644 --- a/frontend/src/scenes/plugins/tabs/apps/AppsManagementTab.tsx +++ b/frontend/src/scenes/plugins/tabs/apps/AppsManagementTab.tsx @@ -19,6 +19,8 @@ export function AppsManagementTab(): JSX.Element { return <> } + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const { checkForUpdates, openAdvancedInstallModal } = useActions(pluginsLogic) const { @@ -32,12 +34,18 @@ export function AppsManagementTab(): JSX.Element { hasUpdatablePlugins, checkingForUpdates, updateStatus, + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks } = useValues(pluginsLogic) + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const officialPlugins = useMemo( () => filteredUninstalledPlugins.filter((plugin) => plugin.maintainer === 'official'), [filteredUninstalledPlugins] ) + // FIXME + // eslint-disable-next-line react-hooks/rules-of-hooks const communityPlugins = useMemo( () => filteredUninstalledPlugins.filter((plugin) => plugin.maintainer === 'community'), [filteredUninstalledPlugins] diff --git a/frontend/src/scenes/products/Products.tsx b/frontend/src/scenes/products/Products.tsx index afdbb1abffabeb..93b6f45a2b11e5 100644 --- a/frontend/src/scenes/products/Products.tsx +++ b/frontend/src/scenes/products/Products.tsx @@ -112,6 +112,8 @@ export function Products(): JSX.Element { if (featureFlags[FEATURE_FLAGS.PRODUCT_SPECIFIC_ONBOARDING] !== 'test') { location.href = urls.ingestion() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/frontend/src/scenes/project-homepage/RecentInsights.tsx b/frontend/src/scenes/project-homepage/RecentInsights.tsx index 40c5efb4fdba23..04892f23ee8635 100644 --- a/frontend/src/scenes/project-homepage/RecentInsights.tsx +++ b/frontend/src/scenes/project-homepage/RecentInsights.tsx @@ -38,6 +38,8 @@ export function RecentInsights(): JSX.Element { useEffect(() => { loadRecentInsights() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( <> diff --git a/frontend/src/scenes/session-recordings/filters/SessionRecordingsFilters.tsx b/frontend/src/scenes/session-recordings/filters/SessionRecordingsFilters.tsx index bc1e108bf7c19c..780336073e0c8c 100644 --- a/frontend/src/scenes/session-recordings/filters/SessionRecordingsFilters.tsx +++ b/frontend/src/scenes/session-recordings/filters/SessionRecordingsFilters.tsx @@ -57,6 +57,8 @@ export function SessionRecordingsFilters({ events: localFilters.events, }) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [localFilters]) useEffect(() => { @@ -65,6 +67,8 @@ export function SessionRecordingsFilters({ if (!equal(filters.actions, localFilters.actions) || !equal(filters.events, localFilters.events)) { setLocalFilters(filtersToLocalFilters(filters)) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [filters]) return ( diff --git a/frontend/src/scenes/session-recordings/player/PlayerFrame.tsx b/frontend/src/scenes/session-recordings/player/PlayerFrame.tsx index 47981346968b82..15f5203d08b868 100644 --- a/frontend/src/scenes/session-recordings/player/PlayerFrame.tsx +++ b/frontend/src/scenes/session-recordings/player/PlayerFrame.tsx @@ -16,6 +16,8 @@ export const PlayerFrame = (): JSX.Element => { if (frameRef.current) { setRootFrame(frameRef.current) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [frameRef, sessionRecordingId]) const containerRef = useRef(null) @@ -31,11 +33,15 @@ export const PlayerFrame = (): JSX.Element => { window.addEventListener('resize', windowResize) return () => window.removeEventListener('resize', windowResize) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [player?.replayer]) // Recalculate the player size when the player changes dimensions useEffect(() => { windowResize() + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [containerDimensions]) const windowResize = (): void => { diff --git a/frontend/src/scenes/session-recordings/player/PlayerUpNext.tsx b/frontend/src/scenes/session-recordings/player/PlayerUpNext.tsx index 54a4c5df45c6fc..c473de8bfca513 100644 --- a/frontend/src/scenes/session-recordings/player/PlayerUpNext.tsx +++ b/frontend/src/scenes/session-recordings/player/PlayerUpNext.tsx @@ -43,6 +43,8 @@ export function PlayerUpNext({ interrupted, clearInterrupted, playlistLogic }: P } return () => clearTimeout(timeoutRef.current) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [endReached, !!nextSessionRecording]) useEffect(() => { diff --git a/frontend/src/scenes/session-recordings/player/controller/PlayerSeekbarPreview.tsx b/frontend/src/scenes/session-recordings/player/controller/PlayerSeekbarPreview.tsx index 44fd8f6763c694..64a3560d056a0c 100644 --- a/frontend/src/scenes/session-recordings/player/controller/PlayerSeekbarPreview.tsx +++ b/frontend/src/scenes/session-recordings/player/controller/PlayerSeekbarPreview.tsx @@ -48,6 +48,8 @@ const PlayerSeekbarPreviewFrame = ({ if (isVisible) { debouncedSeekToTime(minMs + (maxMs - minMs) * percentage) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [percentage, minMs, maxMs, isVisible]) return ( @@ -90,6 +92,8 @@ export function PlayerSeekbarPreview({ minMs, maxMs, seekBarRef }: PlayerSeekbar // fixes react-hooks/exhaustive-deps warning about stale ref elements const { current } = ref return () => current?.removeEventListener('mousemove', handleMouseMove) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [seekBarRef]) return ( diff --git a/frontend/src/scenes/session-recordings/player/controller/Seekbar.tsx b/frontend/src/scenes/session-recordings/player/controller/Seekbar.tsx index c2ed3c6ef3bc1a..f57802f72841fc 100644 --- a/frontend/src/scenes/session-recordings/player/controller/Seekbar.tsx +++ b/frontend/src/scenes/session-recordings/player/controller/Seekbar.tsx @@ -31,6 +31,8 @@ export function Seekbar(): JSX.Element { setSlider(sliderRef) setThumb(thumbRef) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [sliderRef.current, thumbRef.current, sessionRecordingId]) return ( @@ -63,7 +65,7 @@ export function Seekbar(): JSX.Element { ))}
- {/* eslint-disable-next-line react/forbid-dom-props */} + {}
window.removeEventListener('click', onClickHandler) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [inspectorFocus]) return ( diff --git a/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorList.tsx b/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorList.tsx index 2f1ad0175314db..eadbd50ae7f760 100644 --- a/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorList.tsx +++ b/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorList.tsx @@ -114,6 +114,8 @@ export function PlayerInspectorList(): JSX.Element { positionMarkerEl.id = 'PlayerInspectorListMarker' listElement?.appendChild(positionMarkerEl) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [listRef.current]) useEffect(() => { @@ -131,6 +133,8 @@ export function PlayerInspectorList(): JSX.Element { listRef.current.scrollToRow(playbackIndicatorIndex) } } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [playbackIndicatorIndex, syncScroll]) const renderRow: ListRowRenderer = ({ index, key, parent, style }) => { diff --git a/frontend/src/scenes/session-recordings/player/inspector/components/PlayerInspectorListItem.tsx b/frontend/src/scenes/session-recordings/player/inspector/components/PlayerInspectorListItem.tsx index 9478a2ceca19ad..f85d9f56e8393c 100644 --- a/frontend/src/scenes/session-recordings/player/inspector/components/PlayerInspectorListItem.tsx +++ b/frontend/src/scenes/session-recordings/player/inspector/components/PlayerInspectorListItem.tsx @@ -82,12 +82,16 @@ export function PlayerInspectorListItem({ return } onLayoutDebounced({ width, height: totalHeight }) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [width]) useEffect(() => { if (!width || !totalHeight) { return } onLayout({ width, height: totalHeight }) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [totalHeight]) const windowNumber = diff --git a/frontend/src/scenes/surveys/surveyViewViz.tsx b/frontend/src/scenes/surveys/surveyViewViz.tsx index 7ef6783eaa7e5f..5475d70ece834a 100644 --- a/frontend/src/scenes/surveys/surveyViewViz.tsx +++ b/frontend/src/scenes/surveys/surveyViewViz.tsx @@ -180,6 +180,8 @@ export function RatingQuestionBarChart({ useEffect(() => { loadSurveyRatingResults({ questionIndex }) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [questionIndex]) return ( @@ -279,6 +281,8 @@ export function SingleChoiceQuestionPieChart({ useEffect(() => { loadSurveySingleChoiceResults({ questionIndex }) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [questionIndex]) return ( @@ -379,6 +383,8 @@ export function MultipleChoiceQuestionBarChart({ useEffect(() => { loadSurveyMultipleChoiceResults({ questionIndex }) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [questionIndex]) return ( @@ -450,6 +456,8 @@ export function OpenTextViz({ useEffect(() => { loadSurveyOpenTextResults({ questionIndex }) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [questionIndex]) return ( diff --git a/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx b/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx index 017bde1423b7a7..bd0e969a3b568a 100644 --- a/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx +++ b/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx @@ -63,6 +63,8 @@ export function ActionsHorizontalBar({ inCardView, showPersonsModal = true }: Ch if (indexedResults) { updateData() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [indexedResults]) return data && total > 0 ? ( diff --git a/frontend/src/scenes/trends/viz/ActionsPie.tsx b/frontend/src/scenes/trends/viz/ActionsPie.tsx index fdfc6069d56520..678a276696d697 100644 --- a/frontend/src/scenes/trends/viz/ActionsPie.tsx +++ b/frontend/src/scenes/trends/viz/ActionsPie.tsx @@ -62,6 +62,8 @@ export function ActionsPie({ inSharedMode, inCardView, showPersonsModal = true } if (indexedResults) { updateData() } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [indexedResults, hiddenLegendKeys]) return data ? ( diff --git a/frontend/src/toolbar/button/HedgehogButton.tsx b/frontend/src/toolbar/button/HedgehogButton.tsx index 44f1b20ae2d0b0..491b8e5f7eb245 100644 --- a/frontend/src/toolbar/button/HedgehogButton.tsx +++ b/frontend/src/toolbar/button/HedgehogButton.tsx @@ -27,6 +27,8 @@ export function HedgehogButton(): JSX.Element { if (actorRef.current) { setHedgehogActor(actorRef.current) } + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [actorRef.current]) return ( diff --git a/frontend/src/toolbar/button/ToolbarButton.tsx b/frontend/src/toolbar/button/ToolbarButton.tsx index b4d3e9bc38a6d6..e2ec280f2b7239 100644 --- a/frontend/src/toolbar/button/ToolbarButton.tsx +++ b/frontend/src/toolbar/button/ToolbarButton.tsx @@ -85,6 +85,8 @@ export function ToolbarButton(): JSX.Element { } window.addEventListener('mousemove', globalMouseMove.current) return () => window.removeEventListener('mousemove', globalMouseMove.current) + // FIXME + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isAuthenticated]) // using useLongPress for short presses (clicks) since it detects if the element was dragged (no click) or not (click) diff --git a/package.json b/package.json index 583620eca93e3b..2ec083ff50f78f 100644 --- a/package.json +++ b/package.json @@ -250,6 +250,7 @@ "eslint-plugin-no-only-tests": "^3.1.0", "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-storybook": "^0.6.15", "file-loader": "^6.1.0", "givens": "^1.3.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70f37cc6ddc4dd..1a4cc97d4c2465 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -552,6 +552,9 @@ devDependencies: eslint-plugin-react: specifier: ^7.33.2 version: 7.33.2(eslint@8.52.0) + eslint-plugin-react-hooks: + specifier: ^4.6.0 + version: 4.6.0(eslint@8.52.0) eslint-plugin-storybook: specifier: ^0.6.15 version: 0.6.15(eslint@8.52.0)(typescript@4.9.5) @@ -10080,6 +10083,15 @@ packages: synckit: 0.8.5 dev: true + /eslint-plugin-react-hooks@4.6.0(eslint@8.52.0): + resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + dependencies: + eslint: 8.52.0 + dev: true + /eslint-plugin-react@7.33.2(eslint@8.52.0): resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'}