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

@ohos-rs/oxk

v0.6.0

Published

An ArkTS/ArkUI tool based on oxc

Readme

@ohos-rs/oxk

ArkTS/ArkUI parser, formatter, and lint tooling based on OXC and oxlint.

Install

npm install @ohos-rs/oxk

For CLI usage, install it in your project and run it through your package manager, or install it globally:

npm install -g @ohos-rs/oxk
oxk --help

The npm package requires Node.js ^20.19.0 || >=22.18.0.

Format

oxk format src/index.ets
oxk format "src/**/*.{ts,ets}"

Formatter config is loaded from .oxfmtrc.json or .oxfmtrc.jsonc.

Lint

oxk lint src --threads 1
oxk lint src/index.ets --format json
oxk lint --config .oxlintrc.jsonc "src/**/*.ets"

oxk lint embeds oxlint::CliRunner; it does not shell out to an external oxlint binary. The npm CLI includes the oxlint JavaScript runtime for:

  • .oxlintrc.json and .oxlintrc.jsonc
  • oxlint.config.ts
  • oxlint built-in plugin configuration, such as plugins: ["react"]
  • JavaScript plugins configured with jsPlugins
  • plugin settings and globals

The cargo CLI keeps a pure Rust runner. Use JSON or JSONC config files there; the JavaScript runtime and oxlint.config.ts are npm-only.

ArkTS Rules

ArkTS migration rules are built in as the virtual arkts plugin. See Built-in Lint for the rule list, configuration examples, arkts/system-api-version, and the SDK sync workflow.

Example:

// index.ets
const key = Symbol('id')
let marker: symbol
oxk lint index.ets --threads 1 --format json

JavaScript API

Use the formatter wrapper:

const { format } = require('@ohos-rs/oxk/format')

Use the lint wrapper with oxlint-compatible CLI arguments:

const { lint } = require('@ohos-rs/oxk/lint')

const ok = await lint(['src/index.ets', '--threads', '1'])
process.exitCode = ok ? 0 : 1

The native module is also available from the package root:

const oxk = require('@ohos-rs/oxk')

For linting from JavaScript, prefer @ohos-rs/oxk/lint; it wires the oxlint JS runtime callbacks for plugins and JavaScript config files.

WASI

Build the WASI artifact locally:

pnpm build --target wasm32-wasip1-threads
pnpm run test:wasi

test:wasi forces NAPI_RS_FORCE_WASI=1 and verifies the generated WASI binding can load and execute parse and format. Linting is intentionally not available from the WASI build because the oxlint runner and JavaScript plugin runtime are native-only; use the native npm package or cargo CLI for linting.

Local Development

Build the local NAPI binary before running npm CLI tests:

pnpm --filter @ohos-rs/oxk run build:debug
pnpm --filter @ohos-rs/oxk test
pnpm --filter @ohos-rs/oxk run build --target wasm32-wasip1-threads
pnpm --filter @ohos-rs/oxk run test:wasi

Update the bundled oxlint JavaScript runtime after changing the upstream source or dependency versions:

pnpm --filter @ohos-rs/oxk run build:oxlint-runtime

Run the Rust checks:

cargo check -p lint -p oxk
cargo check -p oxk-napi
cargo test -p lint -p oxk
git diff --check