ci: server and shared lint stop rewriting files, and Prettier is checked per file

shared's lint ran eslint --fix with prettier/prettier as an error, so in
lint-prettier.yml the format:check after it only ever saw files it had just
rewritten, and the server's format scripts pointed at a test/ directory that
does not exist. Now lint is check-only in both (lint:fix applies fixes), the
server scripts cover src/ and tests/, and a lint:format ratchet on the shared
library holds every file outside scripts/format-baseline.json to Prettier in
both workspaces: in the server job of test.yml and in lint-prettier.yml,
which keeps providing the lint check. Formatting leaves ESLint in shared, and
the unused eslint-plugin-prettier goes. Once the tree is reformatted in one
commit, --update empties the baselines and the check is a full prettier
--check.
This commit is contained in:
Maurice
2026-10-10 12:14:53 +02:00
parent c9f66156d3
commit 1ea435d730
145 changed files with 2334 additions and 222 deletions
+8 -3
View File
@@ -23,12 +23,16 @@ jobs:
run: npm install
- name: Run lint & format check
# Both are check-only: lint used to run eslint --fix, which rewrote the
# files before format:check looked at them, so neither could fail on
# formatting. lint:format holds every file outside
# scripts/format-baseline.json to Prettier; the list only shrinks.
id: checks
continue-on-error: true
run: |
cd shared
npm run lint
npm run format:check
npm run lint:format
- name: Comment on PR if checks failed
if: steps.checks.outcome == 'failure'
@@ -46,8 +50,9 @@ jobs:
'',
'```bash',
'cd shared',
'npm run lint',
'npm run format',
'npm run lint:fix',
'npx prettier --write <file> # each file lint:format names',
'npm run lint:format -- --update # when a listed file is formatted now',
'```',
'',
'Then commit and push the changes.',
+7
View File
@@ -260,6 +260,13 @@ jobs:
NODE_OPTIONS: --max-old-space-size=8192
run: cd server && npm run lint:warnings
- name: Formatting check
# Prettier over src/ and tests/: a file outside
# scripts/format-baseline.json must be formatted, and the list only
# shrinks. Once the mechanical reformat lands and --update empties the
# list, this is a full prettier --check.
run: cd server && npm run lint:format
- name: DB call-graph gate (no sync DB-touching methods, no raw transactions)
run: cd server && npm run db:call-graph -- --sync --tx