
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@biomejs/js-api
Advanced tools
Official JavaScript bindings for Biome
[!WARNING] The API is currently in alpha. It is not yet ready for production use. We appreciate your support and feedback as we work to make it ready for everyone.
npm i @biomejs/js-api
npm i @biomejs/wasm-<dist>
You need to install one of the @biomejs/wasm-* package as a peer dependency for this package to work correctly, out of the following distributions:
@biomejs/wasm-bundler: Install this package if you're using a bundler that supports importing *.wasm files directly@biomejs/wasm-nodejs: Install this package if you're using Node.js to load the WebAssembly bundle use the fs API@biomejs/wasm-web: Install this package if you're targeting the web platform to load the WASM bundle using the fetch APIimport { Biome } from "@biomejs/js-api/nodejs";
// Or:
// import { Biome, Distribution } from "@biomejs/js-api/bundler";
// import { Biome, Distribution } from "@biomejs/js-api/web";
const biome = new Biome();
const { projectKey } = biome.openProject("path/to/project/dir");
// Optionally apply a Biome configuration (instead of biome.json)
biome.applyConfiguration(projectKey, {...});
const formatted = biome.formatContent(
projectKey,
"function f (a, b) { return a == b; }",
{
filePath: "example.js",
},
);
console.log("Formatted content: ", formatted.content);
const result = biome.lintContent(projectKey, formatted.content, {
filePath: "example.js",
});
const html = biome.printDiagnostics(result.diagnostics, {
filePath: "example.js",
fileSource: formatted.content,
});
console.log("Lint diagnostics: ", html);
The project philosophy can be found on our website.
Contribution and development instructions can be found in Contributing.
Additional project coordination and real-time discussion happens on our Discord server. Remember that all activity on the Discord server is still moderated and will be strictly enforced under the project's Code of Conduct.
FAQs
JavaScript APIs for the Biome package
The npm package @biomejs/js-api receives a total of 367,818 weekly downloads. As such, @biomejs/js-api popularity was classified as popular.
We found that @biomejs/js-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.