Skip to content

Commit 08a0aa8

Browse files
committed
fix eslint issues
1 parent 173f407 commit 08a0aa8

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

chartlets.js/packages/lib/src/components/Component.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export function Component(props: ComponentProps) {
1010
const { type: componentType } = props;
1111
const ActualComponent = registry.lookup(componentType);
1212
if (typeof ActualComponent === "function") {
13+
// eslint-disable-next-line react-hooks/static-components
1314
return <ActualComponent {...props} />;
1415
} else {
1516
// We no longer log, as the situation is quite common

chartlets.js/packages/lib/src/hooks.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe("useContributionsRecord", () => {
6161
describe("useThemeMode", () => {
6262
it("should initially return undefined", () => {
6363
const { result } = renderHook(() => useThemeMode());
64-
expect(result.current).toBeUndefined;
64+
expect(result.current).toBeUndefined();
6565
});
6666
});
6767

chartlets.js/packages/lib/src/plugins/vega/hooks/useResizeObserver.test.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ describe("useResizeObserver", () => {
1515

1616
const TestComponent = () => {
1717
const { containerCallbackRef } = useResizeObserver();
18-
callbackRef = containerCallbackRef;
18+
useEffect(() => {
19+
callbackRef = containerCallbackRef;
20+
}, [containerCallbackRef]);
1921
return <div ref={containerCallbackRef} />;
2022
};
2123

@@ -38,7 +40,9 @@ describe("useResizeObserver", () => {
3840

3941
const TestComponent = () => {
4042
const { containerCallbackRef } = useResizeObserver();
41-
callbackRef = containerCallbackRef;
43+
useEffect(() => {
44+
callbackRef = containerCallbackRef;
45+
}, [containerCallbackRef]);
4246
return null;
4347
};
4448

@@ -81,11 +85,9 @@ describe("useResizeObserver", () => {
8185

8286
const TestComponent = () => {
8387
const { containerCallbackRef, containerSizeKey } = useResizeObserver();
84-
8588
useEffect(() => {
8689
lastKey = containerSizeKey;
8790
}, [containerSizeKey]);
88-
8991
return <div ref={containerCallbackRef} />;
9092
};
9193

chartlets.js/packages/lib/src/types/model/channel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface Input extends Channel {
2323
noTrigger?: boolean;
2424
}
2525

26+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
2627
export interface Output extends Channel {}
2728

2829
export function isComponentChannel(channel: Channel): boolean {

0 commit comments

Comments
 (0)