Add lint workflow and lint-fix script

Copied from splatoon3.ink: lint on pushes to main and on pull requests,
failing on any warning, and npm run lint-fix to apply fixes locally.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Matt Isenhower
2026-09-05 10:30:11 -07:00
parent 41dcff1709
commit e3e773af4d
2 changed files with 22 additions and 1 deletions

20
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Lint
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main", "develop" ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- run: npm ci
- run: npm run lint -- --max-warnings 0

View File

@@ -24,7 +24,8 @@
"worker:dev": "wrangler dev --local --var LOCAL_DEVELOPMENT:true --persist-to .wrangler/state",
"worker:test": "vitest run --config vitest.worker.config.mjs",
"worker:deploy:dry-run": "wrangler deploy --dry-run",
"worker:deploy": "wrangler deploy"
"worker:deploy": "wrangler deploy",
"lint-fix": "npm run lint -- --fix"
},
"dependencies": {
"@atproto/api": "^0.20.42",