npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

oxc-tsrx

v0.3.0

Published

Rust-native Oxlint and Oxfmt for TSRX, JavaScript, TypeScript, and JSX

Readme

oxc-tsrx gives you three tools for .tsrx files:

  • a linter, which warns you about likely mistakes before you run your code
  • a formatter, which fixes spacing and punctuation so every file matches
  • a parser, which reads a file into a form your own tools can work with

A .tsrx file is TypeScript with HTML-like markup in it, plus blocks like @if and @for for showing something only sometimes, or once per item in a list. OXC is a set of fast tools for JavaScript and TypeScript, written in Rust. This package teaches them to read .tsrx too.

OXC for TSRX is an independent community project. It is not affiliated with, endorsed by, or a product of VoidZero or the OXC team.

Docs  ·  Getting started  ·  Playground

Install

npm install --save-dev oxc-tsrx

That is the whole setup, for the command line and for your editor. You get oxlint and oxfmt, the real OXC commands, now able to read .tsrx, with no config file, no ignore file, and no install script. Vite+ needs one more command.

You do not need Rust installed: the install downloads a ready-built program for your machine, one of eight published for macOS, Linux, and Windows. See Platform support.

Usage

npx oxlint src/Cart.tsrx        # Lint the file.
npx oxfmt --check src/Cart.tsrx # Show what formatting would change.
npx oxfmt --write src/Cart.tsrx # Apply it.

Always give these commands a path. A bare npx oxlint also checks node_modules, and --fix (the flag that lets oxlint edit your files) will rewrite files in there.

Your .js, .jsx, .ts, and .tsx files go straight to OXC, exactly as they would without this package. Only .tsrx files do anything TSRX-specific.

What works today

These are the TSRX blocks the linter and formatter understand: @{ blocks, @if / @else if / @else, @for / @empty, @switch / @case / @default, @try / @pending / @catch, tags whose name is an expression, <{expression}>, and plain <style> blocks (TSRX syntax shows each one). Anything outside that list fails closed: the command stops and says what it found and where, rather than guessing and maybe producing wrong output.

This package compiles nothing. It never builds or runs your app. Turning .tsrx into something a browser can run is your framework's TSRX plugin's job, such as @tsrx/vite-plugin-react. See tsrx.dev/getting-started. Without one, your build tool reads .tsrx as plain TypeScript and stops at the first @{.

In your editor

Install the official OXC extension, oxc.oxc-vscode. With oxc-tsrx in the project there is nothing else to install or configure, and your editor underlines the same problems the terminal reports. One catch: the TSRX toolchain's own extension owns .tsrx, and the OXC extension lists no activation event for it, so it does not start on its own. Open any JavaScript, TypeScript, or JSON file in the project once, and .tsrx works for the rest of the session. See the editor guide.

Using it from your own code

import { parseSync } from "oxc-tsrx/parser";
import { defineConfig } from "oxc-tsrx/lint";
import { format } from "oxc-tsrx/format";

The parser hands back the structure of your file and the formatter hands back tidied text, so you can build your own tools on the same reader the commands use. Parsing has the shape it returns. None of these compiles .tsrx either; that stays your framework's TSRX plugin's job.

Your own JavaScript lint plugins

A plugin listed in jsPlugins runs on .tsrx from the oxlint command and inside your editor, but it sees a translated copy of your file rather than the TSRX you wrote, so each .tsrx file is read once more. The command and the editor both say when they have done that, and settings.oxcTsrx.jsPluginsOnTsrx: false turns it off.

oxc-tsrx-lint, the standalone Rust command, has no Node.js to run a plugin in, so it refuses jsPlugins and names oxlint as the command that can. oxc-tsrx/lint/plugins-dev is for writing a plugin, since it re-exports the RuleTester from oxlint. See Custom JavaScript plugins.

Documentation

oxc-tsrx is the only package to depend on. The eight @oxc-tsrx/native-* packages are platform binaries in optionalDependencies, and you never name one yourself.

License

MIT.