ci: Setup Prettier and ESLint workflows
This commit is contained in:
parent
9fef19dbc3
commit
cd321d14a9
14
.github/workflows/eslint.yml
vendored
Normal file
14
.github/workflows/eslint.yml
vendored
Normal 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
14
.github/workflows/prettier.yml
vendored
Normal 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
|
11
package.json
11
package.json
@ -4,15 +4,16 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
|
||||||
"prepare": "svelte-kit sync || echo ''",
|
|
||||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
"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 .",
|
"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": {
|
"devDependencies": {
|
||||||
"@eslint/compat": "^1.2.5",
|
"@eslint/compat": "^1.2.5",
|
||||||
|
Loading…
Reference in New Issue
Block a user