Skip to content

Commit 130bd95

Browse files
author
Hector Arce De Las Heras
committed
Fix eslint prettier errors
1 parent 2f4aec5 commit 130bd95

File tree

8 files changed

+24
-56
lines changed

8 files changed

+24
-56
lines changed

src/components/backToTop/backToTopControlled.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@ const BackToTopControlledComponent = React.forwardRef(
2525

2626
const innerRef = React.useRef<HTMLButtonElement | null>(null);
2727

28-
React.useImperativeHandle(
29-
ref,
30-
() => {
31-
return innerRef?.current as HTMLButtonElement;
32-
},
33-
[]
34-
);
28+
React.useImperativeHandle(ref, () => {
29+
return innerRef?.current as HTMLButtonElement;
30+
}, []);
3531

3632
const { state, setRef } = useManageState({
3733
states: Object.values(BackToTopStateType) as States,

src/components/header/hook/useHeaderShadow.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ type HeaderShadowReturnValues = {
1717
export const useHeaderShadow = ({ ref, shadow }: HeaderShadowProps): HeaderShadowReturnValues => {
1818
const headerRef = useRef<HTMLElement | null>(null);
1919

20-
useImperativeHandle(
21-
ref,
22-
() => {
23-
return headerRef?.current as HTMLDivElement;
24-
},
25-
[]
26-
);
20+
useImperativeHandle(ref, () => {
21+
return headerRef?.current as HTMLDivElement;
22+
}, []);
2723

2824
useEffect(() => {
2925
if (!headerRef.current) {

src/components/listOptions/listOptionsStandAlone.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,9 @@ export const ListOptionsStandAlone = React.forwardRef(
3939
const [focus, setFocus, listEl] = useRoveFocus(props.roveFocus ?? roveFocusProps);
4040
const _id = useId();
4141

42-
React.useImperativeHandle(
43-
ref,
44-
() => {
45-
return listEl.current as HTMLDivElement;
46-
},
47-
[]
48-
);
42+
React.useImperativeHandle(ref, () => {
43+
return listEl.current as HTMLDivElement;
44+
}, []);
4945

5046
const id = props.id ?? _id;
5147
const isSelection = type === ListOptionsType.SELECTION;

src/components/option/option.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@ export const OptionComponent = React.forwardRef(
2020
const [hover, setHover] = React.useState(false);
2121
const [focused, setFocused] = React.useState(false);
2222

23-
React.useImperativeHandle(
24-
ref,
25-
() => {
26-
return innerRef.current as HTMLElement;
27-
},
28-
[]
29-
);
23+
React.useImperativeHandle(ref, () => {
24+
return innerRef.current as HTMLElement;
25+
}, []);
3026

3127
React.useEffect(() => {
3228
if (focus) {

src/components/pillSelector/pillSelectorControlled.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,9 @@ const PillSelectorControlledComponent = React.forwardRef(
3838
}
3939
};
4040

41-
React.useImperativeHandle(
42-
ref,
43-
() => {
44-
return measuredRef.current as HTMLDivElement;
45-
},
46-
[]
47-
);
41+
React.useImperativeHandle(ref, () => {
42+
return measuredRef.current as HTMLDivElement;
43+
}, []);
4844

4945
React.useEffect(() => {
5046
let resizeObserver: ResizeObserver;

src/components/pillSelector/pillSelectorStandAlone.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,9 @@ const PillSelectorStandAloneComponent = (
3030

3131
const isPillSelected = props.pillSelected?.length !== 0;
3232

33-
React.useImperativeHandle(
34-
ref,
35-
() => {
36-
return listEl.current as HTMLDivElement;
37-
},
38-
[]
39-
);
33+
React.useImperativeHandle(ref, () => {
34+
return listEl.current as HTMLDivElement;
35+
}, []);
4036

4137
return (
4238
<PillSelectorWrapper

src/components/thirdPartyAnimation/thirdPartyAnimation.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,9 @@ const ThirdPartyAnimationComponent = <V extends string | unknown>(
2222
const { thirdPartyAnimationData } = variantTheme;
2323
const element = React.useRef<HTMLDivElement>(null);
2424

25-
React.useImperativeHandle(
26-
ref,
27-
() => {
28-
return element.current as HTMLDivElement;
29-
},
30-
[]
31-
);
25+
React.useImperativeHandle(ref, () => {
26+
return element.current as HTMLDivElement;
27+
}, []);
3228

3329
React.useEffect(() => {
3430
if (element.current) {

src/components/tooltip/tooltipUnControlled.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,9 @@ const TooltipUnControlledComponent = React.forwardRef(
2929
styleTooltipAsModal: styles.tooltipAsModal,
3030
});
3131

32-
React.useImperativeHandle(
33-
ref,
34-
() => {
35-
return labelRef.current as HTMLDivElement;
36-
},
37-
[]
38-
);
32+
React.useImperativeHandle(ref, () => {
33+
return labelRef.current as HTMLDivElement;
34+
}, []);
3935

4036
const { showTooltip, hideTooltip, allowFocusOpenTooltip, open } = useTooltip<V>({
4137
labelRef,

0 commit comments

Comments
 (0)