Skip to content

Commit b9e747a

Browse files
committed
Remove unnecessary semicolons
1 parent 67b0255 commit b9e747a

File tree

5 files changed

+46
-38
lines changed

5 files changed

+46
-38
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,29 @@
6262
},
6363
"devDependencies": {
6464
"@eslint/js": "9.39.1",
65-
"@storybook/react-vite": "10.0.5",
65+
"@storybook/react-vite": "10.0.6",
6666
"@testing-library/react": "16.3.0",
6767
"@types/node": "24.10.0",
6868
"@types/react": "19.2.2",
6969
"@types/react-dom": "19.2.2",
7070
"@vitejs/plugin-react": "5.1.0",
71-
"@vitest/coverage-v8": "4.0.7",
71+
"@vitest/coverage-v8": "4.0.8",
7272
"eslint": "9.39.1",
7373
"eslint-plugin-react": "7.37.5",
7474
"eslint-plugin-react-hooks": "7.0.1",
7575
"eslint-plugin-react-refresh": "0.4.24",
76-
"eslint-plugin-storybook": "10.0.5",
76+
"eslint-plugin-storybook": "10.0.6",
7777
"globals": "16.5.0",
7878
"jsdom": "27.1.0",
7979
"nodemon": "3.1.10",
8080
"npm-run-all": "4.1.5",
8181
"react": "19.2.0",
8282
"react-dom": "19.2.0",
83-
"storybook": "10.0.5",
83+
"storybook": "10.0.6",
8484
"typescript": "5.9.3",
8585
"typescript-eslint": "8.46.3",
86-
"vite": "7.2.1",
87-
"vitest": "4.0.7"
86+
"vite": "7.2.2",
87+
"vitest": "4.0.8"
8888
},
8989
"peerDependencies": {
9090
"react": "^18.3.1 || ^19",

src/components/Dropdown/Dropdown.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const meta: Meta<typeof Dropdown> = {
55
component: Dropdown,
66
}
77
export default meta
8-
type Story = StoryObj<typeof Dropdown>;
8+
type Story = StoryObj<typeof Dropdown>
99
export const Default: Story = {
1010
args: {
1111
label: 'Menu',

src/components/Json/Json.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const meta: Meta<typeof Json> = {
66
component: Json,
77
}
88
export default meta
9-
type Story = StoryObj<typeof Json>;
9+
type Story = StoryObj<typeof Json>
1010

1111
function render(args: ComponentProps<typeof Json>) {
1212
return (
@@ -125,7 +125,7 @@ export const MessagesList: Story = {
125125
},
126126
{
127127
role: 'user',
128-
content: 'Sure, here it is: function calculate(a, b) { return a + b * c; }',
128+
content: 'Sure, here it is: function calculate(a, b) { return a + b * c }',
129129
},
130130
{
131131
role: 'assistant',

src/lib/sources/httpSource.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
import { DirSource, FileMetadata, FileSource, SourcePart } from './types.js'
1+
import type { DirSource, FileMetadata, FileSource, SourcePart } from './types.js'
22
import { getFileName } from './utils.js'
33

4-
async function s3list(bucket: string, prefix: string) {
4+
interface S3ListItem {
5+
key?: string
6+
lastModified?: string
7+
size?: number
8+
eTag?: string
9+
isCommonPrefix?: boolean
10+
}
11+
12+
async function s3list(bucket: string, prefix: string): Promise<S3ListItem[]> {
513
const url = `https://${bucket}.s3.amazonaws.com/?list-type=2&prefix=${prefix}&delimiter=/`
614
const result = await fetch(url)
715
if (!result.ok) {
816
throw new Error(`${result.status} ${result.statusText}`)
917
}
1018
const text = await result.text()
11-
const results = []
19+
const results: S3ListItem[] = []
1220

1321
// Parse regular objects (files and explicit directories)
1422
const contentsRegex = /<Contents>(.*?)<\/Contents>/gs

src/lib/sources/huggingFaceSource.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ interface FileUrl extends BaseUrl {
2323
resolveUrl: string
2424
}
2525

26-
type HFUrl = DirectoryUrl | FileUrl;
26+
type HFUrl = DirectoryUrl | FileUrl
2727

2828
interface RefResponse {
29-
name: string;
30-
ref: string;
31-
targetCommit: string;
29+
name: string
30+
ref: string
31+
targetCommit: string
3232
}
3333

3434
const refTypes = [
@@ -37,11 +37,11 @@ const refTypes = [
3737
'converts',
3838
'pullRequests',
3939
] as const
40-
type RefType = (typeof refTypes)[number];
41-
type RefsResponse = Partial<Record<RefType, RefResponse[]>>;
40+
type RefType = (typeof refTypes)[number]
41+
type RefsResponse = Partial<Record<RefType, RefResponse[]>>
4242

4343
interface RefMetadata extends RefResponse {
44-
refType: RefType; // TODO(SL): use it to style the refs differently?
44+
refType: RefType // TODO(SL): use it to style the refs differently?
4545
}
4646

4747
const baseUrl = 'https://huggingface.co'
@@ -291,13 +291,13 @@ async function fetchRefsList(
291291
*/
292292

293293
interface ListFileEntry {
294-
type: 'file' | 'directory' | 'unknown';
295-
size: number;
296-
path: string;
294+
type: 'file' | 'directory' | 'unknown'
295+
size: number
296+
path: string
297297
lastCommit?: {
298-
date: string;
299-
id: string;
300-
};
298+
date: string
299+
id: string
300+
}
301301
}
302302

303303
const HUB_URL = 'https://huggingface.co'
@@ -308,19 +308,19 @@ const HUB_URL = 'https://huggingface.co'
308308
*/
309309
async function* listFiles(
310310
params: {
311-
repoFullName: string;
312-
/**
313-
* Eg 'data' for listing all files in the 'data' folder. Leave it empty to list all
314-
* files in the repo.
315-
*/
316-
path?: string;
317-
revision?: string;
318-
/**
319-
* Custom fetch function to use instead of the default one, for example to use a proxy or edit headers.
320-
*/
321-
fetch?: typeof fetch;
322-
accessToken?: string;
323-
}
311+
repoFullName: string
312+
/**
313+
* Eg 'data' for listing all files in the 'data' folder. Leave it empty to list all
314+
* files in the repo.
315+
*/
316+
path?: string
317+
revision?: string
318+
/**
319+
* Custom fetch function to use instead of the default one, for example to use a proxy or edit headers.
320+
*/
321+
fetch?: typeof fetch
322+
accessToken?: string
323+
}
324324
): AsyncGenerator<ListFileEntry> {
325325
let url: string | undefined = `${HUB_URL}/api/${params.repoFullName}/tree/${
326326
params.revision ?? 'main'

0 commit comments

Comments
 (0)