Skip to content

Commit 9194c4e

Browse files
committed
fix: normalize check script
1 parent a678245 commit 9194c4e

File tree

10 files changed

+104
-236
lines changed

10 files changed

+104
-236
lines changed

infrastructure/control-panel/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ Thumbs.db
2222
vite.config.js.timestamp-*
2323
vite.config.ts.timestamp-*
2424

25+
# Paraglide
26+
src/lib/paraglide
27+
2528
*storybook.log
2629
storybook-static
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"extends": ["../../biome.json"],
4+
"organizeImports": {
5+
"include": ["src/**/*.ts", "src/**/*.svelte"]
6+
},
7+
"files": {
8+
"ignore": ["src/lib/paraglide/*"]
9+
}
10+
}

infrastructure/control-panel/package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
"build": "vite build",
99
"preview": "vite preview",
1010
"prepare": "svelte-kit sync || echo ''",
11-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11+
"check": "pnpm exec biome check ./src",
1212
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
13-
"format": "prettier --write .",
14-
"lint": "prettier --check . && eslint .",
13+
"format": "pnpm exec biome format --write ./src",
14+
"check-format": "pnpm exec biome format ./src",
15+
"lint": "pnpm exec biome lint --write ./src",
16+
"check-lint": "pnpm exec biome lint ./src",
1517
"storybook": "storybook dev -p 6006",
1618
"build-storybook": "storybook build"
1719
},
1820
"devDependencies": {
21+
"@biomejs/biome": "1.9.4",
1922
"@eslint/compat": "^1.2.5",
2023
"@eslint/js": "^9.18.0",
2124
"@storybook/addon-svelte-csf": "^5.0.7",
@@ -25,14 +28,7 @@
2528
"@sveltejs/vite-plugin-svelte": "^6.0.0",
2629
"@tailwindcss/vite": "^4.0.0",
2730
"@types/node": "^22",
28-
"eslint": "^9.18.0",
29-
"eslint-config-prettier": "^10.0.1",
30-
"eslint-plugin-storybook": "^9.0.17",
31-
"eslint-plugin-svelte": "^3.0.0",
3231
"globals": "^16.0.0",
33-
"prettier": "^3.4.2",
34-
"prettier-plugin-svelte": "^3.3.3",
35-
"prettier-plugin-tailwindcss": "^0.6.11",
3632
"storybook": "^9.0.17",
3733
"svelte": "^5.0.0",
3834
"svelte-check": "^4.0.0",
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
@import 'tailwindcss';
1+
@import "tailwindcss";
22

33
@theme {
4-
/* Custom theme */
5-
--color-primary: #8e52ff;
6-
--color-primary-100: #e8dcff;
7-
--color-primary-200: #d2baff;
8-
--color-primary-300: #bb97ff;
9-
--color-primary-400: #a575ff;
10-
--color-primary-500: #8e52ff;
4+
/* Custom theme */
5+
--color-primary: #8e52ff;
6+
--color-primary-100: #e8dcff;
7+
--color-primary-200: #d2baff;
8+
--color-primary-300: #bb97ff;
9+
--color-primary-400: #a575ff;
10+
--color-primary-500: #8e52ff;
1111

12-
--color-secondary: #73efd5;
13-
--color-secondary-100: #e3fcf7;
14-
--color-secondary-200: #c7f9ee;
15-
--color-secondary-300: #abf6e6;
16-
--color-secondary-400: #8ff2dd;
17-
--color-secondary-500: #73efd5;
12+
--color-secondary: #73efd5;
13+
--color-secondary-100: #e3fcf7;
14+
--color-secondary-200: #c7f9ee;
15+
--color-secondary-300: #abf6e6;
16+
--color-secondary-400: #8ff2dd;
17+
--color-secondary-500: #73efd5;
1818

19-
--color-white: #ffffff;
20-
--color-gray: #f5f5f5;
19+
--color-white: #ffffff;
20+
--color-gray: #f5f5f5;
2121

22-
--color-black: #1f1f1f;
23-
--color-black-100: #d2d2d2;
24-
--color-black-300: #a5a5a5;
25-
--color-black-500: #797979;
26-
--color-black-700: #4c4c4c;
27-
--color-black-900: #1f1f1f;
22+
--color-black: #1f1f1f;
23+
--color-black-100: #d2d2d2;
24+
--color-black-300: #a5a5a5;
25+
--color-black-500: #797979;
26+
--color-black-700: #4c4c4c;
27+
--color-black-900: #1f1f1f;
2828

29-
--color-danger: #ff5255;
30-
--color-danger-100: #ffdcdd;
31-
--color-danger-200: #ffb1a7;
32-
--color-danger-300: #ff968e;
33-
--color-danger-400: #ff7b77;
34-
--color-danger-500: #ff5255;
29+
--color-danger: #ff5255;
30+
--color-danger-100: #ffdcdd;
31+
--color-danger-200: #ffb1a7;
32+
--color-danger-300: #ff968e;
33+
--color-danger-400: #ff7b77;
34+
--color-danger-500: #ff5255;
3535
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// See https://svelte.dev/docs/kit/types#app.d.ts
22
// for information about these interfaces
33
declare global {
4-
namespace App {
5-
// interface Error {}
6-
// interface Locals {}
7-
// interface PageData {}
8-
// interface PageState {}
9-
// interface Platform {}
10-
}
4+
namespace App {
5+
// interface Error {}
6+
// interface Locals {}
7+
// interface PageData {}
8+
// interface PageState {}
9+
// interface Platform {}
10+
}
1111
}
1212

1313
export {};
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
import type { Handle } from '@sveltejs/kit';
2-
import { paraglideMiddleware } from '$lib/paraglide/server';
1+
import { paraglideMiddleware } from "$lib/paraglide/server";
2+
import type { Handle } from "@sveltejs/kit";
33

44
const handleParaglide: Handle = ({ event, resolve }) =>
5-
paraglideMiddleware(event.request, ({ request, locale }) => {
6-
event.request = request;
5+
paraglideMiddleware(event.request, ({ request, locale }) => {
6+
event.request = request;
77

8-
return resolve(event, {
9-
transformPageChunk: ({ html }) => html.replace('%paraglide.lang%', locale)
10-
});
11-
});
8+
return resolve(event, {
9+
transformPageChunk: ({ html }) =>
10+
html.replace("%paraglide.lang%", locale),
11+
});
12+
});
1213

1314
export const handle: Handle = handleParaglide;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { deLocalizeUrl } from '$lib/paraglide/runtime';
1+
import { deLocalizeUrl } from "$lib/paraglide/runtime";
22

33
export const reroute = (request) => deLocalizeUrl(request.url).pathname;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
2-
import '../app.css';
2+
import "../app.css";
33
4-
let { children } = $props();
4+
let { children } = $props();
55
</script>
66

77
{@render children()}

infrastructure/control-panel/src/routes/demo/paraglide/+page.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts">
2-
import { setLocale } from '$lib/paraglide/runtime';
3-
import { page } from '$app/state';
4-
import { goto } from '$app/navigation';
5-
import { m } from '$lib/paraglide/messages.js';
2+
import { goto } from "$app/navigation";
3+
import { page } from "$app/state";
4+
import { m } from "$lib/paraglide/messages.js";
5+
import { setLocale } from "$lib/paraglide/runtime";
66
</script>
77

88
<h1>{m.hello_world({ name: 'SvelteKit User' })}</h1>

0 commit comments

Comments
 (0)