diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml new file mode 100644 index 0000000..c40fc0e --- /dev/null +++ b/.gitea/workflows/lint.yml @@ -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 diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 4a59509..67cc1db 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -15,39 +15,6 @@ on: 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 - backend-unit: runs-on: ubuntu-latest steps: