From cfb5564830549d4403f89a6de69c44485eaba66b Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sat, 17 Aug 2024 15:45:52 +0200 Subject: [PATCH] Formatting with trailing comma --- .prettierrc | 2 +- eslint.config.js | 16 ++++++++-------- renovate.json5 | 2 +- src/hooks.server.ts | 4 ++-- src/lib/index.ts | 2 +- src/routes/+page.server.ts | 4 ++-- src/routes/+page.svelte | 2 +- svelte.config.js | 4 ++-- vite.config.ts | 10 +++++----- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.prettierrc b/.prettierrc index 9573023..5b91da1 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,7 +1,7 @@ { "useTabs": true, "singleQuote": true, - "trailingComma": "none", + "trailingComma": "es5", "printWidth": 100, "plugins": ["prettier-plugin-svelte"], "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] diff --git a/eslint.config.js b/eslint.config.js index a351fa9..48d7020 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -15,19 +15,19 @@ export default [ languageOptions: { globals: { ...globals.browser, - ...globals.node - } - } + ...globals.node, + }, + }, }, { files: ['**/*.svelte'], languageOptions: { parserOptions: { - parser: ts.parser - } - } + parser: ts.parser, + }, + }, }, { - ignores: ['build/', '.svelte-kit/', 'dist/'] - } + ignores: ['build/', '.svelte-kit/', 'dist/'], + }, ]; diff --git a/renovate.json5 b/renovate.json5 index afea8b6..9e6f8d5 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -1,4 +1,4 @@ { $schema: 'https://docs.renovatebot.com/renovate-schema.json', - extends: ['local>renovate-bot/renovate-config'] + extends: ['local>renovate-bot/renovate-config'], } diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 62c9c64..d00e364 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -17,7 +17,7 @@ export async function handle({ event, resolve }) { route: event.route.id, method: event.request.method, userAgent: event.request.headers.get('user-agent'), - clientIP: event.getClientAddress() + clientIP: event.getClientAddress(), }; if (fromRequest) { log.trace(context, 'using incomming request-id'); @@ -36,7 +36,7 @@ export async function handle({ event, resolve }) { executionTime: `${executionTime}ms`, status: response.status, size: response.headers.get('content-length'), - ...context + ...context, }, 'finished request' ); diff --git a/src/lib/index.ts b/src/lib/index.ts index 3106804..7cee25d 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -6,7 +6,7 @@ import type { MaybePromise } from '@sveltejs/kit'; export const log = bunyan.createLogger({ name: 'fotochallenge', level: process.env.NODE_ENV === 'production' ? 'info' : 'debug', - src: true + src: true, }); function safePath(basePath: string, name: string): boolean { diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index a6327cf..ec4886c 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -69,7 +69,7 @@ export const actions = { }); return { - success: true + success: true, }; - } + }, }; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4e6ab66..02ec5e5 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -13,7 +13,7 @@ const siPrefixes = new Map([ [1_000_000, 'M'], - [1_000, 'k'] + [1_000, 'k'], ]); const fileSize = (files: FileList) => { const size = Array.from(files) diff --git a/svelte.config.js b/svelte.config.js index fffb849..81b6825 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -11,8 +11,8 @@ const config = { // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. // If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter() - } + adapter: adapter(), + }, }; export default config; diff --git a/vite.config.ts b/vite.config.ts index 2a8dca3..feb4d8d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,14 +5,14 @@ export default defineConfig({ plugins: [sveltekit()], test: { - include: ['src/**/*.{test,spec}.{js,ts}'] + include: ['src/**/*.{test,spec}.{js,ts}'], }, css: { preprocessorOptions: { scss: { - additionalData: '@use "src/variables.scss" as *;' - } - } - } + additionalData: '@use "src/variables.scss" as *;', + }, + }, + }, });