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

ucode-lint

v0.1.0

Published

Lint rules for ucode, the OpenWrt scripting language

Downloads

215

Readme

ucode-lint

Static linter for ucode, the ECMAScript-like scripting language used in OpenWrt. Catches security vulnerabilities, common bugs, and ucode-specific pitfalls that standard JavaScript linters miss.

Powered by ast-grep and tree-sitter-ucode.

Installation

npm install --save-dev ucode-lint

Usage

npx ucode-lint [paths...]   # lint specific files or directories
npx ucode-lint              # lint current directory (default)

Example output:

src/handler.uc:12:5: [error] popen() always passes its argument through /bin/sh … (no-unsafe-popen)
src/handler.uc:34:3: [warning] Use `===` / `!==` instead of `==` / `!=`. … (prefer-strict-equality)

2 problems (1 error, 1 warning) in 1 file.

Exit code 0 if no errors are found (warnings do not affect the exit code).
Exit code 1 if one or more errors are found.

CI integration

- run: npm install
- run: npx ucode-lint

Rules

| ID | Severity | Category | Description | |----|----------|----------|-------------| | no-error-nodes | error | Removed JS syntax | Flags any construct ucode cannot parse: var, new, throw, typeof, class, destructuring (array and object), for...of, async/await, >>> | | no-export-default-expression | error | Ucode-specific | export default <expr> always requires a trailing ; — unlike JS, ucode has no ASI after export default, so omitting the semicolon is a syntax error for any expression (functions, arrows, literals, identifiers) | | no-assignment-in-condition | error | Common bugs | Assignment inside an if, while, for, or ternary condition — use === to compare, or move the assignment before the condition | | no-eval | error | Security | eval() executes arbitrary code | | no-unsafe-popen | error | Security | popen() always runs its argument through /bin/sh and has no array form — sanitize inputs or replace with system([...]) | | no-unsafe-system | error | Security | system() with a dynamic string runs through /bin/sh — use the array form system(["/cmd", arg1, arg2]) to bypass the shell entirely | | prefer-strict-equality | warning | Common bugs | == / != do type coercion — use === / !== instead | | no-optional-chain | warning | Ucode-specific | ?. short-circuits on ANY non-object value (strings, numbers, booleans), not just null — use explicit null checks | | no-alt-block-syntax | warning | Style | Prefer {} blocks over if/endif, for/endfor, while/endwhile, function/endfunction |

Supported platforms

Ships prebuilt binaries for:

  • Linux x64 (glibc and musl)
  • Linux arm64 (glibc and musl)
  • macOS x64 and arm64
  • Windows x64 and arm64

License

MIT