Menu ▾ ▴

#48 Typed build + lint + unit-test toolchain for inject/ scripts

closed
nobody
2026-07-18
2026-07-03
Anonymous
No

Originally created by: kristofferR

`inject/messenger.js` is 1,993 lines of untyped, untested, unlinted JS with no build step (`node --check` is the only CI gate). Add a light toolchain:

  • TypeScript (or JSDoc-typed) modules bundled to a single injected file via bun/esbuild
  • Unit tests for the pure logic (l.php stripping, unread parsing, thread-href regex)
  • Biome for lint/format
  • Wire into CI

Related

Tickets: #59
Tickets: #70
Tickets: #71
Tickets: #72
Tickets: #74

Discussion

  • Anonymous

    Anonymous - 2026-07-18

    Originally posted by: kristofferR

    Done on main. The injected scripts are now typed TypeScript modules under inject/src/, bundled to single injected files via esbuild (inject/build.ts), with Biome lint/format (biome.json) and bun test unit coverage for the pure logic — including the examples called out here: unread parsing (unread.test.ts), thread-href regex (threads.test.ts), and l.php/link stripping (links.test.ts). It's wired into CI via the "Inject scripts (lint, typecheck, test, build)" check, which also fails on generated-bundle drift.

     
  • Anonymous

    Anonymous - 2026-07-18

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.