Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add biome #13

Merged
merged 3 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,40 @@ name: Build with PNPM

on:
push:
branches: [ "master" ]
branches: [ "master", "main" ]
pull_request:
branches: [ "master" ]
branches: [ "master", "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
mrwormhole marked this conversation as resolved.
Show resolved Hide resolved

- name: Run Biome
run: biome ci .

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8.5

- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
version: latest

- name: PNPM install
run: task install
- name: Fetch Deps
run: pnpm install

- name: PNPM build
run: task build
- name: Build
run: pnpm build



2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
18 changes: 0 additions & 18 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@ version: '3'
silent: true

tasks:
install:
desc: installs deps
cmds:
- |
pnpm install
run:
desc: runs on localhost
cmds:
- |
pnpm dev
build:
desc: builds the bundle
cmds:
- |
pnpm build
docker:build:
desc: builds the docker image
vars:
Expand Down
20 changes: 20 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"files": {
"ignore": ["generated/", ".svelte-kit/", "build/", "node_modules/"]
},
"formatter": {
"indentStyle": "space",
"indentWidth": 4,
"lineWidth": 80
}
}
50 changes: 26 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
{
"name": "lamia",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"prepare": "svelte-kit sync"
},
"devDependencies": {
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/kit": "^2.5.14",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"bulma": "^0.9.4",
"sass": "^1.77.5",
"svelte": "^4.2.18",
"svelte-check": "^3.8.0",
"tslib": "^2.6.3",
"typescript": "^5.4.5",
"vite": "^5.3.1"
},
"type": "module"
"name": "lamia",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"prepare": "svelte-kit sync",
"biome": "pnpx @biomejs/biome check"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/kit": "^2.5.14",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"bulma": "^0.9.4",
"sass": "^1.77.5",
"svelte": "^4.2.18",
"svelte-check": "^3.8.0",
"tslib": "^2.6.3",
"typescript": "^5.4.5",
"vite": "^5.3.1"
},
"type": "module"
}
91 changes: 91 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
}

export {};
export type {};
2 changes: 1 addition & 1 deletion src/lib/Footer.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
export let appName: String;
export let appName: string;
</script>


Expand Down
2 changes: 1 addition & 1 deletion src/lib/Header.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
export let appName: string;
export let appName: string;
</script>

<header class="hero is-info">
Expand Down
Loading
Loading