Skip to content

Commit 353eb8a

Browse files
committed
run biome ci
1 parent 349a508 commit 353eb8a

File tree

8 files changed

+271
-12
lines changed

8 files changed

+271
-12
lines changed

.vscode/settings.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"svg.preview.background": "dark-transparent",
3+
"terminal.integrated.cwd": "${workspaceFolder}",
4+
"[javascriptreact]": {
5+
"editor.defaultFormatter": "biomejs.biome"
6+
},
7+
"[typescriptreact]": {
8+
"editor.defaultFormatter": "biomejs.biome"
9+
},
10+
"[js]": {
11+
"editor.defaultFormatter": "biomejs.biome"
12+
},
13+
"[javascript]": {
14+
"editor.defaultFormatter": "biomejs.biome"
15+
},
16+
"[typescript]": {
17+
"editor.defaultFormatter": "biomejs.biome"
18+
},
19+
// "[json]": {
20+
// "editor.defaultFormatter": "biomejs.biome"
21+
// },
22+
// "[jsonc]": {
23+
// "editor.defaultFormatter": "biomejs.biome"
24+
// },
25+
"editor.defaultFormatter": "biomejs.biome",
26+
"editor.codeActionsOnSave": {
27+
"source.organizeImports.biome": "always"
28+
},
29+
"[ignore]": {
30+
"editor.defaultFormatter": "foxundermoon.shell-format"
31+
}
32+
}

docs/sidebars.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'
1+
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"
22

33
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
44

@@ -14,7 +14,7 @@ import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'
1414
*/
1515
const sidebars: SidebarsConfig = {
1616
// By default, Docusaurus generates a sidebar from the docs folder structure
17-
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
17+
tutorialSidebar: [{ type: "autogenerated", dirName: "." }],
1818

1919
// But you can create a sidebar manually
2020
/*

docs/zusdocusaurus.config.ts

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
import type * as Preset from "@docusaurus/preset-classic"
2+
import type { Config } from "@docusaurus/types"
3+
import { themes as prismThemes } from "prism-react-renderer"
4+
5+
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
6+
7+
const config: Config = {
8+
title: "Züs JS SDK",
9+
tagline: "Simplifying JavaScript integration with the Züs Network",
10+
favicon: "img/.dump/zus-favicon.ico",
11+
12+
// Set the production url of your site here
13+
url: "https://0chain.github.io/",
14+
// Set the /<baseUrl>/ pathname under which your site is served
15+
// For GitHub pages deployment, it is often '/<projectName>/'
16+
baseUrl: "/js-sdk/",
17+
18+
// GitHub pages deployment config.
19+
// If you aren't using GitHub pages, you don't need these.
20+
organizationName: "0chain", // Usually your GitHub org/user name.
21+
projectName: "js-sdk", // Usually your repo name.
22+
trailingSlash: false,
23+
24+
onBrokenLinks: "throw",
25+
onBrokenMarkdownLinks: "warn",
26+
27+
// Even if you don't use internationalization, you can use this field to set
28+
// useful metadata like html lang. For example, if your site is Chinese, you
29+
// may want to replace "en" with "zh-Hans".
30+
i18n: {
31+
defaultLocale: "en",
32+
locales: ["en"],
33+
},
34+
35+
plugins: ["docusaurus-plugin-sass"],
36+
presets: [
37+
[
38+
"classic",
39+
{
40+
docs: {
41+
sidebarPath: "./sidebars.ts",
42+
// Please change this to your repo.
43+
// Remove this to remove the "edit this page" links.
44+
editUrl: "https://github.com/0chain/js-sdk/tree/main/docs",
45+
},
46+
// blog: {
47+
// showReadingTime: true,
48+
// feedOptions: {
49+
// type: ['rss', 'atom'],
50+
// xslt: true,
51+
// },
52+
// // Please change this to your repo.
53+
// // Remove this to remove the "edit this page" links.
54+
// editUrl: 'https://github.com/0chain/js-sdk/tree/main/docs',
55+
// // Useful options to enforce blogging best practices
56+
// onInlineTags: 'warn',
57+
// onInlineAuthors: 'warn',
58+
// onUntruncatedBlogPosts: 'warn',
59+
// },
60+
blog: false,
61+
theme: {
62+
customCss: "./src/css/custom.css",
63+
},
64+
} satisfies Preset.Options,
65+
],
66+
],
67+
68+
themeConfig: {
69+
image: "img/.dump/zus-social-card.png",
70+
metadata: [
71+
{ name: "robots", content: "max-image-preview:large" },
72+
{
73+
name: "description",
74+
content:
75+
"The Züs JS SDK is a JavaScript client library that provides a convenient interface for interacting with the Züs Network.",
76+
},
77+
78+
// Google / Search Engine Tags
79+
{ itemprop: "name", content: "Züs JS SDK" },
80+
{
81+
itemprop: "description",
82+
content:
83+
"The Züs JS SDK is a JavaScript client library that provides a convenient interface for interacting with the Züs Network.",
84+
},
85+
{
86+
itemprop: "image",
87+
content: "https://0chain.github.io/js-sdk/img/social-card.png",
88+
},
89+
90+
// Open Graph / Facebook Meta Tags
91+
{ property: "og:url", content: "https://0chain.github.io/js-sdk/" },
92+
{ property: "og:type", content: "website" },
93+
{ property: "og:title", content: "Züs JS SDK" },
94+
{
95+
property: "og:description",
96+
content:
97+
"The Züs JS SDK is a JavaScript client library that provides a convenient interface for interacting with the Züs Network.",
98+
},
99+
{
100+
property: "og:image",
101+
content: "https://0chain.github.io/js-sdk/img/social-card.png",
102+
},
103+
104+
// Twitter Meta Tags
105+
{ name: "twitter:card", content: "summary_large_image" },
106+
{ name: "twitter:title", content: "Züs JS SDK" },
107+
{
108+
name: "twitter:description",
109+
content:
110+
"The Züs JS SDK is a JavaScript client library that provides a convenient interface for interacting with the Züs Network.",
111+
},
112+
{
113+
name: "twitter:image",
114+
content: "https://0chain.github.io/js-sdk/img/social-card.png",
115+
},
116+
{ name: "twitter:image:alt", content: "Züs JS SDK logo" },
117+
],
118+
navbar: {
119+
title: "Züs JS SDK",
120+
logo: {
121+
alt: "Züs Logo",
122+
src: "img/.dump/zus-logo.svg",
123+
},
124+
items: [
125+
{
126+
type: "docSidebar",
127+
sidebarId: "tutorialSidebar",
128+
position: "left",
129+
label: "Getting Started",
130+
},
131+
{ href: "https://medium.com/0chain", label: "Blog", position: "left" },
132+
{
133+
href: "https://github.com/0chain/js-sdk",
134+
label: "GitHub",
135+
position: "right",
136+
},
137+
],
138+
},
139+
footer: {
140+
style: "dark",
141+
links: [
142+
{
143+
title: "Docs",
144+
items: [
145+
{
146+
label: "JS SDK Docs",
147+
to: "/docs/getting-started/introduction",
148+
},
149+
{
150+
label: "Go SDK Docs",
151+
href: "https://docs-old.zus.network/guides/zus-gosdk",
152+
},
153+
{
154+
label: "HTTP API Reference",
155+
href: "https://docs.zus.network/zus-docs/http-apis",
156+
},
157+
{
158+
label: "Whitepapers",
159+
href: "https://zus.network/whitepapers/?v=1",
160+
},
161+
],
162+
},
163+
{
164+
title: "Community",
165+
items: [
166+
{
167+
label: "Discord",
168+
href: "https://discord.com/invite/h3BFjdtCp4",
169+
},
170+
{
171+
label: "X",
172+
href: "https://twitter.com/zus_network",
173+
},
174+
{
175+
label: "Facebook",
176+
href: "https://www.facebook.com/ZusNetwork",
177+
},
178+
{
179+
label: "Linkedin",
180+
href: "https://www.linkedin.com/company/zusnetwork/",
181+
},
182+
{
183+
label: "Telegram",
184+
href: "https://t.me/zus_network",
185+
},
186+
],
187+
},
188+
{
189+
title: "More",
190+
items: [
191+
{
192+
href: "https://zus.network/?v=1",
193+
label: "Züs Network",
194+
},
195+
{
196+
href: "https://zus.network/blog/",
197+
label: "Blog",
198+
},
199+
{
200+
href: "https://medium.com/0chain",
201+
label: "Medium",
202+
},
203+
{
204+
label: "GitHub",
205+
href: "https://github.com/0chain",
206+
},
207+
{
208+
label: "YouTube",
209+
href: "https://www.youtube.com/@Zus_Network",
210+
},
211+
],
212+
},
213+
],
214+
copyright: `Copyright © ${new Date().getFullYear()} Züs. All Rights Reserved.`,
215+
},
216+
prism: {
217+
theme: prismThemes.github,
218+
darkTheme: prismThemes.dracula,
219+
},
220+
colorMode: {
221+
defaultMode: "dark",
222+
disableSwitch: false,
223+
respectPrefersColorScheme: true,
224+
},
225+
} satisfies Preset.ThemeConfig,
226+
}
227+
228+
export default config

package/src/ProbingDropzone.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { ProbingDropzoneOptions, ProbingDropzoneState } from "@/types"
2-
import { useProbingDropzone } from "@/useProbingDropzone"
31
import { forwardRef, useEffect, useImperativeHandle } from "react"
42
import type { DropzoneProps, DropzoneRef } from "react-dropzone"
3+
import type { ProbingDropzoneOptions, ProbingDropzoneState } from "@/types"
4+
import { useProbingDropzone } from "@/useProbingDropzone"
55

66
type ProbingDropzoneProps = Omit<DropzoneProps, "children"> & {
77
children: (props: ProbingDropzoneState) => React.ReactNode
@@ -18,7 +18,6 @@ export const ProbingDropzone: React.ForwardRefExoticComponent<
1818

1919
useImperativeHandle(ref, () => ({ open: probingDropzoneState.open }), [probingDropzoneState.open])
2020

21-
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
2221
useEffect(() => {
2322
if (probingDropzoneState.hierarchyDetails && onProbingDrop) onProbingDrop(probingDropzoneState)
2423
}, [probingDropzoneState])

package/src/export/react.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export { useProbingDropzone } from "../useProbingDropzone"
21
export { ProbingDropzone } from "../ProbingDropzone"
2+
export { useProbingDropzone } from "../useProbingDropzone"

package/src/export/vanilla.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
export { fsProber } from "../probers"
21
export {
2+
addFileProperties,
33
convertToFileList,
44
getFilesArrFromHierarchyFiles,
55
getHierarchyDetailsFromFiles,
6-
addFileProperties,
76
} from "../fileUtils"
7+
export { fsProber } from "../probers"
88
export * from "../types"

package/src/fileUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FileWithPath } from "react-dropzone"
2-
import { getFile } from "./proberWebApi"
32
import { getNameId } from "./probers"
3+
import { getFile } from "./proberWebApi"
44
import {
55
type FileNode,
66
type FileNodeWithoutHandle,

package/src/useProbingDropzone.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import { type FileWithPath, fromEvent } from "file-selector"
2+
import { useCallback, useMemo, useState } from "react"
3+
import { type DropEvent, type DropzoneOptions, useDropzone } from "react-dropzone"
14
import type {
25
HierarchyDetails,
36
HierarchyDetailsVariant,
47
ProbingDropzoneOptions,
58
ProbingDropzoneState,
69
} from "@/types"
7-
import { type FileWithPath, fromEvent } from "file-selector"
8-
import { useCallback, useMemo, useState } from "react"
9-
import { type DropEvent, type DropzoneOptions, useDropzone } from "react-dropzone"
1010
import {
1111
convertToFileList,
1212
filterFiles,

0 commit comments

Comments
 (0)