ci: give linting its own workflow (#113) #114
@@ -0,0 +1,46 @@
|
|||||||
|
name: Linting
|
||||||
|
|
||||||
|
# Split out of tests.yml so a lint failure is legible on its own: it is the
|
||||||
|
# fastest check in the pipeline and the one most often broken, and it used to be
|
||||||
|
# reported as one job among the suites rather than as its own result.
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Fails only on the rules with real defect-catching value — unhandled
|
||||||
|
# promises, hook dependencies, missing alt text. Everything else is a warning
|
||||||
|
# and does not block, which is why no --max-warnings flag appears here:
|
||||||
|
# ESLint exits non-zero on errors and zero on warnings on its own. The split,
|
||||||
|
# and the measurements behind it, are in
|
||||||
|
# docs/superpowers/specs/2026-08-19-eslint-design.md.
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install backend deps
|
||||||
|
run: npm install
|
||||||
|
working-directory: backend
|
||||||
|
|
||||||
|
- name: Lint backend
|
||||||
|
run: npm run lint
|
||||||
|
working-directory: backend
|
||||||
|
|
||||||
|
- name: Install frontend deps
|
||||||
|
run: npm install
|
||||||
|
working-directory: frontend
|
||||||
|
|
||||||
|
- name: Lint frontend
|
||||||
|
run: npm run lint
|
||||||
|
working-directory: frontend
|
||||||
@@ -15,39 +15,6 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Fails only on the rules with real defect-catching value — unhandled
|
|
||||||
# promises, hook dependencies, missing alt text. Everything else is a warning
|
|
||||||
# and does not block, which is why no --max-warnings flag appears here:
|
|
||||||
# ESLint exits non-zero on errors and zero on warnings on its own. The split,
|
|
||||||
# and the measurements behind it, are in
|
|
||||||
# docs/superpowers/specs/2026-08-19-eslint-design.md.
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: Install backend deps
|
|
||||||
run: npm install
|
|
||||||
working-directory: backend
|
|
||||||
|
|
||||||
- name: Lint backend
|
|
||||||
run: npm run lint
|
|
||||||
working-directory: backend
|
|
||||||
|
|
||||||
- name: Install frontend deps
|
|
||||||
run: npm install
|
|
||||||
working-directory: frontend
|
|
||||||
|
|
||||||
- name: Lint frontend
|
|
||||||
run: npm run lint
|
|
||||||
working-directory: frontend
|
|
||||||
|
|
||||||
backend-unit:
|
backend-unit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user