The lint job moves out of tests.yml into lint.yml, unchanged in what it runs. Lint is the fastest check in the pipeline and the one most often broken, and reporting it as one job among the suites made a lint failure and a test failure look alike at a glance. The split left two comments in the wrong place, both artifacts of the copy rather than of the intent. tests.yml kept the six-line note explaining the lint policy — that only defect-catching rules fail the build, that everything else warns, and why no --max-warnings flag appears. With the job gone it sat directly above backend-unit, where a reader would fairly take it as describing the unit tests. It has moved to lint.yml, with the job it actually describes. lint.yml inherited tests.yml's header about backend-integration living in its own manual workflow after it held the runner for three hours. That is worth saying where someone might expect integration tests to run; in a workflow that only runs ESLint it explains the absence of something nobody was looking for. Replaced with why this workflow exists at all. Verified by parsing both files rather than by reading them: lint.yml declares one job, lint; tests.yml declares backend-unit and frontend-e2e. No job was lost in the move and none is now declared twice, which is the failure a copy-and-delete edit invites. Refs #113 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
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
|