Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed May 5, 2024
1 parent 701f2eb commit fdc1662
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/@uppy/aws-s3-multipart/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ export default class AwsS3Multipart<
;(error as any).source = { status: 403 }
reject(error)
})
xhr.addEventListener('load', (ev) => {
xhr.addEventListener('load', () => {
cleanup()

if (
Expand Down
6 changes: 3 additions & 3 deletions packages/@uppy/dashboard/src/utils/copyToClipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function copyToClipboard(
document.body.appendChild(textArea)
textArea.select()

const magicCopyFailed = (cause?: unknown) => {
const magicCopyFailed = () => {
document.body.removeChild(textArea)
// eslint-disable-next-line no-alert
window.prompt(fallbackString, textToCopy)
Expand All @@ -44,13 +44,13 @@ export default function copyToClipboard(
try {
const successful = document.execCommand('copy')
if (!successful) {
return magicCopyFailed('copy command unavailable')
return magicCopyFailed()
}
document.body.removeChild(textArea)
return resolve()
} catch (err) {
document.body.removeChild(textArea)
return magicCopyFailed(err)
return magicCopyFailed()
}
})
}
2 changes: 1 addition & 1 deletion packages/@uppy/google-photos/src/GooglePhotos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class GooglePhotos<
> extends UIPlugin<GooglePhotosOptions, M, B, UnknownProviderPluginState> {
static VERSION = packageJson.version

icon: () => JSX.Element
icon: () => h.JSX.Element

provider: Provider<M, B>

Expand Down
4 changes: 4 additions & 0 deletions packages/@uppy/react/types/index.test-d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { useUppy } = components
const uppy = new Uppy()

{
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function TestComponent() {
return (
<components.Dashboard uppy={uppy} closeAfterFinish hideCancelButton />
Expand All @@ -27,6 +28,7 @@ const uppy = new Uppy()
}

{
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const el = (
<components.DragDrop
width={200}
Expand All @@ -47,6 +49,7 @@ const uppy = new Uppy()
}

{
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const el = (
<components.DashboardModal
target="body"
Expand All @@ -64,6 +67,7 @@ const uppy = new Uppy()
}

{
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function TestHook() {
expectType<Uppy>(useUppy(() => uppy))
expectType<Uppy>(useUppy(() => new Uppy()))
Expand Down
4 changes: 2 additions & 2 deletions packages/@uppy/utils/src/VirtualList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const STYLE_CONTENT = {
type Props<T> = Omit<HTMLAttributes<HTMLDivElement>, 'data'> & {
data: T[]
rowHeight: number
renderRow: (item: T) => JSX.Element
renderRow: (item: T) => h.JSX.Element
// eslint-disable-next-line react/require-default-props
overscanCount?: number | undefined
}
Expand Down Expand Up @@ -133,7 +133,7 @@ class VirtualList<T> extends Component<
renderRow,
overscanCount = 10,
...props
}: Props<T>): JSX.Element {
}: Props<T>): h.JSX.Element {
const { offset, height } = this.state
// first visible row index
let start = Math.floor(offset / rowHeight)
Expand Down

0 comments on commit fdc1662

Please sign in to comment.