From dde27afd840ab3e122c6101b5e622bcbe46171f3 Mon Sep 17 00:00:00 2001 From: Prakash Date: Thu, 26 Mar 2026 17:33:33 +0530 Subject: [PATCH 1/8] upgrade biome and add new rules --- biome.json | 7 +- package.json | 2 +- .../@uppy/aws-s3/src/MultipartUploader.ts | 1 + .../src/server/provider/credentials.js | 1 - .../companion/src/server/provider/index.js | 1 - packages/@uppy/core/src/Uppy.ts | 3 + .../dashboard/src/components/AddFiles.tsx | 22 +----- .../src/components/AddFilesPanel.tsx | 1 - .../dashboard/src/components/EditorPanel.tsx | 1 - .../src/components/FileCard/index.tsx | 1 - .../src/components/PickerPanelContent.tsx | 1 - .../src/components/StatusBar/Components.tsx | 1 - packages/@uppy/status-bar/src/Components.tsx | 1 - .../@uppy/transloadit/src/AssemblyWatcher.ts | 2 - yarn.lock | 76 +++++++++---------- 15 files changed, 49 insertions(+), 72 deletions(-) diff --git a/biome.json b/biome.json index 5ccb0bae6f..c92efb6812 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.0.5/schema.json", + "$schema": "https://biomejs.dev/schemas/2.1.2/schema.json", "vcs": { "enabled": true, "clientKind": "git", @@ -48,6 +48,8 @@ "useExhaustiveDependencies": "error", "useHookAtTopLevel": "error", "noUnusedFunctionParameters": "off", + "noUnusedImports": "error", + "noUnusedPrivateClassMembers": "error", "noUnusedVariables": { "level": "error", "options": { @@ -59,7 +61,8 @@ "noNonNullAssertion": "off" }, "a11y": { - "noSvgWithoutTitle": "off" + "noSvgWithoutTitle": "off", + "useSemanticElements": "off" }, "nursery": { "noNestedComponentDefinitions": "error", diff --git a/package.json b/package.json index fbc1d08dca..305a333d4f 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "release": "changeset publish" }, "devDependencies": { - "@biomejs/biome": "2.0.5", + "@biomejs/biome": "2.1.2", "@changesets/changelog-github": "^0.5.1", "@changesets/cli": "patch:@changesets/cli@npm%3A2.29.5#~/.yarn/patches/@changesets-cli-npm-2.29.5-68d8030bf3.patch", "npm-run-all": "^4.1.5", diff --git a/packages/@uppy/aws-s3/src/MultipartUploader.ts b/packages/@uppy/aws-s3/src/MultipartUploader.ts index c2884f62b9..1e590e0c87 100644 --- a/packages/@uppy/aws-s3/src/MultipartUploader.ts +++ b/packages/@uppy/aws-s3/src/MultipartUploader.ts @@ -256,6 +256,7 @@ class MultipartUploader { else this.pause() } + // biome-ignore lint/correctness/noUnusedPrivateClassMembers: accessed via Symbol in tests private [Symbol.for('uppy test: getChunkState')]() { return this.#chunkState } diff --git a/packages/@uppy/companion/src/server/provider/credentials.js b/packages/@uppy/companion/src/server/provider/credentials.js index 92abcc7c3b..f01044aee0 100644 --- a/packages/@uppy/companion/src/server/provider/credentials.js +++ b/packages/@uppy/companion/src/server/provider/credentials.js @@ -4,7 +4,6 @@ import * as tokenService from '../helpers/jwt.js' import * as oAuthState from '../helpers/oauth-state.js' import { getRedirectPath, getURLBuilder } from '../helpers/utils.js' import logger from '../logger.js' -// biome-ignore lint/correctness/noUnusedImports: It is used as a type import Provider from './Provider.js' /** diff --git a/packages/@uppy/companion/src/server/provider/index.js b/packages/@uppy/companion/src/server/provider/index.js index cce45c1b12..eedc27fb8b 100644 --- a/packages/@uppy/companion/src/server/provider/index.js +++ b/packages/@uppy/companion/src/server/provider/index.js @@ -11,7 +11,6 @@ import facebook from './facebook/index.js' import { Drive } from './google/drive/index.js' import instagram from './instagram/graph/index.js' import onedrive from './onedrive/index.js' -// biome-ignore lint/correctness/noUnusedImports: It's used as a type import Provider, { isOAuthProvider } from './Provider.js' import unsplash from './unsplash/index.js' import webdav from './webdav/index.js' diff --git a/packages/@uppy/core/src/Uppy.ts b/packages/@uppy/core/src/Uppy.ts index 6f13065b25..b7581f401b 100644 --- a/packages/@uppy/core/src/Uppy.ts +++ b/packages/@uppy/core/src/Uppy.ts @@ -1579,6 +1579,7 @@ export class Uppy< { leading: true, trailing: true }, ) + // biome-ignore lint/correctness/noUnusedPrivateClassMembers: accessed via Symbol in tests private [Symbol.for('uppy test: updateTotalProgress')]() { return this.#updateTotalProgress() } @@ -1964,6 +1965,7 @@ export class Uppy< return undefined } + // biome-ignore lint/correctness/noUnusedPrivateClassMembers: accessed via Symbol in tests private [Symbol.for('uppy test: getPlugins')]( type: string, ): UnknownPlugin[] { @@ -2168,6 +2170,7 @@ export class Uppy< return uploadID } + // biome-ignore lint/correctness/noUnusedPrivateClassMembers: accessed via Symbol in tests private [Symbol.for('uppy test: createUpload')](...args: any[]): string { // @ts-expect-error https://github.com/microsoft/TypeScript/issues/47595 return this.#createUpload(...args) diff --git a/packages/@uppy/dashboard/src/components/AddFiles.tsx b/packages/@uppy/dashboard/src/components/AddFiles.tsx index bbfd6ac950..560a19cfc8 100644 --- a/packages/@uppy/dashboard/src/components/AddFiles.tsx +++ b/packages/@uppy/dashboard/src/components/AddFiles.tsx @@ -267,6 +267,7 @@ class AddFiles extends Component { ) } + // biome-ignore lint/correctness/noUnusedPrivateClassMembers: accessed via Symbol in tests private [Symbol.for('uppy test: disable unused locale key warning')]() { // Those are actually used in `renderDropPasteBrowseTagline` method. this.props.i18nArray('dropPasteBoth') @@ -302,27 +303,6 @@ class AddFiles extends Component { ) } - private renderAcquirers = (acquirers: TargetWithRender[]) => { - // Group last two buttons, so we don’t end up with - // just one button on a new line - const acquirersWithoutLastTwo = [...acquirers] - const lastTwoAcquirers = acquirersWithoutLastTwo.splice( - acquirers.length - 2, - acquirers.length, - ) - - return ( - <> - {acquirersWithoutLastTwo.map((acquirer) => - this.renderAcquirer(acquirer), - )} - - {lastTwoAcquirers.map((acquirer) => this.renderAcquirer(acquirer))} - - - ) - } - private renderSourcesList = ( acquirers: TargetWithRender[], disableLocalFiles: boolean, diff --git a/packages/@uppy/dashboard/src/components/AddFilesPanel.tsx b/packages/@uppy/dashboard/src/components/AddFilesPanel.tsx index f46758793e..40964abe90 100644 --- a/packages/@uppy/dashboard/src/components/AddFilesPanel.tsx +++ b/packages/@uppy/dashboard/src/components/AddFilesPanel.tsx @@ -13,7 +13,6 @@ const AddFilesPanel = (props: $TSFixMe): $TSFixMe => {
diff --git a/packages/@uppy/dashboard/src/components/EditorPanel.tsx b/packages/@uppy/dashboard/src/components/EditorPanel.tsx index 2e2f5c8cc8..e6771b9e3d 100644 --- a/packages/@uppy/dashboard/src/components/EditorPanel.tsx +++ b/packages/@uppy/dashboard/src/components/EditorPanel.tsx @@ -20,7 +20,6 @@ function EditorPanel(props: $TSFixMe) {
diff --git a/packages/@uppy/dashboard/src/components/FileCard/index.tsx b/packages/@uppy/dashboard/src/components/FileCard/index.tsx index ca88cf2b32..1ba41d068c 100644 --- a/packages/@uppy/dashboard/src/components/FileCard/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileCard/index.tsx @@ -115,7 +115,6 @@ export default function FileCard(props: $TSFixMe) {
diff --git a/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx b/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx index 7c9206fb35..f61d00e12e 100644 --- a/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx +++ b/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx @@ -27,7 +27,6 @@ function PickerPanelContent({
diff --git a/packages/@uppy/dashboard/src/components/StatusBar/Components.tsx b/packages/@uppy/dashboard/src/components/StatusBar/Components.tsx index 3cdf5722d7..ae65f4a182 100644 --- a/packages/@uppy/dashboard/src/components/StatusBar/Components.tsx +++ b/packages/@uppy/dashboard/src/components/StatusBar/Components.tsx @@ -456,7 +456,6 @@ function ProgressBarComplete(props: ProgressBarCompleteProps) { return (
diff --git a/packages/@uppy/status-bar/src/Components.tsx b/packages/@uppy/status-bar/src/Components.tsx index 03b4feaf7e..fdfdb5449f 100644 --- a/packages/@uppy/status-bar/src/Components.tsx +++ b/packages/@uppy/status-bar/src/Components.tsx @@ -456,7 +456,6 @@ function ProgressBarComplete(props: ProgressBarCompleteProps) { return (
diff --git a/packages/@uppy/transloadit/src/AssemblyWatcher.ts b/packages/@uppy/transloadit/src/AssemblyWatcher.ts index e3f744f1c4..089e801242 100644 --- a/packages/@uppy/transloadit/src/AssemblyWatcher.ts +++ b/packages/@uppy/transloadit/src/AssemblyWatcher.ts @@ -22,8 +22,6 @@ class TransloaditAssemblyWatcher< #resolve!: () => void - #reject!: (reason?: string) => void - #uppy constructor(uppy: Uppy, assemblyIDs: string[]) { diff --git a/yarn.lock b/yarn.lock index e5ae52e942..fdf177a843 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3529,18 +3529,18 @@ __metadata: languageName: node linkType: hard -"@biomejs/biome@npm:2.0.5": - version: 2.0.5 - resolution: "@biomejs/biome@npm:2.0.5" - dependencies: - "@biomejs/cli-darwin-arm64": "npm:2.0.5" - "@biomejs/cli-darwin-x64": "npm:2.0.5" - "@biomejs/cli-linux-arm64": "npm:2.0.5" - "@biomejs/cli-linux-arm64-musl": "npm:2.0.5" - "@biomejs/cli-linux-x64": "npm:2.0.5" - "@biomejs/cli-linux-x64-musl": "npm:2.0.5" - "@biomejs/cli-win32-arm64": "npm:2.0.5" - "@biomejs/cli-win32-x64": "npm:2.0.5" +"@biomejs/biome@npm:2.1.2": + version: 2.1.2 + resolution: "@biomejs/biome@npm:2.1.2" + dependencies: + "@biomejs/cli-darwin-arm64": "npm:2.1.2" + "@biomejs/cli-darwin-x64": "npm:2.1.2" + "@biomejs/cli-linux-arm64": "npm:2.1.2" + "@biomejs/cli-linux-arm64-musl": "npm:2.1.2" + "@biomejs/cli-linux-x64": "npm:2.1.2" + "@biomejs/cli-linux-x64-musl": "npm:2.1.2" + "@biomejs/cli-win32-arm64": "npm:2.1.2" + "@biomejs/cli-win32-x64": "npm:2.1.2" dependenciesMeta: "@biomejs/cli-darwin-arm64": optional: true @@ -3560,62 +3560,62 @@ __metadata: optional: true bin: biome: bin/biome - checksum: 10/13ad6e67783e3831d09cb0cbcfbe4d93bf21da851b1159d0376dbe8ac6426f0c426674793d0b08726b1ccfef87d4b8172ad3195511d96a074ef11007ff53071a + checksum: 10/80aae8ffe580e3e508251bf54628c98ec5d88703cbec6978ee8f668a82efd30591bcc326b69caa89b314dba80fa3ddc706b7613e8942381f36ac3e70191636a5 languageName: node linkType: hard -"@biomejs/cli-darwin-arm64@npm:2.0.5": - version: 2.0.5 - resolution: "@biomejs/cli-darwin-arm64@npm:2.0.5" +"@biomejs/cli-darwin-arm64@npm:2.1.2": + version: 2.1.2 + resolution: "@biomejs/cli-darwin-arm64@npm:2.1.2" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-darwin-x64@npm:2.0.5": - version: 2.0.5 - resolution: "@biomejs/cli-darwin-x64@npm:2.0.5" +"@biomejs/cli-darwin-x64@npm:2.1.2": + version: 2.1.2 + resolution: "@biomejs/cli-darwin-x64@npm:2.1.2" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@biomejs/cli-linux-arm64-musl@npm:2.0.5": - version: 2.0.5 - resolution: "@biomejs/cli-linux-arm64-musl@npm:2.0.5" +"@biomejs/cli-linux-arm64-musl@npm:2.1.2": + version: 2.1.2 + resolution: "@biomejs/cli-linux-arm64-musl@npm:2.1.2" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-arm64@npm:2.0.5": - version: 2.0.5 - resolution: "@biomejs/cli-linux-arm64@npm:2.0.5" +"@biomejs/cli-linux-arm64@npm:2.1.2": + version: 2.1.2 + resolution: "@biomejs/cli-linux-arm64@npm:2.1.2" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-linux-x64-musl@npm:2.0.5": - version: 2.0.5 - resolution: "@biomejs/cli-linux-x64-musl@npm:2.0.5" +"@biomejs/cli-linux-x64-musl@npm:2.1.2": + version: 2.1.2 + resolution: "@biomejs/cli-linux-x64-musl@npm:2.1.2" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-x64@npm:2.0.5": - version: 2.0.5 - resolution: "@biomejs/cli-linux-x64@npm:2.0.5" +"@biomejs/cli-linux-x64@npm:2.1.2": + version: 2.1.2 + resolution: "@biomejs/cli-linux-x64@npm:2.1.2" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-win32-arm64@npm:2.0.5": - version: 2.0.5 - resolution: "@biomejs/cli-win32-arm64@npm:2.0.5" +"@biomejs/cli-win32-arm64@npm:2.1.2": + version: 2.1.2 + resolution: "@biomejs/cli-win32-arm64@npm:2.1.2" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-win32-x64@npm:2.0.5": - version: 2.0.5 - resolution: "@biomejs/cli-win32-x64@npm:2.0.5" +"@biomejs/cli-win32-x64@npm:2.1.2": + version: 2.1.2 + resolution: "@biomejs/cli-win32-x64@npm:2.1.2" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -9837,7 +9837,7 @@ __metadata: version: 0.0.0-use.local resolution: "@uppy-dev/build@workspace:." dependencies: - "@biomejs/biome": "npm:2.0.5" + "@biomejs/biome": "npm:2.1.2" "@changesets/changelog-github": "npm:^0.5.1" "@changesets/cli": "patch:@changesets/cli@npm%3A2.29.5#~/.yarn/patches/@changesets-cli-npm-2.29.5-68d8030bf3.patch" npm-run-all: "npm:^4.1.5" From 6bc038aa3a59fbe6c0ef9e4009af1ede207dd5b1 Mon Sep 17 00:00:00 2001 From: Prakash Date: Thu, 26 Mar 2026 17:53:27 +0530 Subject: [PATCH 2/8] add back #reject in TransloaditAssemblyWatcher --- packages/@uppy/transloadit/src/AssemblyWatcher.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/@uppy/transloadit/src/AssemblyWatcher.ts b/packages/@uppy/transloadit/src/AssemblyWatcher.ts index 089e801242..8725dd3012 100644 --- a/packages/@uppy/transloadit/src/AssemblyWatcher.ts +++ b/packages/@uppy/transloadit/src/AssemblyWatcher.ts @@ -22,6 +22,9 @@ class TransloaditAssemblyWatcher< #resolve!: () => void + // biome-ignore lint/correctness/noUnusedPrivateClassMembers: assigned in constructor, may be needed for future error handling + #reject!: (reason?: string) => void + #uppy constructor(uppy: Uppy, assemblyIDs: string[]) { From 9e2cada9cc7cf9e7337d82503fb1d6094080557a Mon Sep 17 00:00:00 2001 From: Prakash Date: Wed, 13 May 2026 15:52:55 +0530 Subject: [PATCH 3/8] update biome version and config --- biome.json | 59 +++++++++++++++++++++++++++++++++------------------- package.json | 2 +- 2 files changed, 39 insertions(+), 22 deletions(-) diff --git a/biome.json b/biome.json index c92efb6812..a780c0ab0f 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.1.2/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.15/schema.json", "vcs": { "enabled": true, "clientKind": "git", @@ -14,10 +14,11 @@ "bin/**", "e2e/**", "private/**", - "!packages/**/{dist,lib}/**", + "!packages/**/{dist,lib}", "!node_modules", "!.svelte-kit", - "!packages/@uppy/components/src/input.css" + "!packages/@uppy/components/src/input.css", + "!examples/angular/**/*.html" ] }, "formatter": { @@ -25,20 +26,11 @@ "indentStyle": "space", "formatWithErrors": true }, + "html": { + "experimentalFullSupportEnabled": true + }, "linter": { "enabled": true, - "includes": [ - "packages/**", - "examples/**", - "scripts/**", - "private/**", - "!packages/**/{dist,lib}/**", - "!node_modules", - "!.svelte-kit", - "!packages/@uppy/components/src/input.css", - "!**/*.vue", - "!**/*.svelte" - ], "rules": { "recommended": true, "suspicious": { @@ -55,7 +47,9 @@ "options": { "ignoreRestSiblings": true } - } + }, + "noNestedComponentDefinitions": "error", + "noReactPropAssignments": "error" }, "style": { "noNonNullAssertion": "off" @@ -63,10 +57,6 @@ "a11y": { "noSvgWithoutTitle": "off", "useSemanticElements": "off" - }, - "nursery": { - "noNestedComponentDefinitions": "error", - "noReactPropAssign": "error" } } }, @@ -83,5 +73,32 @@ "organizeImports": "on" } } - } + }, + "overrides": [ + { + "includes": ["**/*.vue", "**/*.svelte", "packages/@uppy/vue/**/*.ts"], + "linter": { + "rules": { + "correctness": { + "useHookAtTopLevel": "off", + "useExhaustiveDependencies": "off" + } + } + } + }, + { + "includes": ["examples/angular/**"], + "linter": { + "enabled": false + } + }, + { + "includes": ["examples/nextjs/**/*.css"], + "css": { + "parser": { + "tailwindDirectives": true + } + } + } + ] } diff --git a/package.json b/package.json index 305a333d4f..f8f7f7dd53 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "release": "changeset publish" }, "devDependencies": { - "@biomejs/biome": "2.1.2", + "@biomejs/biome": "2.4.15", "@changesets/changelog-github": "^0.5.1", "@changesets/cli": "patch:@changesets/cli@npm%3A2.29.5#~/.yarn/patches/@changesets-cli-npm-2.29.5-68d8030bf3.patch", "npm-run-all": "^4.1.5", From 2c679ca38d8d8689b08c4c683203bbdfdc87a4aa Mon Sep 17 00:00:00 2001 From: Prakash Date: Wed, 13 May 2026 16:38:17 +0530 Subject: [PATCH 4/8] yarn lock --- biome.json | 22 +++++++--------- yarn.lock | 76 +++++++++++++++++++++++++++--------------------------- 2 files changed, 48 insertions(+), 50 deletions(-) diff --git a/biome.json b/biome.json index 0645e3c2c3..d85bb85b47 100644 --- a/biome.json +++ b/biome.json @@ -60,18 +60,6 @@ } } }, - "overrides": [ - { - "includes": ["packages/@uppy/companion/**"], - "linter": { - "rules": { - "complexity": { - "useLiteralKeys": "off" - } - } - } - } - ], "javascript": { "formatter": { "quoteStyle": "single", @@ -87,6 +75,16 @@ } }, "overrides": [ + { + "includes": ["packages/@uppy/companion/**"], + "linter": { + "rules": { + "complexity": { + "useLiteralKeys": "off" + } + } + } + }, { "includes": ["**/*.vue", "**/*.svelte", "packages/@uppy/vue/**/*.ts"], "linter": { diff --git a/yarn.lock b/yarn.lock index de173a1460..b88fdd4544 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3529,18 +3529,18 @@ __metadata: languageName: node linkType: hard -"@biomejs/biome@npm:2.1.2": - version: 2.1.2 - resolution: "@biomejs/biome@npm:2.1.2" - dependencies: - "@biomejs/cli-darwin-arm64": "npm:2.1.2" - "@biomejs/cli-darwin-x64": "npm:2.1.2" - "@biomejs/cli-linux-arm64": "npm:2.1.2" - "@biomejs/cli-linux-arm64-musl": "npm:2.1.2" - "@biomejs/cli-linux-x64": "npm:2.1.2" - "@biomejs/cli-linux-x64-musl": "npm:2.1.2" - "@biomejs/cli-win32-arm64": "npm:2.1.2" - "@biomejs/cli-win32-x64": "npm:2.1.2" +"@biomejs/biome@npm:2.4.15": + version: 2.4.15 + resolution: "@biomejs/biome@npm:2.4.15" + dependencies: + "@biomejs/cli-darwin-arm64": "npm:2.4.15" + "@biomejs/cli-darwin-x64": "npm:2.4.15" + "@biomejs/cli-linux-arm64": "npm:2.4.15" + "@biomejs/cli-linux-arm64-musl": "npm:2.4.15" + "@biomejs/cli-linux-x64": "npm:2.4.15" + "@biomejs/cli-linux-x64-musl": "npm:2.4.15" + "@biomejs/cli-win32-arm64": "npm:2.4.15" + "@biomejs/cli-win32-x64": "npm:2.4.15" dependenciesMeta: "@biomejs/cli-darwin-arm64": optional: true @@ -3560,62 +3560,62 @@ __metadata: optional: true bin: biome: bin/biome - checksum: 10/80aae8ffe580e3e508251bf54628c98ec5d88703cbec6978ee8f668a82efd30591bcc326b69caa89b314dba80fa3ddc706b7613e8942381f36ac3e70191636a5 + checksum: 10/1b48c62fb4d26de515599cfd3ab51fae16aa0b93e686e496ffc837d3a59887898b4a21d6653ae1a90751f52ae120078f0f998e370e35fa4af9faa3febd3d6e14 languageName: node linkType: hard -"@biomejs/cli-darwin-arm64@npm:2.1.2": - version: 2.1.2 - resolution: "@biomejs/cli-darwin-arm64@npm:2.1.2" +"@biomejs/cli-darwin-arm64@npm:2.4.15": + version: 2.4.15 + resolution: "@biomejs/cli-darwin-arm64@npm:2.4.15" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-darwin-x64@npm:2.1.2": - version: 2.1.2 - resolution: "@biomejs/cli-darwin-x64@npm:2.1.2" +"@biomejs/cli-darwin-x64@npm:2.4.15": + version: 2.4.15 + resolution: "@biomejs/cli-darwin-x64@npm:2.4.15" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@biomejs/cli-linux-arm64-musl@npm:2.1.2": - version: 2.1.2 - resolution: "@biomejs/cli-linux-arm64-musl@npm:2.1.2" +"@biomejs/cli-linux-arm64-musl@npm:2.4.15": + version: 2.4.15 + resolution: "@biomejs/cli-linux-arm64-musl@npm:2.4.15" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-arm64@npm:2.1.2": - version: 2.1.2 - resolution: "@biomejs/cli-linux-arm64@npm:2.1.2" +"@biomejs/cli-linux-arm64@npm:2.4.15": + version: 2.4.15 + resolution: "@biomejs/cli-linux-arm64@npm:2.4.15" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-linux-x64-musl@npm:2.1.2": - version: 2.1.2 - resolution: "@biomejs/cli-linux-x64-musl@npm:2.1.2" +"@biomejs/cli-linux-x64-musl@npm:2.4.15": + version: 2.4.15 + resolution: "@biomejs/cli-linux-x64-musl@npm:2.4.15" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-x64@npm:2.1.2": - version: 2.1.2 - resolution: "@biomejs/cli-linux-x64@npm:2.1.2" +"@biomejs/cli-linux-x64@npm:2.4.15": + version: 2.4.15 + resolution: "@biomejs/cli-linux-x64@npm:2.4.15" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-win32-arm64@npm:2.1.2": - version: 2.1.2 - resolution: "@biomejs/cli-win32-arm64@npm:2.1.2" +"@biomejs/cli-win32-arm64@npm:2.4.15": + version: 2.4.15 + resolution: "@biomejs/cli-win32-arm64@npm:2.4.15" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-win32-x64@npm:2.1.2": - version: 2.1.2 - resolution: "@biomejs/cli-win32-x64@npm:2.1.2" +"@biomejs/cli-win32-x64@npm:2.4.15": + version: 2.4.15 + resolution: "@biomejs/cli-win32-x64@npm:2.4.15" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -9917,7 +9917,7 @@ __metadata: version: 0.0.0-use.local resolution: "@uppy-dev/build@workspace:." dependencies: - "@biomejs/biome": "npm:2.1.2" + "@biomejs/biome": "npm:2.4.15" "@changesets/changelog-github": "npm:^0.5.1" "@changesets/cli": "patch:@changesets/cli@npm%3A2.29.5#~/.yarn/patches/@changesets-cli-npm-2.29.5-68d8030bf3.patch" npm-run-all: "npm:^4.1.5" From 2c997bce78a935ba192d3f137eaf4746ee1027a6 Mon Sep 17 00:00:00 2001 From: Prakash Date: Wed, 13 May 2026 16:38:51 +0530 Subject: [PATCH 5/8] add all lint suggestions by biome --- examples/aws-companion/index.html | 2 +- examples/aws-nodejs/public/index.html | 7 +- .../public/withCustomEndpoints.html | 7 +- examples/aws-php/index.html | 2 +- examples/cdn/index.html | 6 +- examples/companion-custom-provider/index.html | 2 +- .../companion-digitalocean-spaces/index.html | 2 +- examples/companion/client/index.html | 4 +- examples/react/src/App.tsx | 2 +- .../src/components/CustomDropzone.svelte | 8 +- .../src/components/ImageEditor.svelte | 23 +-- .../src/components/MediaCapture.svelte | 11 +- .../src/components/RemoteSource.svelte | 1 + .../components/test/props-reactivity.svelte | 4 +- examples/transloadit/index.html | 4 +- examples/transloadit/server.js | 8 +- examples/vue/src/Dropzone.vue | 8 +- examples/vue/src/ImageEditor.vue | 23 +-- examples/vue/src/MediaCapture.vue | 10 +- examples/xhr-bundle/index.html | 2 +- examples/xhr-node/index.html | 2 +- examples/xhr-php/index.html | 2 +- examples/xhr-python/index.html | 2 +- packages/@uppy/audio/src/Audio.tsx | 4 +- .../aws-s3/src/HTTPCommunicationQueue.ts | 6 +- .../src/scripts/with-load-balancer.ts | 4 +- .../@uppy/companion/src/server/Uploader.ts | 6 +- .../src/server/provider/facebook/adapter.ts | 2 +- .../@uppy/companion/src/types/express.d.ts | 4 +- packages/@uppy/companion/src/types/shims.d.ts | 2 +- .../@uppy/companion/test/credentials.test.ts | 2 +- .../@uppy/companion/test/providers.test.ts | 33 ++-- packages/@uppy/companion/test/url.test.ts | 31 ++-- packages/@uppy/compressor/src/index.ts | 2 +- packages/@uppy/core/src/Restricter.ts | 4 +- packages/@uppy/core/src/Uppy.test.ts | 172 +++++++++--------- packages/@uppy/core/src/Uppy.ts | 4 +- packages/@uppy/core/src/loggers.ts | 2 +- packages/@uppy/dashboard/src/Dashboard.tsx | 14 +- .../dashboard/src/components/FileList.tsx | 2 +- .../src/components/StatusBar/Components.tsx | 13 +- packages/@uppy/dashboard/src/index.test.ts | 6 +- .../dashboard/src/utils/createSuperFocus.ts | 2 +- .../@uppy/dashboard/src/utils/trapFocus.ts | 2 +- packages/@uppy/form/src/index.ts | 2 +- packages/@uppy/golden-retriever/src/index.ts | 1 - packages/@uppy/locales/src/ar_SA.ts | 4 +- packages/@uppy/locales/src/bg_BG.ts | 4 +- packages/@uppy/locales/src/ca_ES.ts | 4 +- packages/@uppy/locales/src/cs_CZ.ts | 4 +- packages/@uppy/locales/src/da_DK.ts | 4 +- packages/@uppy/locales/src/de_DE.ts | 4 +- packages/@uppy/locales/src/el_GR.ts | 4 +- packages/@uppy/locales/src/en_US.ts | 4 +- packages/@uppy/locales/src/es_ES.ts | 4 +- packages/@uppy/locales/src/es_MX.ts | 4 +- packages/@uppy/locales/src/fa_IR.ts | 4 +- packages/@uppy/locales/src/fi_FI.ts | 4 +- packages/@uppy/locales/src/fr_FR.ts | 4 +- packages/@uppy/locales/src/gl_ES.ts | 4 +- packages/@uppy/locales/src/he_IL.ts | 4 +- packages/@uppy/locales/src/hi_IN.ts | 4 +- packages/@uppy/locales/src/hr_HR.ts | 4 +- packages/@uppy/locales/src/hu_HU.ts | 4 +- packages/@uppy/locales/src/id_ID.ts | 4 +- packages/@uppy/locales/src/is_IS.ts | 4 +- packages/@uppy/locales/src/it_IT.ts | 4 +- packages/@uppy/locales/src/ja_JP.ts | 4 +- packages/@uppy/locales/src/ko_KR.ts | 4 +- packages/@uppy/locales/src/ms_MY.ts | 4 +- packages/@uppy/locales/src/nb_NO.ts | 4 +- packages/@uppy/locales/src/nl_NL.ts | 4 +- packages/@uppy/locales/src/pl_PL.ts | 4 +- packages/@uppy/locales/src/pt_BR.ts | 4 +- packages/@uppy/locales/src/pt_PT.ts | 4 +- packages/@uppy/locales/src/ro_RO.ts | 4 +- packages/@uppy/locales/src/ru_RU.ts | 4 +- packages/@uppy/locales/src/sk_SK.ts | 4 +- packages/@uppy/locales/src/sr_RS_Cyrillic.ts | 4 +- packages/@uppy/locales/src/sr_RS_Latin.ts | 4 +- packages/@uppy/locales/src/sv_SE.ts | 4 +- packages/@uppy/locales/src/th_TH.ts | 4 +- packages/@uppy/locales/src/tr_TR.ts | 4 +- packages/@uppy/locales/src/uk_UA.ts | 4 +- packages/@uppy/locales/src/uz_UZ.ts | 4 +- packages/@uppy/locales/src/vi_VN.ts | 4 +- packages/@uppy/locales/src/zh_CN.ts | 4 +- packages/@uppy/locales/src/zh_TW.ts | 4 +- packages/@uppy/locales/template.ts | 4 +- packages/@uppy/status-bar/src/Components.tsx | 13 +- .../@uppy/thumbnail-generator/src/index.ts | 2 +- packages/@uppy/transloadit/src/Assembly.ts | 6 +- packages/@uppy/transloadit/src/index.ts | 11 +- packages/@uppy/tus/src/index.ts | 2 - packages/@uppy/utils/src/Translator.ts | 5 +- packages/@uppy/webcam/src/Webcam.test.ts | 14 +- packages/@uppy/webcam/src/Webcam.tsx | 6 +- .../webcam/src/supportsMediaRecorder.test.ts | 8 +- packages/@uppy/xhr-upload/src/index.ts | 4 +- private/dev/dragdrop.html | 2 +- private/dev/index.html | 2 +- 101 files changed, 359 insertions(+), 350 deletions(-) diff --git a/examples/aws-companion/index.html b/examples/aws-companion/index.html index 0b86787b77..01eacb7a82 100644 --- a/examples/aws-companion/index.html +++ b/examples/aws-companion/index.html @@ -1,5 +1,5 @@ - + diff --git a/examples/aws-nodejs/public/index.html b/examples/aws-nodejs/public/index.html index 881a07567a..cd7d79f601 100644 --- a/examples/aws-nodejs/public/index.html +++ b/examples/aws-nodejs/public/index.html @@ -1,5 +1,5 @@ - + Uppy – AWS upload example @@ -24,7 +24,8 @@

AWS upload example

- + - +
diff --git a/examples/transloadit/index.html b/examples/transloadit/index.html index a3919ae1f8..a9e0b9c1f6 100644 --- a/examples/transloadit/index.html +++ b/examples/transloadit/index.html @@ -1,5 +1,5 @@ - + @@ -140,7 +140,7 @@

Dashboard Modal

This API is a one-shot upload UI using a modal overlay. Call the function and receive a listen to an event with upload results ✌️

- +

uppy.upload()

An <input type=file> backed by uppy.upload():

diff --git a/examples/transloadit/server.js b/examples/transloadit/server.js index 765301bd52..c71994b0e5 100755 --- a/examples/transloadit/server.js +++ b/examples/transloadit/server.js @@ -36,7 +36,7 @@ function Footer() { } function FormFields(fields) { - // biome-ignore lint/nursery/noNestedComponentDefinitions: not a react component + // biome-ignore lint/correctness/noNestedComponentDefinitions: not a react component function Field([name, value]) { if (name === 'transloadit') return '' let isValueJSON = false @@ -76,7 +76,7 @@ function FormFields(fields) { } function UploadsList(uploads) { - // biome-ignore lint/nursery/noNestedComponentDefinitions: not a react component + // biome-ignore lint/correctness/noNestedComponentDefinitions: not a react component function Upload(upload) { return `
  • ${e(upload.name)}
  • ` } @@ -89,12 +89,12 @@ function UploadsList(uploads) { } function ResultsList(results) { - // biome-ignore lint/nursery/noNestedComponentDefinitions: not a react component + // biome-ignore lint/correctness/noNestedComponentDefinitions: not a react component function Result(result) { return `
  • ${e(result.name)} View
  • ` } - // biome-ignore lint/nursery/noNestedComponentDefinitions: not a react component + // biome-ignore lint/correctness/noNestedComponentDefinitions: not a react component function ResultsSection(stepName) { return `

    ${e(stepName)}

    diff --git a/examples/vue/src/Dropzone.vue b/examples/vue/src/Dropzone.vue index c36d0a9a9e..4bb75fd80a 100644 --- a/examples/vue/src/Dropzone.vue +++ b/examples/vue/src/Dropzone.vue @@ -7,7 +7,7 @@ >
    - - - -
    +
    - - - - -
    - - - -
    - - - - - -
    ) } + export { - UploadBtn, - RetryBtn, CancelBtn, - PauseResumeButton, DoneBtn, LoadingSpinner, - ProgressDetails, - ProgressBarProcessing, + PauseResumeButton, + ProgressBarComplete, ProgressBarError, + ProgressBarProcessing, ProgressBarUploading, - ProgressBarComplete, + ProgressDetails, + RetryBtn, + UploadBtn, } diff --git a/packages/@uppy/dashboard/src/index.test.ts b/packages/@uppy/dashboard/src/index.test.ts index 72398e9f90..0ec6491540 100644 --- a/packages/@uppy/dashboard/src/index.test.ts +++ b/packages/@uppy/dashboard/src/index.test.ts @@ -1,8 +1,8 @@ import Core, { type UIPlugin } from '@uppy/core' import GoogleDrivePlugin from '@uppy/google-drive' -// @ts-ignore untyped +// @ts-expect-error untyped import Url from '@uppy/url' -// @ts-ignore untyped +// @ts-expect-error untyped import WebcamPlugin from '@uppy/webcam' import resizeObserverPolyfill from 'resize-observer-polyfill' import { afterAll, beforeAll, describe, expect, it } from 'vitest' @@ -12,7 +12,7 @@ type $TSFixMe = any describe('Dashboard', () => { beforeAll(() => { - // @ts-ignore we're touching globals for the test + // @ts-expect-error we're touching globals for the test globalThis.ResizeObserver = (resizeObserverPolyfill as any).default || resizeObserverPolyfill }) diff --git a/packages/@uppy/dashboard/src/utils/createSuperFocus.ts b/packages/@uppy/dashboard/src/utils/createSuperFocus.ts index 8d69265749..842a510164 100644 --- a/packages/@uppy/dashboard/src/utils/createSuperFocus.ts +++ b/packages/@uppy/dashboard/src/utils/createSuperFocus.ts @@ -1,4 +1,4 @@ -// @ts-ignore untyped +// @ts-expect-error untyped import { FOCUSABLE_ELEMENTS } from '@uppy/utils' import debounce from 'lodash/debounce.js' import getActiveOverlayEl from './getActiveOverlayEl.js' diff --git a/packages/@uppy/dashboard/src/utils/trapFocus.ts b/packages/@uppy/dashboard/src/utils/trapFocus.ts index c902f4fbd8..0ad33b207a 100644 --- a/packages/@uppy/dashboard/src/utils/trapFocus.ts +++ b/packages/@uppy/dashboard/src/utils/trapFocus.ts @@ -1,4 +1,4 @@ -// @ts-ignore untyped +// @ts-expect-error untyped import { FOCUSABLE_ELEMENTS, toArray } from '@uppy/utils' import getActiveOverlayEl from './getActiveOverlayEl.js' diff --git a/packages/@uppy/form/src/index.ts b/packages/@uppy/form/src/index.ts index 798fff854a..ba36e8cc8f 100644 --- a/packages/@uppy/form/src/index.ts +++ b/packages/@uppy/form/src/index.ts @@ -9,7 +9,7 @@ import type { import { BasePlugin } from '@uppy/core' import { findDOMElement, toArray } from '@uppy/utils' -// @ts-ignore untyped +// @ts-expect-error untyped import getFormData from 'get-form-data' import packageJson from '../package.json' with { type: 'json' } diff --git a/packages/@uppy/golden-retriever/src/index.ts b/packages/@uppy/golden-retriever/src/index.ts index 0898c374ab..3b5c878a82 100644 --- a/packages/@uppy/golden-retriever/src/index.ts +++ b/packages/@uppy/golden-retriever/src/index.ts @@ -15,7 +15,6 @@ import MetaDataStore from './MetaDataStore.js' import ServiceWorkerStore from './ServiceWorkerStore.js' declare module '@uppy/core' { - // biome-ignore lint/correctness/noUnusedVariables: must be defined export interface UppyEventMap { 'restore:plugin-data-changed': (data: Record) => void } diff --git a/packages/@uppy/locales/src/ar_SA.ts b/packages/@uppy/locales/src/ar_SA.ts index bf750b7e61..5726332aa9 100644 --- a/packages/@uppy/locales/src/ar_SA.ts +++ b/packages/@uppy/locales/src/ar_SA.ts @@ -136,9 +136,9 @@ ar_SA.strings = { openFolderNamed: '%{name} افتح المجلد', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.ar_SA = ar_SA } diff --git a/packages/@uppy/locales/src/bg_BG.ts b/packages/@uppy/locales/src/bg_BG.ts index 0bfb50cbc5..637e505e0c 100644 --- a/packages/@uppy/locales/src/bg_BG.ts +++ b/packages/@uppy/locales/src/bg_BG.ts @@ -164,9 +164,9 @@ bg_BG.strings = { }, } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.bg_BG = bg_BG } diff --git a/packages/@uppy/locales/src/ca_ES.ts b/packages/@uppy/locales/src/ca_ES.ts index f05b431021..bce9a1296f 100644 --- a/packages/@uppy/locales/src/ca_ES.ts +++ b/packages/@uppy/locales/src/ca_ES.ts @@ -229,9 +229,9 @@ ca_ES.strings = { unselectFileNamed: 'Desselecciona arxiu %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.ca_ES = ca_ES } diff --git a/packages/@uppy/locales/src/cs_CZ.ts b/packages/@uppy/locales/src/cs_CZ.ts index 9720ad3089..1489294507 100644 --- a/packages/@uppy/locales/src/cs_CZ.ts +++ b/packages/@uppy/locales/src/cs_CZ.ts @@ -274,9 +274,9 @@ cs_CZ.strings = { zoomOut: 'Oddálit', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.cs_CZ = cs_CZ } diff --git a/packages/@uppy/locales/src/da_DK.ts b/packages/@uppy/locales/src/da_DK.ts index 21d99dc3e7..1e8f807cf8 100644 --- a/packages/@uppy/locales/src/da_DK.ts +++ b/packages/@uppy/locales/src/da_DK.ts @@ -141,9 +141,9 @@ da_DK.strings = { }, } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.da_DK = da_DK } diff --git a/packages/@uppy/locales/src/de_DE.ts b/packages/@uppy/locales/src/de_DE.ts index b6bbb4cbac..9c1d99b0d6 100644 --- a/packages/@uppy/locales/src/de_DE.ts +++ b/packages/@uppy/locales/src/de_DE.ts @@ -210,9 +210,9 @@ de_DE.strings = { zoomOut: 'Verkleinern', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.de_DE = de_DE } diff --git a/packages/@uppy/locales/src/el_GR.ts b/packages/@uppy/locales/src/el_GR.ts index dcad28a604..615121078b 100644 --- a/packages/@uppy/locales/src/el_GR.ts +++ b/packages/@uppy/locales/src/el_GR.ts @@ -145,9 +145,9 @@ el_GR.strings = { }, } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.el_GR = el_GR } diff --git a/packages/@uppy/locales/src/en_US.ts b/packages/@uppy/locales/src/en_US.ts index b8a925181c..c3f95e82df 100644 --- a/packages/@uppy/locales/src/en_US.ts +++ b/packages/@uppy/locales/src/en_US.ts @@ -252,9 +252,9 @@ en_US.strings = { zoomOut: 'Zoom out', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.en_US = en_US } diff --git a/packages/@uppy/locales/src/es_ES.ts b/packages/@uppy/locales/src/es_ES.ts index 7114a7cf2e..e4581f90e5 100644 --- a/packages/@uppy/locales/src/es_ES.ts +++ b/packages/@uppy/locales/src/es_ES.ts @@ -232,9 +232,9 @@ es_ES.strings = { unselectFileNamed: 'Deseleccionar archivo %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.es_ES = es_ES } diff --git a/packages/@uppy/locales/src/es_MX.ts b/packages/@uppy/locales/src/es_MX.ts index 21efd7d145..b8eb479869 100644 --- a/packages/@uppy/locales/src/es_MX.ts +++ b/packages/@uppy/locales/src/es_MX.ts @@ -198,9 +198,9 @@ es_MX.strings = { zoomOut: 'Alejar', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.es_MX = es_MX } diff --git a/packages/@uppy/locales/src/fa_IR.ts b/packages/@uppy/locales/src/fa_IR.ts index 024e96e597..1b69091ca9 100644 --- a/packages/@uppy/locales/src/fa_IR.ts +++ b/packages/@uppy/locales/src/fa_IR.ts @@ -221,9 +221,9 @@ fa_IR.strings = { zoomOut: 'کوچک‌نمایی', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.fa_IR = fa_IR } diff --git a/packages/@uppy/locales/src/fi_FI.ts b/packages/@uppy/locales/src/fi_FI.ts index a2ec3d4d6b..5eda5537b6 100644 --- a/packages/@uppy/locales/src/fi_FI.ts +++ b/packages/@uppy/locales/src/fi_FI.ts @@ -146,9 +146,9 @@ fi_FI.strings = { recording: 'Tallennetaan', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.fi_FI = fi_FI } diff --git a/packages/@uppy/locales/src/fr_FR.ts b/packages/@uppy/locales/src/fr_FR.ts index 6a0fb817ab..7a8f6d0f29 100644 --- a/packages/@uppy/locales/src/fr_FR.ts +++ b/packages/@uppy/locales/src/fr_FR.ts @@ -215,9 +215,9 @@ fr_FR.strings = { }, } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.fr_FR = fr_FR } diff --git a/packages/@uppy/locales/src/gl_ES.ts b/packages/@uppy/locales/src/gl_ES.ts index 35c0f63d9a..25b2fed3fa 100644 --- a/packages/@uppy/locales/src/gl_ES.ts +++ b/packages/@uppy/locales/src/gl_ES.ts @@ -143,9 +143,9 @@ gl_ES.strings = { openFolderNamed: 'Cartafol aberto %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.gl_ES = gl_ES } diff --git a/packages/@uppy/locales/src/he_IL.ts b/packages/@uppy/locales/src/he_IL.ts index eee51fca39..44a5d52f2a 100644 --- a/packages/@uppy/locales/src/he_IL.ts +++ b/packages/@uppy/locales/src/he_IL.ts @@ -139,9 +139,9 @@ he_IL.strings = { }, } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.he_IL = he_IL } diff --git a/packages/@uppy/locales/src/hi_IN.ts b/packages/@uppy/locales/src/hi_IN.ts index d42d3b7e5e..587d31f507 100644 --- a/packages/@uppy/locales/src/hi_IN.ts +++ b/packages/@uppy/locales/src/hi_IN.ts @@ -189,9 +189,9 @@ hi_IN.strings = { zoomOut: 'ज़ूम आउट', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.hi_IN = hi_IN } diff --git a/packages/@uppy/locales/src/hr_HR.ts b/packages/@uppy/locales/src/hr_HR.ts index 924b57b912..f347db8279 100644 --- a/packages/@uppy/locales/src/hr_HR.ts +++ b/packages/@uppy/locales/src/hr_HR.ts @@ -143,9 +143,9 @@ hr_HR.strings = { openFolderNamed: 'Otvori mapu %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.hr_HR = hr_HR } diff --git a/packages/@uppy/locales/src/hu_HU.ts b/packages/@uppy/locales/src/hu_HU.ts index 94b1272f1d..4b7f6d4af1 100644 --- a/packages/@uppy/locales/src/hu_HU.ts +++ b/packages/@uppy/locales/src/hu_HU.ts @@ -105,9 +105,9 @@ hu_HU.strings = { openFolderNamed: 'Nyitott mappa %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.hu_HU = hu_HU } diff --git a/packages/@uppy/locales/src/id_ID.ts b/packages/@uppy/locales/src/id_ID.ts index b1d42b893f..7daf65b029 100644 --- a/packages/@uppy/locales/src/id_ID.ts +++ b/packages/@uppy/locales/src/id_ID.ts @@ -140,9 +140,9 @@ id_ID.strings = { }, } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.id_ID = id_ID } diff --git a/packages/@uppy/locales/src/is_IS.ts b/packages/@uppy/locales/src/is_IS.ts index f3a7f07946..ebf4713b54 100644 --- a/packages/@uppy/locales/src/is_IS.ts +++ b/packages/@uppy/locales/src/is_IS.ts @@ -145,9 +145,9 @@ is_IS.strings = { }, } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.is_IS = is_IS } diff --git a/packages/@uppy/locales/src/it_IT.ts b/packages/@uppy/locales/src/it_IT.ts index b6f19029eb..7508dce639 100644 --- a/packages/@uppy/locales/src/it_IT.ts +++ b/packages/@uppy/locales/src/it_IT.ts @@ -140,9 +140,9 @@ it_IT.strings = { openFolderNamed: 'Cartella aperta %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.it_IT = it_IT } diff --git a/packages/@uppy/locales/src/ja_JP.ts b/packages/@uppy/locales/src/ja_JP.ts index ebfbb1ac57..62e33ab51f 100644 --- a/packages/@uppy/locales/src/ja_JP.ts +++ b/packages/@uppy/locales/src/ja_JP.ts @@ -148,9 +148,9 @@ ja_JP.strings = { openFolderNamed: '開いたフォルダ %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.ja_JP = ja_JP } diff --git a/packages/@uppy/locales/src/ko_KR.ts b/packages/@uppy/locales/src/ko_KR.ts index e40079c72d..73138bd881 100644 --- a/packages/@uppy/locales/src/ko_KR.ts +++ b/packages/@uppy/locales/src/ko_KR.ts @@ -108,9 +108,9 @@ ko_KR.strings = { youHaveToAtLeastSelectX: '최소 %{smart_count}개의 파일을 선택해야 합니다', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.ko_KR = ko_KR } diff --git a/packages/@uppy/locales/src/ms_MY.ts b/packages/@uppy/locales/src/ms_MY.ts index 941c65feea..1358ea330c 100644 --- a/packages/@uppy/locales/src/ms_MY.ts +++ b/packages/@uppy/locales/src/ms_MY.ts @@ -232,9 +232,9 @@ ms_MY.strings = { zoomOut: 'Zum keluar', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.ms_MY = ms_MY } diff --git a/packages/@uppy/locales/src/nb_NO.ts b/packages/@uppy/locales/src/nb_NO.ts index bf8d9d29de..6560c09f0c 100644 --- a/packages/@uppy/locales/src/nb_NO.ts +++ b/packages/@uppy/locales/src/nb_NO.ts @@ -175,9 +175,9 @@ nb_NO.strings = { zoomOut: 'Zoom ut', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.nb_NO = nb_NO } diff --git a/packages/@uppy/locales/src/nl_NL.ts b/packages/@uppy/locales/src/nl_NL.ts index 28d2b604ad..28a11ed7c3 100644 --- a/packages/@uppy/locales/src/nl_NL.ts +++ b/packages/@uppy/locales/src/nl_NL.ts @@ -247,9 +247,9 @@ nl_NL.strings = { zoomOut: 'Zoom uit', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.nl_NL = nl_NL } diff --git a/packages/@uppy/locales/src/pl_PL.ts b/packages/@uppy/locales/src/pl_PL.ts index 1ca1d2b15b..00b33458b8 100644 --- a/packages/@uppy/locales/src/pl_PL.ts +++ b/packages/@uppy/locales/src/pl_PL.ts @@ -243,9 +243,9 @@ pl_PL.strings = { zoomOut: 'Pomniejsz', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.pl_PL = pl_PL } diff --git a/packages/@uppy/locales/src/pt_BR.ts b/packages/@uppy/locales/src/pt_BR.ts index 24a52c72a7..48bbb18489 100644 --- a/packages/@uppy/locales/src/pt_BR.ts +++ b/packages/@uppy/locales/src/pt_BR.ts @@ -248,9 +248,9 @@ pt_BR.strings = { zoomOut: 'Diminuir o zoom', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.pt_BR = pt_BR } diff --git a/packages/@uppy/locales/src/pt_PT.ts b/packages/@uppy/locales/src/pt_PT.ts index 30195f868f..13f2ce18af 100644 --- a/packages/@uppy/locales/src/pt_PT.ts +++ b/packages/@uppy/locales/src/pt_PT.ts @@ -140,9 +140,9 @@ pt_PT.strings = { openFolderNamed: 'Pasta aberta %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.pt_PT = pt_PT } diff --git a/packages/@uppy/locales/src/ro_RO.ts b/packages/@uppy/locales/src/ro_RO.ts index 7d005067b4..f271c141bc 100644 --- a/packages/@uppy/locales/src/ro_RO.ts +++ b/packages/@uppy/locales/src/ro_RO.ts @@ -154,9 +154,9 @@ ro_RO.strings = { }, } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.ro_RO = ro_RO } diff --git a/packages/@uppy/locales/src/ru_RU.ts b/packages/@uppy/locales/src/ru_RU.ts index 3bab2a12b1..2411009a46 100644 --- a/packages/@uppy/locales/src/ru_RU.ts +++ b/packages/@uppy/locales/src/ru_RU.ts @@ -253,9 +253,9 @@ ru_RU.strings = { zoomOut: 'Отдалить', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.ru_RU = ru_RU } diff --git a/packages/@uppy/locales/src/sk_SK.ts b/packages/@uppy/locales/src/sk_SK.ts index 68ecc9ddb2..68fc787a3b 100644 --- a/packages/@uppy/locales/src/sk_SK.ts +++ b/packages/@uppy/locales/src/sk_SK.ts @@ -177,9 +177,9 @@ sk_SK.strings = { zoomOut: 'Oddialiť', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.sk_SK = sk_SK } diff --git a/packages/@uppy/locales/src/sr_RS_Cyrillic.ts b/packages/@uppy/locales/src/sr_RS_Cyrillic.ts index c9ff6dd406..aac4d0fa88 100644 --- a/packages/@uppy/locales/src/sr_RS_Cyrillic.ts +++ b/packages/@uppy/locales/src/sr_RS_Cyrillic.ts @@ -143,9 +143,9 @@ sr_RS_Cyrillic.strings = { openFolderNamed: 'Отвори фолдер %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.sr_RS_Cyrillic = sr_RS_Cyrillic } diff --git a/packages/@uppy/locales/src/sr_RS_Latin.ts b/packages/@uppy/locales/src/sr_RS_Latin.ts index 955040aedf..987627082f 100644 --- a/packages/@uppy/locales/src/sr_RS_Latin.ts +++ b/packages/@uppy/locales/src/sr_RS_Latin.ts @@ -143,9 +143,9 @@ sr_RS_Latin.strings = { openFolderNamed: 'Otvori folder %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.sr_RS_Latin = sr_RS_Latin } diff --git a/packages/@uppy/locales/src/sv_SE.ts b/packages/@uppy/locales/src/sv_SE.ts index 5f0a27b206..bb2a251056 100644 --- a/packages/@uppy/locales/src/sv_SE.ts +++ b/packages/@uppy/locales/src/sv_SE.ts @@ -244,9 +244,9 @@ sv_SE.strings = { zoomOut: 'Zooma ut', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.sv_SE = sv_SE } diff --git a/packages/@uppy/locales/src/th_TH.ts b/packages/@uppy/locales/src/th_TH.ts index 26eda6d50f..10ed4a16f4 100644 --- a/packages/@uppy/locales/src/th_TH.ts +++ b/packages/@uppy/locales/src/th_TH.ts @@ -166,9 +166,9 @@ th_TH.strings = { zoomOut: 'ซูมออก', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.th_TH = th_TH } diff --git a/packages/@uppy/locales/src/tr_TR.ts b/packages/@uppy/locales/src/tr_TR.ts index 2b9e1d5fc1..76b1d12f2c 100644 --- a/packages/@uppy/locales/src/tr_TR.ts +++ b/packages/@uppy/locales/src/tr_TR.ts @@ -141,9 +141,9 @@ tr_TR.strings = { openFolderNamed: 'Açık dosya %{name}', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.tr_TR = tr_TR } diff --git a/packages/@uppy/locales/src/uk_UA.ts b/packages/@uppy/locales/src/uk_UA.ts index 765503d1c8..9af66cf495 100644 --- a/packages/@uppy/locales/src/uk_UA.ts +++ b/packages/@uppy/locales/src/uk_UA.ts @@ -238,9 +238,9 @@ uk_UA.strings = { zoomOut: 'Зменшити', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.uk_UA = uk_UA } diff --git a/packages/@uppy/locales/src/uz_UZ.ts b/packages/@uppy/locales/src/uz_UZ.ts index dec5b451fb..6f344c55d4 100644 --- a/packages/@uppy/locales/src/uz_UZ.ts +++ b/packages/@uppy/locales/src/uz_UZ.ts @@ -221,9 +221,9 @@ uz_UZ.strings = { zoomOut: 'Kichraytirish', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.uz_UZ = uz_UZ } diff --git a/packages/@uppy/locales/src/vi_VN.ts b/packages/@uppy/locales/src/vi_VN.ts index a8f9a371d1..9b0265e0a6 100644 --- a/packages/@uppy/locales/src/vi_VN.ts +++ b/packages/@uppy/locales/src/vi_VN.ts @@ -224,9 +224,9 @@ vi_VN.strings = { zoomOut: 'Thu nhỏ', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.vi_VN = vi_VN } diff --git a/packages/@uppy/locales/src/zh_CN.ts b/packages/@uppy/locales/src/zh_CN.ts index 36cc140318..b7686b22a9 100644 --- a/packages/@uppy/locales/src/zh_CN.ts +++ b/packages/@uppy/locales/src/zh_CN.ts @@ -178,9 +178,9 @@ zh_CN.strings = { zoomOut: '缩小', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.zh_CN = zh_CN } diff --git a/packages/@uppy/locales/src/zh_TW.ts b/packages/@uppy/locales/src/zh_TW.ts index 764c963602..ee96d65f85 100644 --- a/packages/@uppy/locales/src/zh_TW.ts +++ b/packages/@uppy/locales/src/zh_TW.ts @@ -176,9 +176,9 @@ zh_TW.strings = { zoomOut: '縮小', } -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.zh_TW = zh_TW } diff --git a/packages/@uppy/locales/template.ts b/packages/@uppy/locales/template.ts index 3dabf0d3db..5aec61eb43 100644 --- a/packages/@uppy/locales/template.ts +++ b/packages/@uppy/locales/template.ts @@ -12,9 +12,9 @@ const en_US: Locale<0 | 1> = { en_US.strings = {} -// @ts-ignore untyped +// @ts-expect-error untyped if (typeof Uppy !== 'undefined') { - // @ts-ignore untyped + // @ts-expect-error untyped globalThis.Uppy.locales.en_US = en_US } diff --git a/packages/@uppy/status-bar/src/Components.tsx b/packages/@uppy/status-bar/src/Components.tsx index fdfdb5449f..3361fe1cb5 100644 --- a/packages/@uppy/status-bar/src/Components.tsx +++ b/packages/@uppy/status-bar/src/Components.tsx @@ -530,16 +530,17 @@ function ProgressBarError(props: ProgressBarErrorProps) {
    ) } + export { - UploadBtn, - RetryBtn, CancelBtn, - PauseResumeButton, DoneBtn, LoadingSpinner, - ProgressDetails, - ProgressBarProcessing, + PauseResumeButton, + ProgressBarComplete, ProgressBarError, + ProgressBarProcessing, ProgressBarUploading, - ProgressBarComplete, + ProgressDetails, + RetryBtn, + UploadBtn, } diff --git a/packages/@uppy/thumbnail-generator/src/index.ts b/packages/@uppy/thumbnail-generator/src/index.ts index 3492c7d780..a97efc2c45 100644 --- a/packages/@uppy/thumbnail-generator/src/index.ts +++ b/packages/@uppy/thumbnail-generator/src/index.ts @@ -2,7 +2,7 @@ import type { DefinePluginOpts, UIPluginOptions, Uppy } from '@uppy/core' import { UIPlugin } from '@uppy/core' import type { Body, LocalUppyFile, Meta, UppyFile } from '@uppy/utils' import { dataURItoBlob, isObjectURL, isPreviewSupported } from '@uppy/utils' -// @ts-ignore untyped +// @ts-expect-error untyped import { rotation } from 'exifr/dist/mini.esm.mjs' import packageJson from '../package.json' with { type: 'json' } import locale from './locale.js' diff --git a/packages/@uppy/transloadit/src/Assembly.ts b/packages/@uppy/transloadit/src/Assembly.ts index d98900ac16..f2b5c22e81 100644 --- a/packages/@uppy/transloadit/src/Assembly.ts +++ b/packages/@uppy/transloadit/src/Assembly.ts @@ -1,4 +1,4 @@ -// @ts-ignore untyped +// @ts-expect-error untyped import type { RateLimitedQueue, WrapPromiseFunctionType } from '@uppy/utils' import { fetchWithNetworkError, @@ -299,9 +299,7 @@ class TransloaditAssembly extends Emitter { const prevResults = prevResultsMap[stepName] ?? [] nextResults - .filter( - (n) => !prevResults || !prevResults.some((p) => p.id === n.id), - ) + .filter((n) => !prevResults?.some((p) => p.id === n.id)) .forEach((result) => { this.emit('result', stepName, result) }) diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index c54150cdd7..62a808b709 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -110,7 +110,6 @@ type PersistentState = { } declare module '@uppy/core' { - // biome-ignore lint/correctness/noUnusedVariables: must be defined export interface UppyEventMap { // We're also overriding the `restored` event as it is now populated with Transloadit state. restored: (pluginData: Record) => void @@ -191,7 +190,7 @@ function validateParams(params?: AssemblyOptions['params']): void { parsed = params } - if (!parsed.auth || !parsed.auth.key) { + if (!parsed.auth?.key) { throw new Error( 'Transloadit: The `params.auth.key` option is required. ' + 'You can find your Transloadit API key at https://transloadit.com/c/template-credentials', @@ -486,7 +485,9 @@ export default class Transloadit< // re-use the old one. See: https://github.com/transloadit/uppy/issues/4412 // and `onReceiveUploadUrl` in @uppy/tus const files = { ...this.uppy.getState().files } - filesFromAssembly.forEach((file) => delete files[file.id].tus) + filesFromAssembly.forEach((file) => { + delete files[file.id].tus + }) this.uppy.setState({ files }) this.uppy.emit('error', error) @@ -1080,11 +1081,9 @@ export default class Transloadit< } } -export { COMPANION_URL, COMPANION_ALLOWED_HOSTS } - // Re-export type from @transloadit/types so callers can import it from the plugin package. export type { AssemblyInstructionsInput } from '@transloadit/types' - // Low-level classes for advanced usage (e.g., creating assemblies without file uploads) export { default as Assembly } from './Assembly.js' export { AssemblyError, default as Client } from './Client.js' +export { COMPANION_ALLOWED_HOSTS, COMPANION_URL } diff --git a/packages/@uppy/tus/src/index.ts b/packages/@uppy/tus/src/index.ts index 95cf1bb19c..7eb00ebe79 100644 --- a/packages/@uppy/tus/src/index.ts +++ b/packages/@uppy/tus/src/index.ts @@ -222,9 +222,7 @@ export default class Tus extends BasePlugin< // Create a new tus upload return new Promise((resolve, reject) => { let queuedRequest: ReturnType - // biome-ignore lint/style/useConst: ... let qRequest: () => () => void - // biome-ignore lint/style/useConst: ... let upload: tus.Upload const opts = { diff --git a/packages/@uppy/utils/src/Translator.ts b/packages/@uppy/utils/src/Translator.ts index c43afbd017..b84ce01ec4 100644 --- a/packages/@uppy/utils/src/Translator.ts +++ b/packages/@uppy/utils/src/Translator.ts @@ -34,10 +34,11 @@ function insertReplacement( // can be JSX objects and will be otherwise incorrectly turned into strings. // Without this condition we’d get this: [object Object] hello [object Object] my