Skip to content

Commit 3e8af15

Browse files
committed
fix: lint issues.
1 parent 110f072 commit 3e8af15

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/useMeasure.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ export type UseMeasureRect = Pick<
77
'x' | 'y' | 'top' | 'left' | 'right' | 'bottom' | 'height' | 'width'
88
>;
99
export type UseMeasureRef<E extends Element = Element> = (element: E) => void;
10-
export type UseMeasureResult<E extends Element = Element> = [
11-
UseMeasureRef<E>,
12-
UseMeasureRect
13-
];
10+
export type UseMeasureResult<E extends Element = Element> = [UseMeasureRef<E>, UseMeasureRect];
1411

1512
const defaultState: UseMeasureRect = {
1613
x: 0,

tests/useUnmountPromise.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ describe('useUnmountPromise', () => {
3535
]);
3636
expect(res).toBe('UNMOUNTED');
3737
});
38-
38+
3939
it('should resolve promise when component is updated', async () => {
4040
const hook = renderHook(() => useUnmountPromise());
4141

4242
const mounted = hook.result.current;
43-
const pRes = mounted(new Promise(r => setTimeout(() => r(25), 10)));
44-
43+
const pRes = mounted(new Promise((r) => setTimeout(() => r(25), 10)));
44+
4545
hook.rerender();
46-
46+
4747
const res = await pRes;
4848

4949
expect(res).toBe(25);

tests/useWindowScroll.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ describe('useWindowScroll', () => {
102102
const initialScroll = { x: 1, y: 2 };
103103
const afterRenderScroll = { x: 2, y: 3 };
104104
const result = {
105-
x: 0, y: 0
105+
x: 0,
106+
y: 0,
106107
};
107108

108109
setWindowScroll(initialScroll.x, initialScroll.y);

0 commit comments

Comments
 (0)