diff --git a/.vscode/uppy.code-workspace b/.vscode/uppy.code-workspace
index 6666e589a..918de6b36 100644
--- a/.vscode/uppy.code-workspace
+++ b/.vscode/uppy.code-workspace
@@ -1,29 +1,29 @@
{
- "folders": [
- {
- "path": ".."
- }
- ],
- "settings": {
- "workbench.colorCustomizations": {
- "titleBar.activeForeground": "#ffffff",
- "titleBar.activeBackground": "#ff009d",
- },
- "search.exclude": {
- "website/public/": true,
- "node_modules/": true,
- "website/node_modules/": true,
- "dist/": true,
- "lib/": true,
- "package-lock.json": true,
- "website/package-lock.json": true,
- "yarn-error.log": true,
- "website/.deploy_git": true,
- "npm-debug.log": true,
- "website/npm-debug.log": true,
- "website/debug.log": true,
- "nohup.out": true,
- "yarn.lock": true
- }
- }
+ "folders": [
+ {
+ "path": "..",
+ },
+ ],
+ "settings": {
+ "workbench.colorCustomizations": {
+ "titleBar.activeForeground": "#ffffff",
+ "titleBar.activeBackground": "#ff009d",
+ },
+ "search.exclude": {
+ "website/public/": true,
+ "node_modules/": true,
+ "website/node_modules/": true,
+ "dist/": true,
+ "lib/": true,
+ "package-lock.json": true,
+ "website/package-lock.json": true,
+ "yarn-error.log": true,
+ "website/.deploy_git": true,
+ "npm-debug.log": true,
+ "website/npm-debug.log": true,
+ "website/debug.log": true,
+ "nohup.out": true,
+ "yarn.lock": true,
+ },
+ },
}
diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json
index 805336a76..935e90ca6 100644
--- a/e2e/tsconfig.json
+++ b/e2e/tsconfig.json
@@ -4,7 +4,7 @@
"noEmit": true,
"target": "es2020",
"lib": ["es2020", "dom"],
- "types": ["cypress"]
+ "types": ["cypress"],
},
- "include": ["cypress/**/*.ts"]
+ "include": ["cypress/**/*.ts"],
}
diff --git a/examples/angular-example/src/app/app.component.html b/examples/angular-example/src/app/app.component.html
index 36092f8cb..caa8e7d7d 100644
--- a/examples/angular-example/src/app/app.component.html
+++ b/examples/angular-example/src/app/app.component.html
@@ -717,8 +717,8 @@
ng generate component xyz
-
ng add @angular/material
-
ng add @angular/pwa
+
ng add @angular/material
+
ng add @angular/pwa
ng add _____
ng test
ng build
diff --git a/examples/angular-example/tsconfig.json b/examples/angular-example/tsconfig.json
index 1301bf238..8901ce8c6 100644
--- a/examples/angular-example/tsconfig.json
+++ b/examples/angular-example/tsconfig.json
@@ -19,12 +19,12 @@
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
- "lib": ["ES2022", "dom"]
+ "lib": ["ES2022", "dom"],
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
- "strictTemplates": true
- }
+ "strictTemplates": true,
+ },
}
diff --git a/examples/svelte-example/tsconfig.json b/examples/svelte-example/tsconfig.json
index 47bdb60e9..67689d1f8 100644
--- a/examples/svelte-example/tsconfig.json
+++ b/examples/svelte-example/tsconfig.json
@@ -3,5 +3,5 @@
"compilerOptions": {},
"esModuleInterop": true,
"include": ["src/**/*"],
- "exclude": ["node_modules/*", "__sapper__/*", "public/*"]
+ "exclude": ["node_modules/*", "__sapper__/*", "public/*"],
}
diff --git a/package.json b/package.json
index 1dc6c8be4..283f3f5b8 100644
--- a/package.json
+++ b/package.json
@@ -7,10 +7,10 @@
"*.{js,mjs,cjs,jsx}": "eslint --fix",
"*.{ts,mts,cts,tsx}": [
"eslint --fix",
- "prettier -w",
+ "prettier --experimental-ternaries -w",
"eslint"
],
- "*.{css,html,json,scss,vue,yaml,yml}": "prettier -w",
+ "*.{css,html,json,scss,vue,yaml,yml}": "prettier --experimental-ternaries -w",
"*.md": [
"remark --silently-ignore -i .remarkignore -foq",
"eslint --fix"
@@ -135,10 +135,10 @@
"lint:css": "stylelint ./packages/**/*.scss",
"lint:css:fix": "stylelint ./packages/**/*.scss --fix",
"lint": "eslint . --cache",
- "format:show-diff": "git diff --quiet || (echo 'Unable to show a diff because there are unstaged changes'; false) && (prettier . -w --loglevel silent && git --no-pager diff; git restore .)",
- "format:check": "prettier -c .",
+ "format:show-diff": "git diff --quiet || (echo 'Unable to show a diff because there are unstaged changes'; false) && (prettier . --experimental-ternaries -w --loglevel silent && git --no-pager diff; git restore .)",
+ "format:check": "prettier --experimental-ternaries -c .",
"format:check-diff": "yarn format:check || (yarn format:show-diff && false)",
- "format": "prettier -w .",
+ "format": "prettier --experimental-ternaries -w .",
"release": "PACKAGES=$(yarn workspaces list --json) yarn workspace @uppy-dev/release interactive",
"size": "echo 'JS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.js | gzip | wc -c && echo 'CSS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.css | gzip | wc -c",
"e2e": "yarn build:clean && yarn build && yarn e2e:skip-build",
diff --git a/packages/@uppy/angular/tsconfig.json b/packages/@uppy/angular/tsconfig.json
index ccfa195bc..fb2230233 100644
--- a/packages/@uppy/angular/tsconfig.json
+++ b/packages/@uppy/angular/tsconfig.json
@@ -3,7 +3,7 @@
"compileOnSave": false,
"compilerOptions": {
"paths": {
- "@uppy/angular": ["dist/uppy/angular"]
+ "@uppy/angular": ["dist/uppy/angular"],
},
"baseUrl": "./",
"outDir": "./dist/out-tsc",
@@ -22,12 +22,12 @@
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
- "lib": ["ES2022", "dom"]
+ "lib": ["ES2022", "dom"],
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
- "strictTemplates": true
- }
+ "strictTemplates": true,
+ },
}
diff --git a/packages/@uppy/audio/src/PermissionsScreen.tsx b/packages/@uppy/audio/src/PermissionsScreen.tsx
index 89b0dede8..50a15fb2c 100644
--- a/packages/@uppy/audio/src/PermissionsScreen.tsx
+++ b/packages/@uppy/audio/src/PermissionsScreen.tsx
@@ -16,9 +16,9 @@ export default (props: PermissionsScreenProps): JSX.Element => {
{hasAudio ? i18n('allowAudioAccessTitle') : i18n('noAudioTitle')}
- {hasAudio
- ? i18n('allowAudioAccessDescription')
- : i18n('noAudioDescription')}
+ {hasAudio ?
+ i18n('allowAudioAccessDescription')
+ : i18n('noAudioDescription')}
)
diff --git a/packages/@uppy/audio/src/RecordingScreen.tsx b/packages/@uppy/audio/src/RecordingScreen.tsx
index b9fb87231..5b82fbbd8 100644
--- a/packages/@uppy/audio/src/RecordingScreen.tsx
+++ b/packages/@uppy/audio/src/RecordingScreen.tsx
@@ -91,11 +91,9 @@ export default function RecordingScreen(
return (
- {hasRecordedAudio ? (
+ {hasRecordedAudio ?
- ) : (
-
- )}
+ :
}
diff --git a/packages/@uppy/audio/src/audio-oscilloscope/index.ts b/packages/@uppy/audio/src/audio-oscilloscope/index.ts
index fa985517b..f60b05406 100644
--- a/packages/@uppy/audio/src/audio-oscilloscope/index.ts
+++ b/packages/@uppy/audio/src/audio-oscilloscope/index.ts
@@ -75,9 +75,11 @@ export default class AudioOscilloscope {
this.canvasContext.strokeStyle =
result(canvasContextOptions.strokeStyle) || 'rgb(0, 0, 0)'
this.canvasContext.lineWidth = result(canvasContextOptions.lineWidth) || 1
- this.onDrawFrame = isFunction(options.onDrawFrame)
- ? options.onDrawFrame
- : () => {} // eslint-disable-line @typescript-eslint/no-empty-function
+ this.onDrawFrame =
+ isFunction(options.onDrawFrame) ?
+ options.onDrawFrame
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
+ : () => {}
}
addSource(streamSource: MediaStreamAudioSourceNode): void {
diff --git a/packages/@uppy/audio/tsconfig.json b/packages/@uppy/audio/tsconfig.json
index 335ddda84..a76c3b714 100644
--- a/packages/@uppy/audio/tsconfig.json
+++ b/packages/@uppy/audio/tsconfig.json
@@ -6,16 +6,16 @@
"paths": {
"@uppy/utils/lib/*": ["../utils/src/*"],
"@uppy/core": ["../core/src/index.js"],
- "@uppy/core/lib/*": ["../core/src/*"]
- }
+ "@uppy/core/lib/*": ["../core/src/*"],
+ },
},
"include": ["./package.json", "./src/**/*.*"],
"references": [
{
- "path": "../utils/tsconfig.build.json"
+ "path": "../utils/tsconfig.build.json",
},
{
- "path": "../core/tsconfig.build.json"
- }
- ]
+ "path": "../core/tsconfig.build.json",
+ },
+ ],
}
diff --git a/packages/@uppy/companion/tsconfig.json b/packages/@uppy/companion/tsconfig.json
index ac532cc3d..ba8d444ff 100644
--- a/packages/@uppy/companion/tsconfig.json
+++ b/packages/@uppy/companion/tsconfig.json
@@ -9,7 +9,7 @@
"sourceMap": false,
"allowJs": true,
"checkJs": true,
- "noEmitOnError": true
+ "noEmitOnError": true,
},
- "include": ["src/**/*"]
+ "include": ["src/**/*"],
}
diff --git a/packages/@uppy/core/src/Uppy.test.ts b/packages/@uppy/core/src/Uppy.test.ts
index 4d097f026..7b6ab8e85 100644
--- a/packages/@uppy/core/src/Uppy.test.ts
+++ b/packages/@uppy/core/src/Uppy.test.ts
@@ -1273,9 +1273,9 @@ describe('src/Core', () => {
core
.upload()
.then((r) =>
- typeof r!.uploadID === 'string' && r!.uploadID.length === 21
- ? { ...r, uploadID: 'cjd09qwxb000dlql4tp4doz8h' }
- : r,
+ typeof r!.uploadID === 'string' && r!.uploadID.length === 21 ?
+ { ...r, uploadID: 'cjd09qwxb000dlql4tp4doz8h' }
+ : r,
),
).resolves.toMatchSnapshot()
})
diff --git a/packages/@uppy/core/src/Uppy.ts b/packages/@uppy/core/src/Uppy.ts
index 384aa6f6d..dacfbf295 100644
--- a/packages/@uppy/core/src/Uppy.ts
+++ b/packages/@uppy/core/src/Uppy.ts
@@ -835,15 +835,14 @@ export class Uppy
{
// If the actual File object is passed from input[type=file] or drag-drop,
// we normalize it to match Uppy file object
const file = (
- fileDescriptorOrFile instanceof File
- ? {
- name: fileDescriptorOrFile.name,
- type: fileDescriptorOrFile.type,
- size: fileDescriptorOrFile.size,
- data: fileDescriptorOrFile,
- }
- : fileDescriptorOrFile
- ) as UppyFile
+ fileDescriptorOrFile instanceof File ?
+ {
+ name: fileDescriptorOrFile.name,
+ type: fileDescriptorOrFile.type,
+ size: fileDescriptorOrFile.size,
+ data: fileDescriptorOrFile,
+ }
+ : fileDescriptorOrFile) as UppyFile
const fileType = getFileType(file)
const fileName = getFileName(fileType, file)
@@ -1334,8 +1333,9 @@ export class Uppy {
...fileInState.progress,
bytesUploaded: data.bytesUploaded,
bytesTotal: data.bytesTotal,
- percentage: canHavePercentage
- ? Math.round((data.bytesUploaded / data.bytesTotal) * 100)
+ percentage:
+ canHavePercentage ?
+ Math.round((data.bytesUploaded / data.bytesTotal) * 100)
: 0,
},
})
@@ -1527,11 +1527,11 @@ export class Uppy {
progress: {
...currentProgress,
postprocess:
- this.#postProcessors.size > 0
- ? {
- mode: 'indeterminate',
- }
- : undefined,
+ this.#postProcessors.size > 0 ?
+ {
+ mode: 'indeterminate',
+ }
+ : undefined,
uploadComplete: true,
percentage: 100,
bytesUploaded: currentProgress.bytesTotal,
diff --git a/packages/@uppy/core/tsconfig.json b/packages/@uppy/core/tsconfig.json
index a23d8f86e..e5d13ad81 100644
--- a/packages/@uppy/core/tsconfig.json
+++ b/packages/@uppy/core/tsconfig.json
@@ -6,16 +6,16 @@
"paths": {
"@uppy/store-default": ["../store-default/src/index.js"],
"@uppy/store-default/lib/*": ["../store-default/src/*"],
- "@uppy/utils/lib/*": ["../utils/src/*"]
- }
+ "@uppy/utils/lib/*": ["../utils/src/*"],
+ },
},
"include": ["./package.json", "./src/**/*.*"],
"references": [
{
- "path": "../store-default/tsconfig.build.json"
+ "path": "../store-default/tsconfig.build.json",
},
{
- "path": "../utils/tsconfig.build.json"
- }
- ]
+ "path": "../utils/tsconfig.build.json",
+ },
+ ],
}
diff --git a/packages/@uppy/image-editor/tsconfig.json b/packages/@uppy/image-editor/tsconfig.json
index ca20127b2..96370efb3 100644
--- a/packages/@uppy/image-editor/tsconfig.json
+++ b/packages/@uppy/image-editor/tsconfig.json
@@ -6,16 +6,16 @@
"paths": {
"@uppy/utils/lib/*": ["../utils/src/*"],
"@uppy/core": ["../core/src/"],
- "@uppy/core/lib/*": ["../core/src/*"]
- }
+ "@uppy/core/lib/*": ["../core/src/*"],
+ },
},
"include": ["./package.json", "./src/**/*.*"],
"references": [
{
- "path": "../utils/tsconfig.build.json"
+ "path": "../utils/tsconfig.build.json",
},
{
- "path": "../core/tsconfig.build.json"
- }
- ]
+ "path": "../core/tsconfig.build.json",
+ },
+ ],
}
diff --git a/packages/@uppy/locales/tsconfig.json b/packages/@uppy/locales/tsconfig.json
index f8a97e427..ce1879aac 100644
--- a/packages/@uppy/locales/tsconfig.json
+++ b/packages/@uppy/locales/tsconfig.json
@@ -3,14 +3,14 @@
"compilerOptions": {
"emitDeclarationOnly": false,
"paths": {
- "@uppy/utils/lib/*": ["../utils/src/*"]
+ "@uppy/utils/lib/*": ["../utils/src/*"],
},
- "noEmit": true
+ "noEmit": true,
},
"include": ["./package.json", "./src/**/*.*"],
"references": [
{
- "path": "../utils/tsconfig.build.json"
- }
- ]
+ "path": "../utils/tsconfig.build.json",
+ },
+ ],
}
diff --git a/packages/@uppy/status-bar/src/Components.tsx b/packages/@uppy/status-bar/src/Components.tsx
index 81c845ae8..5890a36c6 100644
--- a/packages/@uppy/status-bar/src/Components.tsx
+++ b/packages/@uppy/status-bar/src/Components.tsx
@@ -47,9 +47,9 @@ function UploadBtn(
)
const uploadBtnText =
- newFiles && isUploadStarted && !recoveredState
- ? i18n('uploadXNewFiles', { smart_count: newFiles })
- : i18n('uploadXFiles', { smart_count: newFiles })
+ newFiles && isUploadStarted && !recoveredState ?
+ i18n('uploadXNewFiles', { smart_count: newFiles })
+ : i18n('uploadXFiles', { smart_count: newFiles })
return (