https://github.com/quarylabs/sqruff has a DuckDB dialect that works well enough, though I wish it defaulted to lowercase. It's in Rust so you should be able to compile to wasm easily enough.