Skip to content

Add native TSRX (.tsrx) support to oxfmt and oxlint #25940

Description

@pygarap

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions