mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
meta: fix linter failures (#4029)
This commit is contained in:
parent
4bb99880b3
commit
70a4615a47
4 changed files with 11 additions and 76 deletions
|
|
@ -9,7 +9,7 @@ website/themes/uppy/source/js/smooth-scroll.min.js
|
|||
website/themes/uppy/source/js/uppy.js
|
||||
website/themes/uppy/source/uppy/**
|
||||
test/endtoend/*/build
|
||||
examples/dev/output
|
||||
examples/svelte-example/public/build/
|
||||
bundle-legacy.js
|
||||
website/src/_posts/201*.md
|
||||
website/src/_posts/2020-*.md
|
||||
|
|
|
|||
|
|
@ -162,9 +162,13 @@ const dashboardModal = new Uppy({
|
|||
})
|
||||
|
||||
dashboardModal.on('complete', ({ transloadit, successful, failed }) => {
|
||||
console.log(transloadit)
|
||||
console.log(successful)
|
||||
console.error(failed)
|
||||
if (failed?.length !== 0) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('it failed', failed)
|
||||
} else {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('success', { transloadit, successful })
|
||||
}
|
||||
})
|
||||
|
||||
function openModal () {
|
||||
|
|
|
|||
|
|
@ -1,70 +0,0 @@
|
|||
import { spawn } from 'node:child_process'
|
||||
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import livereload from 'rollup-plugin-livereload'
|
||||
import { terser } from 'rollup-plugin-terser'
|
||||
import css from 'rollup-plugin-css-only'
|
||||
|
||||
const production = !process.env.ROLLUP_WATCH
|
||||
|
||||
function serve () {
|
||||
let server
|
||||
|
||||
function toExit () {
|
||||
if (server) server.kill(0)
|
||||
}
|
||||
|
||||
return {
|
||||
writeBundle () {
|
||||
if (server) return
|
||||
server = spawn('npm', ['run', 'serve', '--', '--dev'], {
|
||||
stdio: ['ignore', 'inherit', 'inherit'],
|
||||
shell: true,
|
||||
})
|
||||
|
||||
process.on('SIGTERM', toExit)
|
||||
process.on('exit', toExit)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
input: 'main.js',
|
||||
output: {
|
||||
sourcemap: true,
|
||||
format: 'iife',
|
||||
name: 'app',
|
||||
file: 'bundle.js',
|
||||
},
|
||||
plugins: [
|
||||
// we'll extract any component CSS out into
|
||||
// a separate file - better for performance
|
||||
css({ output: 'uppy.min.css' }),
|
||||
|
||||
// If you have external dependencies installed from
|
||||
// npm, you'll most likely need these plugins. In
|
||||
// some cases you'll need additional configuration -
|
||||
// consult the documentation for details:
|
||||
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
||||
resolve({
|
||||
browser: true,
|
||||
}),
|
||||
commonjs(),
|
||||
|
||||
// In dev mode, call `npm run start` once
|
||||
// the bundle has been generated
|
||||
!production && serve(),
|
||||
|
||||
// Watch the `public` directory and refresh the
|
||||
// browser on changes when not in production
|
||||
!production && livereload('public'),
|
||||
|
||||
// If we're building for production (npm run build
|
||||
// instead of npm run dev), minify
|
||||
production && terser(),
|
||||
],
|
||||
watch: {
|
||||
clearScreen: false,
|
||||
},
|
||||
}
|
||||
|
|
@ -86,10 +86,11 @@ function FormFields (fields) {
|
|||
let isValueJSON = false
|
||||
if (value.startsWith('{') || value.startsWith('[')) {
|
||||
try {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
value = JSON.stringify(
|
||||
JSON.parse(value),
|
||||
null,
|
||||
2
|
||||
null,
|
||||
2,
|
||||
)
|
||||
isValueJSON = true
|
||||
} catch {
|
||||
Loading…
Add table
Add a link
Reference in a new issue