Skip to content

Commit 5d5a84f

Browse files
author
Hector Arce De Las Heras
committed
Modify node version and fix eslint prettier errors
1 parent d10eb76 commit 5d5a84f

File tree

10 files changed

+58
-25
lines changed

10 files changed

+58
-25
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"module": "./dist/esm/index.js",
2121
"types": "./dist/esm/index.d.ts",
2222
"engines": {
23-
"node": ">=21.1.0",
23+
"node": ">=20.x",
2424
"npm": ">=7.0.0"
2525
},
2626
"files": [

src/components/backToTop/backToTopControlled.tsx

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

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

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

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

src/components/header/hook/useHeaderShadow.ts

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

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

2428
useEffect(() => {
2529
if (!headerRef.current) {

src/components/icon/iconStandAlone.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const IconComplexComponent = (
2727

2828
React.useEffect(() => {
2929
(async () => {
30+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
3031
const res = await fetch(icon);
3132
let response = '';
3233
if (res) {

src/components/listOptions/listOptionsStandAlone.tsx

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

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

4650
const id = props.id ?? _id;
4751
const isSelection = type === ListOptionsType.SELECTION;

src/components/option/option.tsx

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

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

2731
React.useEffect(() => {
2832
if (focus) {

src/components/pillSelector/pillSelectorControlled.tsx

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

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

4549
React.useEffect(() => {
4650
let resizeObserver: ResizeObserver;

src/components/pillSelector/pillSelectorStandAlone.tsx

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

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

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

3741
return (
3842
<PillSelectorWrapper

src/components/thirdPartyAnimation/thirdPartyAnimation.tsx

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

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

2933
React.useEffect(() => {
3034
if (element.current) {

src/components/tooltip/tooltipUnControlled.tsx

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

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

3640
const { showTooltip, hideTooltip, allowFocusOpenTooltip, open } = useTooltip<V>({
3741
labelRef,

0 commit comments

Comments
 (0)