From 71ed8c7c1fbc7603d342bb939df45031b5f16cab Mon Sep 17 00:00:00 2001 From: JulienMaille <182520+JulienMaille@users.noreply.github.com> Date: Sun, 8 Mar 2026 19:04:57 +0000 Subject: [PATCH] style: auto-fix linting issues --- index.html | 679 ++++++++++++++++++++++-------------------- styles.css | 2 +- vite-plugin-upload.js | 22 +- 3 files changed, 369 insertions(+), 334 deletions(-) diff --git a/index.html b/index.html index 15a4a67..c7d47ce 100644 --- a/index.html +++ b/index.html @@ -3876,7 +3876,9 @@
diff --git a/styles.css b/styles.css index a26c52f..adc1425 100644 --- a/styles.css +++ b/styles.css @@ -7646,7 +7646,7 @@ textarea:focus { left: 0; z-index: 0; mask-image: linear-gradient(to bottom, rgb(0, 0, 0, 1) 50%, rgb(0, 0, 0, 0)); - -webkit-mask-image: linear-gradient(to bottom, rgb(0, 0, 0, 1) 50%, rgb(0, 0, 0, 0)); + mask-image: linear-gradient(to bottom, rgb(0, 0, 0, 1) 50%, rgb(0, 0, 0, 0)); } .profile-info-section { diff --git a/vite-plugin-upload.js b/vite-plugin-upload.js index 911d3b6..87c30bc 100644 --- a/vite-plugin-upload.js +++ b/vite-plugin-upload.js @@ -9,11 +9,11 @@ export default function uploadPlugin() { const handler = async (req, res, next) => { if (req.url === '/upload' && req.method === 'POST') { const form = formidable({}); - + try { const [_fields, files] = await form.parse(req); const uploadedFile = files.file?.[0]; - + if (!uploadedFile) { res.statusCode = 400; res.end(JSON.stringify({ success: false, error: 'No file provided' })); @@ -26,7 +26,7 @@ export default function uploadPlugin() { let url; if (useR2) { - // We could implement R2 upload here too, but for simplicity in dev + // We could implement R2 upload here too, but for simplicity in dev // we'll stick to catbox unless specifically requested to match R2 perfectly. // However, to be helpful, let's at least mention it. console.log('R2 upload detected in env, but dev plugin is using catbox fallback for now.'); @@ -35,7 +35,11 @@ export default function uploadPlugin() { // Forward to catbox.moe (default production behavior when R2 is disabled) const formData = new FormData(); formData.append('reqtype', 'fileupload'); - formData.append('fileToUpload', new Blob([fileData], { type: uploadedFile.mimetype }), uploadedFile.originalFilename); + formData.append( + 'fileToUpload', + new Blob([fileData], { type: uploadedFile.mimetype }), + uploadedFile.originalFilename + ); const response = await fetch('https://catbox.moe/user/api.php', { method: 'POST', @@ -49,10 +53,12 @@ export default function uploadPlugin() { } res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify({ - success: true, - url: url.trim(), - })); + res.end( + JSON.stringify({ + success: true, + url: url.trim(), + }) + ); } catch (err) { console.error('Local upload error:', err); res.statusCode = 500;