unsplash / intlc

Compile ICU messages into code. Supports TypeScript and JSX. No runtime.
MIT License
56 stars 2 forks source link

Reuse lint/parser infra for invalid keys error printing #178

Open samhh opened 1 year ago

samhh commented 1 year ago

See #179.

samhh commented 1 year ago

This looks easier said than done.

We only parse and keep AST annotations/offsets for ICU messages themselves. The JSON is parsed as a quick conversion roughly Text -> Map.

The easiest route may be shifting this check into the JSON compiler, but then the JSON compiler needs to know about all the code compilers, and conditionally call them all depending on the backend value. This could get messy.