Skip to content

Commit 51a5f71

Browse files
committed
fix lint
1 parent 656c658 commit 51a5f71

File tree

8 files changed

+11
-12
lines changed

8 files changed

+11
-12
lines changed

src/List.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useRef, useState } from 'react';
33
import classNames from 'classnames';
44
import Filler from './Filler';
55
import ScrollBar from './ScrollBar';
6-
import { RenderFunc, SharedConfig, GetKey } from './interface';
6+
import type { RenderFunc, SharedConfig, GetKey } from './interface';
77
import useChildren from './hooks/useChildren';
88
import useHeights from './hooks/useHeights';
99
import useScrollTo from './hooks/useScrollTo';

src/hooks/useChildren.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { SharedConfig, RenderFunc } from '../interface';
2+
import type { SharedConfig, RenderFunc } from '../interface';
33
import { Item } from '../Item';
44

55
export default function useChildren<T>(

src/hooks/useDiffItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { findListDiffIndex } from '../utils/algorithmUtil';
3-
import { GetKey } from '../interface';
3+
import type { GetKey } from '../interface';
44

55
export default function useDiffItem<T>(
66
data: T[],

src/hooks/useHeights.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import * as React from 'react';
22
import { useRef } from 'react';
33
import findDOMNode from 'rc-util/lib/Dom/findDOMNode';
4-
import { GetKey } from '../interface';
4+
import type { GetKey } from '../interface';
55
import CacheMap from '../utils/CacheMap';
66

7-
type RefFunc = (instance: HTMLElement) => void;
8-
97
export default function useHeights<T>(
108
getKey: GetKey<T>,
119
onItemAdd?: (item: T) => void,

src/hooks/useScrollTo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable no-param-reassign */
22
import * as React from 'react';
33
import raf from 'rc-util/lib/raf';
4-
import { ScrollTo } from '../List';
5-
import { GetKey } from '../interface';
6-
import CacheMap from '../utils/CacheMap';
4+
import type { ScrollTo } from '../List';
5+
import type { GetKey } from '../interface';
6+
import type CacheMap from '../utils/CacheMap';
77

88
export default function useScrollTo<T>(
99
containerRef: React.RefObject<HTMLDivElement>,

src/mock.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
2-
import { RawList, ListProps, ListRef } from './List';
2+
import type { ListProps, ListRef } from './List';
3+
import { RawList } from './List';
34

45
const List = React.forwardRef((props: ListProps<any>, ref: React.Ref<ListRef>) =>
56
RawList({ ...props, virtual: false }, ref),

src/utils/CacheMap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import type React from 'react';
22

33
// Firefox has low performance of map.
44
class CacheMap {

src/utils/algorithmUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
/**
33
* Get index with specific start index one by one. e.g.
44
* min: 3, max: 9, start: 6

0 commit comments

Comments
 (0)