Skip to content

Commit ed2c240

Browse files
authored
Clean up lint warnings (adobe#3612)
* fix relative imports * fix max-depth * ignore exhaustive-deps * ignore no-noninteractive-element-interactions
1 parent 58401df commit ed2c240

File tree

38 files changed

+51
-10
lines changed

38 files changed

+51
-10
lines changed

packages/@react-aria/dnd/src/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ export function readFromDataTransfer(dataTransfer: DataTransfer) {
216216
// only implemented in Chrome.
217217
if (typeof item.webkitGetAsEntry === 'function') {
218218
let entry: FileSystemEntry = item.webkitGetAsEntry();
219+
// eslint-disable-next-line max-depth
219220
if (!entry) {
220221
// For some reason, Firefox includes an item with type image/png when copy
221222
// and pasting any file or directory (no matter the type), but returns `null` for both
@@ -225,6 +226,7 @@ export function readFromDataTransfer(dataTransfer: DataTransfer) {
225226
continue;
226227
}
227228

229+
// eslint-disable-next-line max-depth
228230
if (entry.isFile) {
229231
items.push(createFileItem(item.getAsFile()));
230232
} else if (entry.isDirectory) {

packages/@react-aria/dnd/stories/VirtualizedListBox.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ export function VirtualizedListBoxExample(props) {
4949
for (let item of e.items) {
5050
if (item.kind === 'text') {
5151
let type: string;
52-
if (props.accept) {
53-
if (item.types.has(props.accept)) {
54-
type = props.accept;
55-
}
52+
if (props.accept && item.types.has(props.accept)) {
53+
type = props.accept;
5654
} else if (item.types.has('folder')) {
5755
type = 'folder';
5856
} else if (item.types.has('item')) {

packages/@react-aria/focus/src/FocusScope.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ function useRestoreFocus(scopeRef: RefObject<Element[]>, restoreFocus: boolean,
499499
document.removeEventListener('focusin', onFocus, false);
500500
scope.forEach(element => element.removeEventListener('focusin', onFocus, false));
501501
};
502+
// eslint-disable-next-line react-hooks/exhaustive-deps
502503
}, [scopeRef, contain]);
503504

504505
// useLayoutEffect instead of useEffect so the active element is saved synchronously instead of asynchronously.
@@ -578,6 +579,7 @@ function useRestoreFocus(scopeRef: RefObject<Element[]>, restoreFocus: boolean,
578579
restoreFocus
579580
&& nodeToRestore
580581
&& (
582+
// eslint-disable-next-line react-hooks/exhaustive-deps
581583
isElementInScope(document.activeElement, scopeRef.current)
582584
|| (document.activeElement === document.body && shouldRestoreFocus(scopeRef))
583585
)

packages/@react-aria/focus/stories/FocusScope.stories.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ function NestedDialog({onClose, isPortaled, contain}: {onClose: VoidFunction, is
6161
<MaybePortal isPortaled={isPortaled}>
6262
<FocusScope contain={contain} restoreFocus autoFocus>
6363
{!showNew && (
64+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
6465
<div role="dialog" onKeyDown={onKeyDown}>
6566
<input />
6667
<input />
@@ -76,6 +77,7 @@ function NestedDialog({onClose, isPortaled, contain}: {onClose: VoidFunction, is
7677
</div>
7778
)}
7879
{showNew && (
80+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
7981
<div role="dialog" onKeyDown={onKeyDown}>
8082
<input />
8183
<input autoFocus />

packages/@react-aria/interactions/src/useFocusVisible.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,5 +233,6 @@ export function useFocusVisibleListener(fn: FocusVisibleHandler, deps: ReadonlyA
233233
return () => {
234234
changeHandlers.delete(handler);
235235
};
236+
// eslint-disable-next-line react-hooks/exhaustive-deps
236237
}, deps);
237238
}

packages/@react-aria/interactions/src/useHover.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export function useHover(props: HoverProps): HoverResult {
197197
if (isDisabled) {
198198
triggerHoverEnd({currentTarget: state.target}, state.pointerType);
199199
}
200+
// eslint-disable-next-line react-hooks/exhaustive-deps
200201
}, [isDisabled]);
201202

202203
return {

packages/@react-aria/interactions/src/usePress.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ export function usePress(props: PressHookProps): PressResult {
655655
useEffect(() => {
656656
return () => {
657657
if (!allowTextSelectionOnPress) {
658+
// eslint-disable-next-line react-hooks/exhaustive-deps
658659
restoreTextSelection(ref.current.target);
659660
}
660661
};

packages/@react-aria/overlays/src/useOverlayPosition.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ export function useOverlayPosition(props: AriaPositionProps): PositionAria {
129129
maxHeight
130130
})
131131
);
132+
// eslint-disable-next-line react-hooks/exhaustive-deps
132133
}, deps);
133134

134135
// Update position when anything changes
136+
// eslint-disable-next-line react-hooks/exhaustive-deps
135137
useLayoutEffect(updatePosition, deps);
136138

137139
// Update position on window resize

packages/@react-aria/selection/src/useSelectableItem.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export function useSelectableItem(options: SelectableItemOptions): SelectableIte
144144
focusSafely(ref.current);
145145
}
146146
}
147+
// eslint-disable-next-line react-hooks/exhaustive-deps
147148
}, [ref, key, manager.focusedKey, manager.childFocusStrategy, manager.isFocused, shouldUseVirtualFocus]);
148149

149150
// Set tabIndex to 0 if the element is focused, or -1 otherwise so that only the last focused

packages/@react-aria/spinbutton/src/useSpinButton.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ export function useSpinButton(
150150
initialStepDelay
151151
);
152152
},
153+
// eslint-disable-next-line react-hooks/exhaustive-deps
153154
[onIncrement, maxValue, value]
154155
);
155156

@@ -167,6 +168,7 @@ export function useSpinButton(
167168
initialStepDelay
168169
);
169170
},
171+
// eslint-disable-next-line react-hooks/exhaustive-deps
170172
[onDecrement, minValue, value]
171173
);
172174

packages/@react-aria/ssr/src/SSRProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export function useSSRSafeId(defaultId?: string): string {
7979
console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');
8080
}
8181

82+
// eslint-disable-next-line react-hooks/exhaustive-deps
8283
return useMemo(() => defaultId || `react-aria${ctx.prefix}-${++ctx.current}`, [defaultId]);
8384
}
8485

packages/@react-aria/table/src/useTable.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export function useTable<T>(props: AriaTableProps<T>, state: TableState<T>, ref:
106106
let sortDescription = useMemo(() => {
107107
let columnName = state.collection.columns.find(c => c.key === column)?.textValue;
108108
return sortDirection && column ? stringFormatter.format(`${sortDirection}Sort`, {columnName}) : undefined;
109+
// eslint-disable-next-line react-hooks/exhaustive-deps
109110
}, [sortDirection, column, state.collection.columns]);
110111

111112
let descriptionProps = useDescription(sortDescription);

packages/@react-aria/virtualizer/src/ScrollView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ function ScrollView(props: ScrollViewProps, ref: RefObject<HTMLDivElement>) {
120120
return () => {
121121
clearTimeout(state.scrollTimeout);
122122
};
123+
// eslint-disable-next-line react-hooks/exhaustive-deps
123124
}, []);
124125

125126
let updateSize = useCallback(() => {

packages/@react-aria/visually-hidden/src/VisuallyHidden.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export function useVisuallyHidden(props: VisuallyHiddenProps = {}): VisuallyHidd
7171
} else {
7272
return styles;
7373
}
74+
// eslint-disable-next-line react-hooks/exhaustive-deps
7475
}, [isFocused]);
7576

7677
return {

packages/@react-spectrum/breadcrumbs/src/Breadcrumbs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ function Breadcrumbs<T>(props: SpectrumBreadcrumbsProps<T>, ref: DOMRef) {
131131

132132
useResizeObserver({ref: domRef, onResize: updateOverflow});
133133

134+
// eslint-disable-next-line react-hooks/exhaustive-deps
134135
useLayoutEffect(updateOverflow, [children]);
135136

136137
let contents = childArray;

packages/@react-spectrum/buttongroup/src/ButtonGroup.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function ButtonGroup(props: SpectrumButtonGroupProps, ref: DOMRef<HTMLDivElement
6464
yield computeHasOverflow();
6565
});
6666
}
67+
// eslint-disable-next-line react-hooks/exhaustive-deps
6768
}, [domRef, orientation, scale, setHasOverflow, children]);
6869

6970
// There are two main reasons we need to remeasure:
@@ -78,6 +79,7 @@ function ButtonGroup(props: SpectrumButtonGroupProps, ref: DOMRef<HTMLDivElement
7879
if (domRef.current) {
7980
parent.current = domRef.current.parentElement as HTMLElement;
8081
}
82+
// eslint-disable-next-line react-hooks/exhaustive-deps
8183
}, [domRef.current]);
8284
useResizeObserver({ref: parent, onResize: checkForOverflow});
8385

packages/@react-spectrum/buttongroup/test/ButtonGroup.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ function ButtonGroupWithRefs(props) {
164164
button2: button2.current.UNSAFE_getDOMNode(),
165165
button3: button3.current.UNSAFE_getDOMNode()
166166
});
167+
// eslint-disable-next-line react-hooks/exhaustive-deps
167168
}, []);
168169
return (
169170
<Provider theme={theme}>

packages/@react-spectrum/card/src/CardBase.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function CardBase<T extends object>(props: CardBaseProps<T>, ref: DOMRef<HTMLDiv
9393
heading: {UNSAFE_className: classNames(styles, 'spectrum-Card-heading'), ...titleProps},
9494
content: {UNSAFE_className: classNames(styles, 'spectrum-Card-content'), ...contentProps},
9595
detail: {UNSAFE_className: classNames(styles, 'spectrum-Card-detail')}
96+
// eslint-disable-next-line react-hooks/exhaustive-deps
9697
}), [titleProps, contentProps, height, isQuiet, orientation]);
9798

9899
useLayoutEffect(() => {

packages/@react-spectrum/card/src/GalleryLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export class GalleryLayout<T> extends BaseLayout<T> {
109109
if (widths[item[0]][1] > this.minItemSize.width) {
110110
// subtract the delta from the width, if it's still greater than the min width
111111
// then we have finished, subtract the delta permanently from that width
112+
// eslint-disable-next-line max-depth
112113
if (widths[item[0]][1] - delta > this.minItemSize.width) {
113114
widths[item[0]][1] -= delta;
114115
delta = 0;

packages/@react-spectrum/combobox/stories/ComboBox.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ let customFilterItems = [
740740
let CustomFilterComboBox = (props) => {
741741
let {startsWith} = useFilter({sensitivity: 'base'});
742742
let [filterValue, setFilterValue] = React.useState('');
743+
// eslint-disable-next-line react-hooks/exhaustive-deps
743744
let filteredItems = React.useMemo(() => customFilterItems.filter(item => startsWith(item.name, filterValue)), [props.items, filterValue, startsWith]);
744745

745746
return (

packages/@react-spectrum/dialog/src/Dialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ function Dialog(props: SpectrumDialogProps, ref: DOMRef) {
7171
content: {UNSAFE_className: styles['spectrum-Dialog-content']},
7272
footer: {UNSAFE_className: styles['spectrum-Dialog-footer']},
7373
buttonGroup: {UNSAFE_className: classNames(styles, 'spectrum-Dialog-buttonGroup', {'spectrum-Dialog-buttonGroup--noFooter': !hasFooter}), align: 'end'}
74+
// eslint-disable-next-line react-hooks/exhaustive-deps
7475
}), [hasFooter, hasHeader, titleProps]);
7576

7677
// If rendered in a popover or tray there won't be a visible dismiss button,

packages/@react-spectrum/dialog/src/DialogTrigger.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function DialogTrigger(props: SpectrumDialogTriggerProps) {
6363
console.warn('A DialogTrigger unmounted while open. This is likely due to being placed within a trigger that unmounts or inside a conditional. Consider using a DialogContainer instead.');
6464
}
6565
};
66+
// eslint-disable-next-line react-hooks/exhaustive-deps
6667
}, []);
6768

6869
if (type === 'popover') {

packages/@react-spectrum/label/src/Field.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
165165
}
166166

167167
function useMergeRefs<T>(...refs: ForwardedRef<T>[]): (instance: (T | null)) => void {
168+
// eslint-disable-next-line react-hooks/exhaustive-deps
168169
return useCallback(
169170
mergeRefs(...refs) as (instance: (T | null)) => void,
170171
[...refs]

packages/@react-spectrum/list/src/ListView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ function ListView<T extends object>(props: SpectrumListViewProps<T>, ref: DOMRef
194194
// wait for layout to get accurate measurements
195195
let [isVerticalScrollbarVisible, setVerticalScollbarVisible] = useState(false);
196196
let [isHorizontalScrollbarVisible, setHorizontalScollbarVisible] = useState(false);
197+
// eslint-disable-next-line react-hooks/exhaustive-deps
197198
useLayoutEffect(() => {
198199
if (domRef.current) {
199200
// 2 is the width of the border which is not part of the box size

packages/@react-spectrum/list/stories/ListView.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {action} from '@storybook/addon-actions';
2-
import {ActionBar, ActionBarContainer} from '../../actionbar';
2+
import {ActionBar, ActionBarContainer} from '@react-spectrum/actionbar';
33
import {ActionButton} from '@react-spectrum/button';
44
import {ActionGroup} from '@react-spectrum/actiongroup';
55
import {ActionMenu} from '@react-spectrum/menu';

packages/@react-spectrum/menu/stories/ActionMenu.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import {action} from '@storybook/addon-actions';
1414
import {ActionMenu} from '..';
1515
import {Alignment} from '@react-types/shared';
1616
import {Checkbox} from '@react-spectrum/checkbox';
17-
import {Flex} from '../../layout';
17+
import {Flex} from '@react-spectrum/layout';
1818
import {Item} from '../';
1919
import {Meta, Story} from '@storybook/react';
20-
import {Picker} from '../../picker';
20+
import {Picker} from '@react-spectrum/picker';
2121
import React, {useState} from 'react';
2222
import {SpectrumActionMenuProps} from '@react-types/menu';
23-
import {Tooltip, TooltipTrigger} from '../../tooltip';
23+
import {Tooltip, TooltipTrigger} from '@react-spectrum/tooltip';
2424

2525
const meta: Meta<SpectrumActionMenuProps<object>> = {
2626
title: 'ActionMenu',

packages/@react-spectrum/searchwithin/chromatic/SearchWithin.chromatic.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
* governing permissions and limitations under the License.
1111
*/
1212

13-
import {generatePowerset} from '../../story-utils';
14-
import {Grid, repeat} from '../../layout';
13+
import {generatePowerset} from '@react-spectrum/story-utils';
14+
import {Grid, repeat} from '@react-spectrum/layout';
1515
import {Item, Picker} from '@react-spectrum/picker';
1616
import {Meta, Story} from '@storybook/react';
1717
import React from 'react';

packages/@react-spectrum/table/src/TableView.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ function TableVirtualizer({layout, collection, lastResizeInteractionModality, fo
440440
onLoadMore();
441441
}
442442
}
443+
// eslint-disable-next-line react-hooks/exhaustive-deps
443444
}, [onLoadMore, isLoading, state.setVisibleRect, state.virtualizer]);
444445

445446
useLayoutEffect(() => {
@@ -648,6 +649,7 @@ function ResizableTableColumnHeader(props) {
648649
}
649650
];
650651
return options;
652+
// eslint-disable-next-line react-hooks/exhaustive-deps
651653
}, [allowsSorting]);
652654

653655
useEffect(() => {
@@ -659,6 +661,7 @@ function ResizableTableColumnHeader(props) {
659661
onFocusedResizer();
660662
}, 0);
661663
}
664+
// eslint-disable-next-line react-hooks/exhaustive-deps
662665
}, [columnState.currentlyResizingColumn, column.key]);
663666

664667
let showResizer = !isEmpty && ((headerRowHovered && getInteractionModality() !== 'keyboard') || columnState.currentlyResizingColumn != null);

packages/@react-spectrum/tag/src/TagGroup.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
5151
childNodes
5252
};
5353
})
54+
// eslint-disable-next-line react-hooks/exhaustive-deps
5455
}), [listState.collection, isRemovable]);
5556
let state = useGridState({
5657
...props,

packages/@react-spectrum/utils/src/BreakpointProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export function useMatchedBreakpoints(breakpoints: Breakpoints): string[] {
7878
return () => {
7979
window.removeEventListener('resize', onResize);
8080
};
81+
// eslint-disable-next-line react-hooks/exhaustive-deps
8182
}, [supportsMatchMedia]);
8283

8384
// If in SSR, the media query should never match. Once the page hydrates,

packages/@react-spectrum/utils/src/Slots.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export function cssModuleToSlots(cssModule) {
3434
}
3535

3636
export function SlotProvider(props) {
37+
// eslint-disable-next-line react-hooks/exhaustive-deps
3738
let parentSlots = useContext(SlotContext) || {};
3839
let {slots = {}, children} = props;
3940

packages/@react-stately/list/src/useListState.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export function useListState<T extends object>(props: ListProps<T>): ListState<T
5656
if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey)) {
5757
selectionState.setFocusedKey(null);
5858
}
59+
// eslint-disable-next-line react-hooks/exhaustive-deps
5960
}, [collection, selectionState.focusedKey]);
6061

6162
return {

packages/@react-stately/table/src/TableCollection.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ function buildHeaderRows<T>(keyMap: Map<Key, GridNode<T>>, columnNodes: GridNode
4747

4848
// Adjust shifted indices
4949
for (let i = col.length; i < column.length; i++) {
50+
// eslint-disable-next-line max-depth
5051
if (column[i] && seen.has(column[i])) {
5152
seen.get(column[i]).index = i;
5253
}
@@ -90,6 +91,7 @@ function buildHeaderRows<T>(keyMap: Map<Key, GridNode<T>>, columnNodes: GridNode
9091
textValue: null
9192
};
9293

94+
// eslint-disable-next-line max-depth
9395
if (row.length > 0) {
9496
row[row.length - 1].nextKey = placeholder.key;
9597
placeholder.prevKey = row[row.length - 1].key;

packages/@react-stately/table/src/useTableColumnResizeState.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export function useTableColumnResizeState<T>(props: TableColumnResizeStateProps,
193193
}
194194

195195
// This function is regenerated whenever columnWidthsRef.current changes in order to get the new correct ref value.
196+
// eslint-disable-next-line react-hooks/exhaustive-deps
196197
let getColumnWidth = useCallback((key: Key): number => columnWidthsRef.current.get(key) ?? 0, [columnWidthsRef.current]);
197198

198199
let getColumnMinWidth = useCallback((key: Key) => {

packages/@react-stately/table/src/useTableState.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export function useTableState<T extends object>(props: TableStateProps<T>): Tabl
6161
showSelectionCheckboxes: props.showSelectionCheckboxes && selectionMode !== 'none',
6262
selectionMode,
6363
columns: []
64+
// eslint-disable-next-line react-hooks/exhaustive-deps
6465
}), [props.children, props.showSelectionCheckboxes, selectionMode]);
6566

6667
let collection = useCollection<T, TableCollection<T>>(

packages/@react-stately/tree/src/useTreeState.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export function useTreeState<T extends object>(props: TreeProps<T>): TreeState<T
5858
if (selectionState.focusedKey != null && !tree.getItem(selectionState.focusedKey)) {
5959
selectionState.setFocusedKey(null);
6060
}
61+
// eslint-disable-next-line react-hooks/exhaustive-deps
6162
}, [tree, selectionState.focusedKey]);
6263

6364
let onToggle = (key: Key) => {

packages/@react-stately/virtualizer/src/useVirtualizerState.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export function useVirtualizerState<T extends object, V, W>(opts: VirtualizerPro
7777
// eslint-disable-next-line arrow-body-style
7878
useEffect(() => {
7979
return () => virtualizer.willUnmount();
80+
// eslint-disable-next-line react-hooks/exhaustive-deps
8081
}, []);
8182

8283
return {

packages/dev/docs/src/PropTable.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ function groupProps(props) {
106106
for (let propName of GROUPS[group]) {
107107
if (propName instanceof RegExp) {
108108
for (let key in props) {
109+
// eslint-disable-next-line max-depth
109110
if (propName.test(key)) {
110111
groupProps[key] = props[key];
111112
delete props[key];

0 commit comments

Comments
 (0)