Files
TREK/client/scripts/eslint-ratchet.mjs
T
Maurice 0344a86aec style(client): format the ratchet scripts with Prettier
The checker scripts were written without semicolons, against the
semi: true in .prettierrc, so every one of them failed the formatting
rule lint:format enforces on src/ and tests/. This is prettier --write
over the scripts this branch added or rewrote, nothing else.
2026-10-08 13:04:40 +02:00

24 lines
1.2 KiB
JavaScript

#!/usr/bin/env node
/*
* lint:warnings: ESLint warnings may only go down.
*
* Most rules in eslint.config.mjs are warnings, set that way to keep CI green
* on code that was never linted, and a warning never fails a build. So they
* piled up: unused variables hiding dead props, missing effect dependencies
* of the kind that has already shown stale money. This runs ESLint over the
* client and counts the warnings per rule, separately for app code and
* tests, and the messages an eslint-disable comment silenced as a third
* group. Each count may not pass its entry in scripts/eslint-baseline.json.
* Any error fails as well, so the check can stand in for `npm run lint:check`.
*
* npm run lint:warnings check against the baseline (CI)
* npm run lint:warnings -- --update lower the baseline to today's counts;
* it never raises an entry
*/
import { fileURLToPath } from 'node:url';
import { check } from './lib/eslint-warnings.mjs';
import { runCli } from './lib/ratchet.mjs';
const root = fileURLToPath(new URL('..', import.meta.url));
await runCli('lint:warnings', (args) => check({ root, update: args.includes('--update') }));