Skip to content

Commit

Permalink
add biome (#13)
Browse files Browse the repository at this point in the history
* add biome

* test biome

* final biome fixes
  • Loading branch information
mrwormhole authored Jul 19, 2024
1 parent adbbd36 commit 45dae3b
Show file tree
Hide file tree
Showing 22 changed files with 339 additions and 227 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,38 @@ 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

- 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
19 changes: 19 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$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
}
}
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

0 comments on commit 45dae3b

Please sign in to comment.