ci: Setup Prettier and ESLint workflows

This commit is contained in:
April Hall 2025-02-10 16:22:02 -05:00
parent 9fef19dbc3
commit cd321d14a9
Signed by: arithefirst
GPG Key ID: 4508A15C4DB91C5B
3 changed files with 34 additions and 5 deletions

14
.github/workflows/eslint.yml vendored Normal file
View File

@ -0,0 +1,14 @@
name: ESLint
on: [push]
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
# Installs bun
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
# Install deps and run eslint
- run: bun install
- run: bun lint

14
.github/workflows/prettier.yml vendored Normal file
View File

@ -0,0 +1,14 @@
name: Prettier
on: [push]
jobs:
checkformat:
name: checkformat
runs-on: ubuntu-latest
steps:
# Installs bun
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
# Install deps and check formatting
- run: bun install
- run: bun checkformat

View File

@ -4,15 +4,16 @@
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"migrate": "npx @better-auth/cli migrate --config './src/lib/server/db/auth'",
"checkformat": "prettier --check .",
"dev": "vite dev",
"format": "prettier --write .",
"lint": "prettier --check . && eslint ."
"lint": "eslint .",
"migrate": "npx @better-auth/cli migrate --config './src/lib/server/db/auth'",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''"
},
"devDependencies": {
"@eslint/compat": "^1.2.5",