Files
xenia-pos-local/manager_dashboard/scripts/lint.mjs
T
bonaminandClaude Opus 5.5 2dc5da446e feat: foundations for the manager conversion (platform-v2 step 6.1)
- Backend: every HTTPException in routers/ is an error code now (260 raises, ~105 new codes,
  texts in en + el); XeniaError(detail=...) keeps the three v1-shaped answers old pages read;
  bad / unknown tokens answer auth.session_ended; test_errors refuses new HTTPExceptions.
- Manager: v2.json is the list of pages on the v2 rules: scripts/lint.mjs lints them,
  tests/v2-guards.test.mjs refuses Greek and colour literals, `strict` paths make
  set-state-in-effect an error.
- src/live/useLiveQuery.js (react-query + live events + refresh on reconnect); Signed in now
  uses it.
- Dead manager files removed (3.1k lines unreachable from main.jsx).
- Tests: backend 544 passed, manager unit 33, run-all (no Android) passed (manager's live
  bell check passed on a rerun).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:31:36 +02:00

9 lines
527 B
JavaScript

// `npm run lint` (plan step 6.1): ESLint over the code on the v2 rules (v2.json `paths`), the
// config and the tests. `npx eslint src` shows everything, older pages included.
import { spawnSync } from 'node:child_process'
import { readFileSync } from 'node:fs'
const v2 = JSON.parse(readFileSync(new URL('../v2.json', import.meta.url), 'utf8'))
const r = spawnSync('npx', ['eslint', 'eslint.config.js', 'scripts', 'tests', ...v2.paths], { stdio: 'inherit', shell: process.platform === 'win32' })
process.exit(r.status ?? 1)