userland.run70Try the demo
Catalog app · RISC-V VM · runs on Node.js

Run eslint in the browser

Find and fix problems in JavaScript code with the real ESLint and your own rules.

Try it live

Nothing is downloaded until you press Run.

catalog app

Run ESLint on the RISC-V Node.js

Installs the RISC-V node and the ESLint tree from the signed catalog, then runs ESLint's CLI with /usr/bin/node on the emulator (1.8 GB guest).

bash
/usr/bin/node /usr/local/lib/node_modules/eslint/bin/eslint.js --version
loading…
Expected output
$ /usr/bin/node /usr/local/lib/node_modules/eslint/bin/eslint.js --version
v10.0.0

What it is

ESLint statically analyses JavaScript and reports rule violations such as unused variables, unreachable code or style issues, and can auto-fix many of them. The catalog package is the unmodified ESLint 10 npm tree (installed under /usr/local/lib/node_modules); it needs a Node.js runtime. On NanoVM it runs on the catalog's RISC-V Node.js.

Package facts

version
10.0.0
runs on
RISC-V VM (elf-app, riscv64gc-linux-musl)
download
2.4 MB compressed · 1088 files
command
eslint
requires
node
license
MIT (upstream)
upstream
github.com/eslint/eslint
collections
Node dev toolchain
catalog
generation 12, Ed25519-signed

Install and run it from your page

With the SDK, installApp resolves eslint in the signed index, fetches its content-addressed chunks from the CDN, verifies each one and writes the files into the VM. It is a JavaScript program, so it needs a Node.js runtime: install the catalog's node and run it on the RISC-V VM, or run its entry script with nano.node() on the host JavaScript engine where that engine supports it. Details in Installing catalog apps.

javascript
import { createNano } from "@userland-run/nano-sdk";

// JS tools run on the RISC-V node: keep the default ~1.8 GB guest.
const nano = await createNano({ image: { wasm: "/nano/console.wasm" } });
await nano.installApp("node");
await nano.installApp("eslint"); // signature-verified, cached in OPFS

const r = await nano.shExec("/usr/bin/node /usr/local/lib/node_modules/eslint/bin/eslint.js --version");
console.log(r.stdout);

Typical usage of the upstream command-line tool:

bash
eslint --fix src/

Caveats

← All 32 catalog apps