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

@contractspec/biome-config

v3.8.11

Published

Biome presets, Grit plugins, and policy manifest for ContractSpec repositories.

Readme

@contractspec/biome-config

Website: https://contractspec.io

Typed ContractSpec lint-policy package that generates Biome presets, Grit plugins, and AI-facing rule summaries.

What It Provides

  • Acts as the source of truth for repository and consumer Biome policy artifacts.
  • Publishes generated presets, Grit plugins, and AI summaries alongside the typed manifest and generation helpers.
  • Requires artifact synchronization whenever the typed policy manifest changes so committed outputs stay aligned.
  • Enforces React and React Native compatible JSX in shared presentation packages by preferring layout primitives (HStack, VStack, Box) over raw <div> and requiring visible text to sit inside Text or approved typography components. Repository app packages are excluded by default and can be opted in with the policy allowlist.
  • Related ContractSpec packages include @contractspec/tool.bun, @contractspec/tool.typescript.

Installation

npm install @contractspec/biome-config

or

bun add @contractspec/biome-config

Usage

Import the root entrypoint from @contractspec/biome-config, or choose a documented subpath when you only need one part of the package surface.

JSX Primitive Fixer

The Biome Grit plugins emit diagnostics only. To apply conservative native HTML replacement fixes, run:

bun run jsx:fix-primitives

or from this package:

bun run fix:jsx-primitives

By default the fixer scans packages/bundles, packages/examples, and packages/modules. It skips packages/apps unless an app is explicitly allowlisted:

bun run jsx:fix-primitives -- --allow-app web-landing

Use --check for a dry run. The fixer preserves original attributes and className by default, infers safe list props from simple class strings, and wraps raw text with context awareness: block-safe containers keep <Text>...</Text>, while mixed-content contexts use inline-safe <Text asChild><span>...</span></Text>. Ambiguous form/action primitives remain diagnostic-only, and generic inline <span> elements are still skipped.

Architecture

  • src/policies.ts defines the typed policy manifest.
  • src/generate.ts and src/sync.ts generate and synchronize derived artifacts.
  • src/fix-jsx-primitives.ts provides the conservative companion codemod for deterministic JSX primitive replacements.
  • src/types.ts and src/index.ts expose the public API for generation and policy consumption.
  • presets/, plugins/, and ai/ contain committed generated artifacts consumed by downstream tools.

Public Entry Points

  • Exports the root library API and ships generated presets, Grit plugins, and AI-facing summaries as committed package artifacts.
  • Export . resolves through ./src/index.ts.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — bun run prebuild && bun run build:bundle && bun run build:types
  • bun run test — bun test
  • bun run lint — bun run lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run fix:jsx-primitives — apply conservative JSX primitive replacements.
  • bun run typecheck — tsc --noEmit
  • bun run sync:artifacts — bun src/sync.ts
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rimraf dist .turbo
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — bun run sync:artifacts && contractspec-bun-build prebuild

Recent Updates

  • Add cross-platform JSX layout and text guardrails for React and React Native compatibility.
  • Add a conservative JSX primitive fixer command for deterministic native HTML replacements.
  • Replace eslint+prettier by biomejs to optimize speed.

Notes

  • The committed presets/, plugins/, and ai/ artifacts are intended for downstream scaffolding without code execution.