Summary
Add first-class support for TypeScript Render Extensions (TSRX) and the .tsrx file extension across oxfmt and oxlint.
TSRX extends TypeScript with render-oriented syntax while remaining closely aligned with TypeScript and JSX. Supporting it in Oxc would allow .tsrx files to use the same native parsing, formatting, linting, diagnostics, and editor tooling as the TypeScript-family languages already supported by the project.
Proposal
Extend Oxc's shared language infrastructure to recognize and parse TSRX, then expose that support consistently through oxfmt and oxlint.
The implementation should:
- Recognize
.tsrx as a native source type without requiring configuration or extension overrides.
- Extend the parser and AST where necessary for TSRX-specific syntax defined by the specification, including statement containers, template control flow, lazy destructuring, dynamic tags, and raw style elements.
- Reuse the shared TSRX parsing support in both
oxfmt and oxlint rather than implementing tool-specific parsing paths.
- Format TSRX natively in
oxfmt, preserving the intended structure of embedded TypeScript, render syntax, and raw style elements.
- Allow
oxlint semantic analysis and applicable lint rules to operate on TSRX while preserving accurate source spans and diagnostics.
- Support
.tsrx consistently in the relevant Oxc language-server integrations.
The goal is for TSRX to behave as another native TypeScript-family language within Oxc rather than requiring preprocessing or integration with an external parser.
References
Summary
Add first-class support for TypeScript Render Extensions (TSRX) and the
.tsrxfile extension acrossoxfmtandoxlint.TSRX extends TypeScript with render-oriented syntax while remaining closely aligned with TypeScript and JSX. Supporting it in Oxc would allow
.tsrxfiles to use the same native parsing, formatting, linting, diagnostics, and editor tooling as the TypeScript-family languages already supported by the project.Proposal
Extend Oxc's shared language infrastructure to recognize and parse TSRX, then expose that support consistently through
oxfmtandoxlint.The implementation should:
.tsrxas a native source type without requiring configuration or extension overrides.oxfmtandoxlintrather than implementing tool-specific parsing paths.oxfmt, preserving the intended structure of embedded TypeScript, render syntax, and raw style elements.oxlintsemantic analysis and applicable lint rules to operate on TSRX while preserving accurate source spans and diagnostics..tsrxconsistently in the relevant Oxc language-server integrations.The goal is for TSRX to behave as another native TypeScript-family language within Oxc rather than requiring preprocessing or integration with an external parser.
References