Skip to content

Commit 02f3cca

Browse files
committed
style: format
1 parent 714a28d commit 02f3cca

8 files changed

Lines changed: 32 additions & 50 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,4 +1006,4 @@ const Node: FC<NodeProps> = ({
10061006

10071007
### 5. Migrate all your IDs to string
10081008

1009-
Using node IDs as keys should improve React rendering performance. However, it means that you won't be able to use `Symbol` as IDs anymore. You should move all your IDs to be strings instead of symbols.
1009+
Using node IDs as keys should improve React rendering performance. However, it means that you won't be able to use `Symbol` as IDs anymore. You should move all your IDs to be strings instead of symbols.

__stories__/BigData.story.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
21
import type { Meta, StoryObj } from '@storybook/react-vite';
32
import { type FC, useCallback, useRef } from 'react';
43
import { AutoSizer } from 'react-virtualized-auto-sizer';
5-
import type {
6-
TreeWalker,
7-
TreeWalkerValue,
8-
} from '../src/Tree.tsx';
4+
import type { TreeWalker, TreeWalkerValue } from '../src/Tree.tsx';
95
import type { NodeComponentProps } from '../src/Tree.tsx';
106
import {
117
type VariableSizeNodeData,

__stories__/FixedSizeTree.story.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import type { Meta, StoryObj } from '@storybook/react-vite';
32
import type { FC } from 'react';
43
import { AutoSizer } from 'react-virtualized-auto-sizer';
@@ -7,10 +6,7 @@ import {
76
type FixedSizeNodePublicState,
87
FixedSizeTree,
98
} from '../src/FixedSizeTree.tsx';
10-
import type {
11-
TreeWalker,
12-
TreeWalkerValue,
13-
} from '../src/Tree.tsx';
9+
import type { TreeWalker, TreeWalkerValue } from '../src/Tree.tsx';
1410
import type { NodeComponentProps } from '../src/Tree.tsx';
1511

1612
type TreeNode = Readonly<{

__stories__/MultipleRoots.story.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import type { Meta, StoryObj } from '@storybook/react-vite';
32
import type { FC } from 'react';
43
import { AutoSizer } from 'react-virtualized-auto-sizer';
@@ -7,10 +6,7 @@ import {
76
type FixedSizeNodePublicState,
87
FixedSizeTree,
98
} from '../src/FixedSizeTree.tsx';
10-
import type {
11-
TreeWalker,
12-
TreeWalkerValue,
13-
} from '../src/Tree.tsx';
9+
import type { TreeWalker, TreeWalkerValue } from '../src/Tree.tsx';
1410
import type { NodeComponentProps } from '../src/Tree.tsx';
1511

1612
type TreeNode = Readonly<{

__stories__/VariableSizeTree.story.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
21
import type { Meta, StoryObj } from '@storybook/react-vite';
32
import { type FC, useCallback, useEffect, useRef } from 'react';
43
import { AutoSizer } from 'react-virtualized-auto-sizer';
5-
import type {
6-
TreeWalker,
7-
TreeWalkerValue,
8-
} from '../src/Tree.tsx';
4+
import type { TreeWalker, TreeWalkerValue } from '../src/Tree.tsx';
95
import type { NodeComponentProps } from '../src/Tree.tsx';
106
import {
117
type VariableSizeNodeData,

package.json

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22
"name": "react-vtree",
33
"version": "3.0.0",
44
"description": "React component for efficiently rendering large tree structures",
5+
"keywords": [
6+
"infinite",
7+
"react",
8+
"react-component",
9+
"react-virtualized",
10+
"reactjs",
11+
"tree",
12+
"virtual",
13+
"virtualized"
14+
],
15+
"homepage": "https://github.com/Lodin/react-vtree#readme",
16+
"bugs": {
17+
"url": "https://github.com/Lodin/react-vtree/issues"
18+
},
19+
"license": "MIT",
20+
"author": "Vlad Rindevich <rindevich.vs@gmail.com> (https://github.com/Lodin)",
21+
"repository": {
22+
"type": "git",
23+
"url": "git+https://github.com/Lodin/react-vtree.git"
24+
},
25+
"files": [
26+
"dist"
27+
],
528
"type": "module",
629
"types": "./dist/index.d.ts",
730
"exports": {
@@ -11,23 +34,21 @@
1134
},
1235
"./package.json": "./package.json"
1336
},
14-
"files": [
15-
"dist"
16-
],
1737
"scripts": {
1838
"build": "tsdown",
1939
"build:watch": "tsdown --watch",
2040
"check": "concurrently --kill-others-on-fail --group --names lint,oxlint,typecheck,test,build npm:lint npm:oxlint npm:typecheck npm:test npm:build",
2141
"clean": "rimraf coverage dist storybook-static",
2242
"format": "oxfmt --write .",
2343
"format:check": "oxfmt --check .",
24-
"full-prepare": "npm run clean && concurrently --kill-others-on-fail --group --names format,lint,oxlint,typecheck,test,build npm:format:check npm:lint npm:oxlint npm:typecheck npm:test npm:build",
44+
"full-prepare": "npm run clean && concurrently --group --names format,lint,typecheck,test,build npm:format:check npm:lint npm:typecheck npm:test npm:build",
2545
"lint": "concurrently npm:eslint npm:oxlint",
2646
"lint:fix": "npm run oxlint:fix && npm run eslint:fix",
2747
"eslint": "eslint . --flag unstable_native_nodejs_ts_config",
2848
"eslint:fix": "npm run eslint -- --fix",
2949
"oxlint": "oxlint -c .oxlintrc.json",
3050
"oxlint:fix": "npm run oxlint -- --fix",
51+
"prepublishOnly": "npm run full-prepare",
3152
"release": "semantic-release -c release.config.ts",
3253
"storybook": "storybook dev -p 6006",
3354
"storybook:build": "storybook build",
@@ -36,26 +57,9 @@
3657
"test:watch": "vitest",
3758
"typecheck": "tsgo -p tsconfig.json --noEmit"
3859
},
39-
"repository": {
40-
"type": "git",
41-
"url": "git+https://github.com/Lodin/react-vtree.git"
42-
},
43-
"keywords": [
44-
"infinite",
45-
"react",
46-
"reactjs",
47-
"react-component",
48-
"react-virtualized",
49-
"tree",
50-
"virtual",
51-
"virtualized"
52-
],
53-
"author": "Vlad Rindevich <rindevich.vs@gmail.com> (https://github.com/Lodin)",
54-
"license": "MIT",
55-
"bugs": {
56-
"url": "https://github.com/Lodin/react-vtree/issues"
60+
"dependencies": {
61+
"react-merge-refs": "3.0.2"
5762
},
58-
"homepage": "https://github.com/Lodin/react-vtree#readme",
5963
"devDependencies": {
6064
"@semantic-release/changelog": "6.0.3",
6165
"@semantic-release/git": "10.0.1",
@@ -99,9 +103,6 @@
99103
"react-dom": ">=18",
100104
"react-window": ">= 1.8.5"
101105
},
102-
"dependencies": {
103-
"react-merge-refs": "3.0.2"
104-
},
105106
"overrides": {
106107
"vite": "$vite"
107108
}

src/FixedSizeTree.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ export class FixedSizeTree<
8686
{...rest}
8787
itemCount={order!.length}
8888
itemData={this.getItemData()}
89-
9089
itemKey={getIdByIndex}
91-
9290
ref={attachRefs}
9391
>
9492
{rowComponent!}

src/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export type DefaultTreeCreatorOptions = TreeCreatorOptions<
3737
DefaultTreeState
3838
>;
3939

40-
4140
export const noop = (): void => {};
4241

4342
export const identity = <T>(value: T): T => value;

0 commit comments

Comments
 (0)