Skip to content

Commit 6033e45

Browse files
authored
feat: workflows (#64)
* feat: workflows * fix: node version * fix: use pnpm 10 * fix: check message
1 parent 4345d2c commit 6033e45

34 files changed

+431
-291
lines changed

.github/workflows/check-code.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Check Code"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "dev"
8+
- "main"
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22.x
20+
21+
- name: Install Dependencies
22+
run: |
23+
echo "installing pnpm"
24+
npm install -g pnpm
25+
echo "installing deps for packages"
26+
pnpm i
27+
28+
- name: Check Code
29+
run: pnpm check

.github/workflows/check-format.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Check Format"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "dev"
8+
- "main"
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22.x
20+
21+
- name: Install Dependencies
22+
run: |
23+
echo "installing pnpm"
24+
npm install -g pnpm
25+
echo "installing deps for packages"
26+
pnpm i
27+
28+
- name: Check Format
29+
run: pnpm check-format

.github/workflows/check-lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Check Lint"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "dev"
8+
- "main"
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22.x
20+
21+
- name: Install Dependencies
22+
run: |
23+
echo "installing pnpm"
24+
npm install -g pnpm
25+
echo "installing deps for packages"
26+
pnpm i
27+
28+
- name: Check Lint
29+
run: pnpm check-lint

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.13.1
1+
22.x
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"overrides": [
4+
{
5+
"include": ["*.svelte", "*.astro", "*.vue"],
6+
"linter": {
7+
"rules": {
8+
"style": {
9+
"useConst": "off",
10+
"useImportType": "off"
11+
}
12+
}
13+
}
14+
}
15+
]
16+
}

infrastructure/eid-wallet/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@
77
"dev": "vite dev",
88
"build": "vite build",
99
"preview": "vite preview",
10-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
10+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && npx @biomejs/biome check ./src",
1111
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12+
"format": "npx @biomejs/biome format --write ./src",
13+
"check-format": "npx @biomejs/biome format ./src",
14+
"lint": "npx @biomejs/biome lint --write ./src",
15+
"check-lint": "npx @biomejs/biome lint ./src",
1216
"tauri": "tauri",
1317
"storybook": "svelte-kit sync && storybook dev -p 6006",
1418
"build-storybook": "storybook build"
1519
},
1620
"license": "MIT",
1721
"dependencies": {
22+
"@biomejs/biome": "^1.9.4",
1823
"@hugeicons/core-free-icons": "^1.0.13",
1924
"@hugeicons/svelte": "^1.0.2",
2025
"@tailwindcss/container-queries": "^0.1.1",

infrastructure/eid-wallet/src/app.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
@import 'tailwindcss';
2-
@import 'flag-icons/css/flag-icons.min.css';
1+
@import "tailwindcss";
2+
@import "flag-icons/css/flag-icons.min.css";
33
@plugin "daisyui" {
44
themes: false; /* Disable built-in themes */
5-
darktheme: 'light';
5+
darktheme: "light";
66
}
77

88
@font-face {
9-
font-family: 'Archivo';
10-
src: url('/fonts/Archivo-VariableFont_wdth,wght.ttf') format('truetype');
9+
font-family: "Archivo";
10+
src: url("/fonts/Archivo-VariableFont_wdth,wght.ttf") format("truetype");
1111
font-weight: 100 900;
1212
font-style: normal;
1313
}
@@ -47,7 +47,7 @@
4747
}
4848

4949
body {
50-
font-family: 'Archivo', sans-serif;
50+
font-family: "Archivo", sans-serif;
5151
}
5252

5353
/* Custom classes */
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
import Header from "./Header.svelte";
22

33
export default {
4-
title: "Fragments/Header",
5-
component: Header,
6-
tags: ["autodocs"],
7-
render: (args: any) => ({
8-
Component: Header,
9-
props: args,
10-
}),
4+
title: "Fragments/Header",
5+
component: Header,
6+
tags: ["autodocs"],
7+
render: (args: any) => ({
8+
Component: Header,
9+
props: args,
10+
}),
1111
};
1212

1313
export const Primary = {
14-
args: {
15-
title: "Create PIN",
16-
isBackRequired: false,
17-
isUserLoggedIn: false
18-
},
14+
args: {
15+
title: "Create PIN",
16+
isBackRequired: false,
17+
isUserLoggedIn: false,
18+
},
1919
};
2020

2121
export const Secondary = {
22-
args: {
23-
title: "Create PIN",
24-
isBackRequired: true,
25-
isUserLoggedIn: false
26-
},
22+
args: {
23+
title: "Create PIN",
24+
isBackRequired: true,
25+
isUserLoggedIn: false,
26+
},
2727
};
2828

2929
export const Tertiary = {
30-
args: {
31-
title: "Create PIN",
32-
isBackRequired: true,
33-
isUserLoggedIn: true
34-
},
35-
};
30+
args: {
31+
title: "Create PIN",
32+
isBackRequired: true,
33+
isUserLoggedIn: true,
34+
},
35+
};

infrastructure/eid-wallet/src/lib/fragments/Header/Header.svelte

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
<script lang="ts">
2-
import { cn } from "$lib/utils";
3-
import { ArrowLeft01Icon, UserCircleIcon } from "@hugeicons/core-free-icons";
4-
import { HugeiconsIcon } from "@hugeicons/svelte";
5-
import type { HTMLAttributes } from "svelte/elements";
2+
import { cn } from "$lib/utils";
3+
import { ArrowLeft01Icon, UserCircleIcon } from "@hugeicons/core-free-icons";
4+
import { HugeiconsIcon } from "@hugeicons/svelte";
5+
import type { HTMLAttributes } from "svelte/elements";
66
7-
interface IHeaderProps extends HTMLAttributes<HTMLElement> {
8-
title: string
9-
isUserLoggedIn?: boolean;
10-
isBackRequired?: boolean;
11-
handleProfile?: () => void;
12-
}
7+
interface IHeaderProps extends HTMLAttributes<HTMLElement> {
8+
title: string;
9+
isUserLoggedIn?: boolean;
10+
isBackRequired?: boolean;
11+
handleProfile?: () => void;
12+
}
1313
14-
let {title= "Create PIN", isUserLoggedIn = true, isBackRequired = true,handleProfile=undefined, ...restProps}:IHeaderProps = $props()
15-
const cBase = "w-full h-[9vh] flex justify-between items-center"
14+
let {
15+
title = "Create PIN",
16+
isUserLoggedIn = true,
17+
isBackRequired = true,
18+
handleProfile = undefined,
19+
...restProps
20+
}: IHeaderProps = $props();
21+
const cBase = "w-full h-[9vh] flex justify-between items-center";
1622
</script>
1723

1824
<header {...restProps} class={cn(cBase, restProps.class)}>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export {default as Header} from "./Header/Header.svelte";
1+
export { default as Header } from "./Header/Header.svelte";

0 commit comments

Comments
 (0)