mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
lint fix
This commit is contained in:
parent
5407915b2b
commit
d82bbdbbfe
20 changed files with 18 additions and 37 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { randomUUID } from 'node:crypto'
|
||||
import { once } from 'node:events'
|
||||
import fs, { createReadStream, createWriteStream, ReadStream } from 'node:fs'
|
||||
import { createReadStream, createWriteStream, ReadStream } from 'node:fs'
|
||||
import { stat, unlink } from 'node:fs/promises'
|
||||
import { join } from 'node:path'
|
||||
import { pipeline } from 'node:stream/promises'
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ 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'
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ 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'
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import throttle from 'lodash/throttle.js'
|
|||
// @ts-ignore untyped
|
||||
import ee from 'namespace-emitter'
|
||||
import { nanoid } from 'nanoid/non-secure'
|
||||
import { h } from 'preact'
|
||||
import type { h } from 'preact'
|
||||
import packageJson from '../package.json' with { type: 'json' }
|
||||
import type BasePlugin from './BasePlugin.js'
|
||||
import getFileName from './getFileName.js'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { Body, Meta, State, UIPluginOptions, Uppy } from '@uppy/core'
|
||||
import { Component, type ComponentChild, h } from 'preact'
|
||||
import type { UIPluginOptions, Uppy } from '@uppy/core'
|
||||
import { Component, type ComponentChild } from 'preact'
|
||||
import FadeIn from './FadeIn.js'
|
||||
import TransitionGroup from './TransitionGroup.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ import type { Body, Meta, Uppy, UppyFile } from '@uppy/core'
|
|||
import type { I18n } from '@uppy/utils'
|
||||
import { emaFilter } from '@uppy/utils'
|
||||
import type { ComponentChild } from 'preact'
|
||||
import { Component, } from 'preact'
|
||||
import type { StatusBarOptions } from './StatusBarOptions.js'
|
||||
import { Component } from 'preact'
|
||||
import statusBarStates from './StatusBarStates.js'
|
||||
import StatusBarUI, { type StatusBarUIProps } from './StatusBarUI.js'
|
||||
|
||||
|
|
@ -63,16 +62,6 @@ function getUploadingState(
|
|||
return state
|
||||
}
|
||||
|
||||
const defaultOptions = {
|
||||
hideUploadButton: false,
|
||||
hideRetryButton: false,
|
||||
hidePauseResumeButton: false,
|
||||
hideCancelButton: false,
|
||||
hideProgressDetails: false,
|
||||
hideAfterFinish: true,
|
||||
doneButtonHandler: null,
|
||||
} satisfies StatusBarOptions
|
||||
|
||||
export default class StatusBar<
|
||||
M extends Meta,
|
||||
B extends Body,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ test('Upload, pause, and resume functionality', async () => {
|
|||
render('<div id="uppy"></div>')
|
||||
|
||||
let uploadResolve: (() => void) | null = null
|
||||
let uploadPromise = new Promise<void>((resolve) => {
|
||||
const uploadPromise = new Promise<void>((resolve) => {
|
||||
uploadResolve = resolve
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import {
|
|||
} from '@uppy/provider-views'
|
||||
import type { LocaleStrings } from '@uppy/utils'
|
||||
|
||||
|
||||
import packageJson from '../package.json' with { type: 'json' }
|
||||
import locale from './locale.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -39,12 +39,10 @@ en_US.strings = {
|
|||
authenticateWithTitle:
|
||||
'Please authenticate with %{pluginName} to select files',
|
||||
back: 'Back',
|
||||
browse: 'Browse',
|
||||
browseFiles: 'browse files',
|
||||
browseFolders: 'browse folders',
|
||||
cancel: 'Cancel',
|
||||
cancelUpload: 'Cancel upload',
|
||||
chooseFiles: 'Choose files',
|
||||
closeModal: 'Close Modal',
|
||||
companionError: 'Connection with Companion failed',
|
||||
companionUnauthorizeHint:
|
||||
|
|
@ -65,7 +63,6 @@ en_US.strings = {
|
|||
discardMediaFile: 'Discard Media',
|
||||
discardRecordedFile: 'Discard recorded file',
|
||||
done: 'Done',
|
||||
dropHereOr: 'Drop here or %{browse}',
|
||||
dropHint: 'Drop your files here',
|
||||
dropPasteBoth: 'Drop files here, %{browseFiles} or %{browseFolders}',
|
||||
dropPasteFiles: 'Drop files here or %{browseFiles}',
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
import type {
|
||||
UnknownPlugin,
|
||||
UnknownSearchProviderPlugin,
|
||||
UnknownSearchProviderPluginState,
|
||||
} from '@uppy/core'
|
||||
import type { UnknownPlugin } from '@uppy/core'
|
||||
import type {
|
||||
Body,
|
||||
CompanionClientProvider,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { h } from 'preact'
|
||||
import type { h } from 'preact'
|
||||
|
||||
// We're using a generic because languages have different plural rules.
|
||||
export interface Locale<T extends number = number> {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import type { Body, Meta } from '@uppy/core'
|
||||
import { Uppy } from '@uppy/core'
|
||||
import type { Body, Meta, Uppy } from '@uppy/core'
|
||||
import DashboardPlugin, { type DashboardOptions } from '@uppy/dashboard'
|
||||
import { defineComponent, h, type PropType, ref, watch } from 'vue'
|
||||
import useUppy from './useUppy.js'
|
||||
|
|
|
|||
|
|
@ -118,7 +118,9 @@ class CameraScreen extends Component<CameraScreenProps> {
|
|||
</div>
|
||||
) : (
|
||||
<video
|
||||
ref={(videoElement) => (this.videoElement = videoElement!)}
|
||||
ref={(videoElement) => {
|
||||
this.videoElement = videoElement!
|
||||
}}
|
||||
className={`uppy-Webcam-video ${
|
||||
mirror ? 'uppy-Webcam-video--mirrored' : ''
|
||||
}`}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import type { I18n } from '@uppy/utils'
|
||||
|
||||
|
||||
interface DiscardButtonProps {
|
||||
onDiscard: () => void
|
||||
i18n: I18n
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { I18n } from '@uppy/utils'
|
||||
import { type ComponentChild} from 'preact'
|
||||
import type { ComponentChild } from 'preact'
|
||||
|
||||
interface PermissionScreenProps {
|
||||
hasCamera: boolean
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import type { I18n } from '@uppy/utils'
|
||||
import { h } from 'preact'
|
||||
|
||||
interface RecordButtonProps {
|
||||
recording: boolean
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import type { I18n } from '@uppy/utils'
|
||||
import { h } from 'preact'
|
||||
import CameraIcon from './CameraIcon.js'
|
||||
|
||||
interface SnapshotButtonProps {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import type { I18n } from '@uppy/utils'
|
||||
import { h } from 'preact'
|
||||
|
||||
interface SubmitButtonProps {
|
||||
onSubmit: () => void
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@
|
|||
"@uppy/google-photos-picker": "workspace:^",
|
||||
"@uppy/image-editor": "workspace:^",
|
||||
"@uppy/instagram": "workspace:^",
|
||||
"@uppy/locales": "workspace:^",
|
||||
"@uppy/onedrive": "workspace:^",
|
||||
"@uppy/provider-views": "workspace:^",
|
||||
"@uppy/remote-sources": "workspace:^",
|
||||
"@uppy/locales": "workspace:^",
|
||||
"@uppy/screen-capture": "workspace:^",
|
||||
"@uppy/store-default": "workspace:^",
|
||||
"@uppy/thumbnail-generator": "workspace:^",
|
||||
|
|
|
|||
|
|
@ -9441,7 +9441,7 @@ __metadata:
|
|||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@uppy/locales@workspace:packages/@uppy/locales":
|
||||
"@uppy/locales@workspace:^, @uppy/locales@workspace:packages/@uppy/locales":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@uppy/locales@workspace:packages/@uppy/locales"
|
||||
dependencies:
|
||||
|
|
@ -23857,6 +23857,7 @@ __metadata:
|
|||
"@uppy/google-photos-picker": "workspace:^"
|
||||
"@uppy/image-editor": "workspace:^"
|
||||
"@uppy/instagram": "workspace:^"
|
||||
"@uppy/locales": "workspace:^"
|
||||
"@uppy/onedrive": "workspace:^"
|
||||
"@uppy/provider-views": "workspace:^"
|
||||
"@uppy/remote-sources": "workspace:^"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue