denoland / deno_ast

Source text parsing, lexing, and AST related functionality for Deno
https://crates.io/crates/deno_ast
MIT License
156 stars 46 forks source link

Enable JSX Namespace by default #154

Closed jollytoad closed 1 year ago

jollytoad commented 1 year ago

I'm raising this here, as I've just discovered that this repo is where this issue could be fixed: https://github.com/denoland/deno/issues/20345

https://github.com/denoland/deno_ast/blob/2910cf3b09edd6898c16644c014dc838f9b34b9f/src/transpiling/mod.rs#L338

I believe throw_if_namespace could just be set to Some(false) to solve this?

Unless you want to provide it as an option, but I don't think that's necessary. TypeScript doesn't make this restriction, so I don't know why swc should.