You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Web: add ESLint and component test infrastructure (jsdom + testing-library); cover barcodeScanner and exportCsv #41
The web app has vitest but effectively no safety net:
No ESLint — no config and no lint script anywhere in web/. That's why hook-dependency bugs (dep-less effect at FileListTable.tsx:370-377; missing browse dep at LoadConfigModal.tsx:55) were never flagged. Add eslint + typescript-eslint + eslint-plugin-react-hooks with a lint script, and wire it into pre-commit alongside ruff.
No component tests — vitest.config.ts runs in the default node env; no jsdom, no @testing-library/react in devDependencies. All 23 components and the 1572-line App.tsx (scan races, global keyboard handler, barcode flow, drag state) are untested. Existing tests cover only pure modules (client, configDrop, fileProperties, searchSyntax, theme, barcodeDecoder).
Untested pure logic that's trivially testable: utils/barcodeScanner.ts (parseBarcodeInput — the whole barcode key=value language incl. alias normalization and boolean parsing) and utils/exportCsv.ts (RFC 4180 quoting).
Document npm test in web/README.md (it documents build/dev only).
Suggested order: ESLint + fix its findings → jsdom/testing-library with one modal + one App keyboard test as the pattern → the two pure-logic test files.
Activity