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

@mkappelhof/biome-config

v1.1.0

Published

Shared Biome configuration (linting + formatting)

Downloads

449

Readme

Shared Biome configuration

Linting, formatting and import sorting with Biome 2.

Installation

pnpm add -D @mkappelhof/biome-config @biomejs/biome

Create a biome.json in the root of your project, next to .gitignore:

{
  "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  "extends": ["@mkappelhof/biome-config"]
}

Add scripts to package.json:

{
  "scripts": {
    "lint": "biome check .",
    "lint:fix": "biome check --write ."
  }
}

Monorepos

Only the root biome.json extends this package. Nested configs in workspace packages inherit from the root:

{
  "root": false,
  "extends": "//"
}

Without git

The config reads .gitignore, and Biome looks for it next to biome.json. If your project has no .gitignore there, turn VCS integration off:

{
  "extends": ["@mkappelhof/biome-config"],
  "vcs": { "enabled": false }
}

Deterministic framework rules

Biome turns on React/Next.js/Astro/test-runner rules by sniffing your dependencies, so lint behavior can shift when you add or remove a package without touching biome.json. To pin it down instead, set linter.domains explicitly in your project's biome.json:

{
  "extends": ["@mkappelhof/biome-config"],
  "linter": {
    "domains": {
      "react": "recommended",
      "next": "recommended",
      "astro": "recommended",
      "test": "recommended"
    }
  }
}

The astro domain only catches .astro-specific lint rules (e.g. conflicting set:html/children directives). Formatting and parsing .astro files at all requires html.experimentalFullSupportEnabled (already on in this config — see below), since Biome treats Astro as an HTML-superset language.

Only set the domains that apply to your project; "none" turns a domain off entirely. This isn't the default in @mkappelhof/biome-config itself, since the shared config is also used by plain Node projects that shouldn't get React/Next rules.

Editor

Install the Biome extension for your editor and make it the default formatter. For VS Code, put this in .vscode/settings.json:

{
  "editor.defaultFormatter": "biomejs.biome",
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.biome": "explicit",
    "source.organizeImports.biome": "explicit"
  }
}

What's included

  • Files: everything Biome supports (JS/TS/JSX, JSON, CSS, SCSS, Markdown, YAML, HTML, GraphQL), except files in .gitignore and dist, build, out, coverage, .next, .astro, .vercel and .turbo.
  • Formatter: 2 spaces, 100-character lines, single quotes, semicolons, ES5 trailing commas. An .editorconfig takes precedence.
  • Linter: the recommended preset, plus these rules as errors:
    • JS/TS: noExplicitAny, noConsole, noUnusedImports, noUnusedVariables, useImportType, useExportType, useNodejsImportProtocol, useConsistentArrowReturn and useBlockStatements (no braceless if (x) return;/if (!x) throw ...; — its fix is unsafe, so run biome check --write --unsafe to apply it). noConsole is off again in *.config.*, scripts/** and bin/** files.
    • CSS/SCSS: useGenericFontNames, noInvalidDirectionInLinearGradient, noInvalidGridAreas, noInvalidPositionAtImportRule, noMissingVarFunction, noUnknownMediaFeatureName, noUnknownProperty, noUnknownPseudoClass, noUnknownPseudoElement, noUnknownTypeSelector, noUnknownUnit, noUnmatchableAnbSelector, noDeprecatedMediaType, noDuplicateAtImportRules, noDuplicateCustomProperties, noDuplicateFontNames, noDuplicateProperties, noDuplicateSelectorsKeyframeBlock, noEmptyBlock, noEmptySource, noImportantInKeyframe and noIrregularWhitespace — these are every rule Biome 2.6+ ships with a direct equivalent to @mkappelhof/stylelint-config's rule set (stylelint-config-standard + stylelint-config-recommended-scss), most already in the recommended preset but pinned explicitly here.
    • Framework rules (React, Next.js, tests) are turned on automatically based on your dependencies — see below to pin them explicitly instead.
  • HTML: experimentalFullSupportEnabled is on, so Biome formats full HTML/Astro templates rather than only the parts it previously supported.
  • Imports: sorted into groups: Node/Bun built-ins, React, packages/aliases, then stylesheets and SVGs, each after a blank line.

Pairing with Stylelint

As of Biome 2.6, SCSS support is no longer limited to CSS Modules — Biome fully parses, formats and lints .scss files, and files.includes matches them by default (no opt-in needed). If the project also uses @mkappelhof/stylelint-config, the two tools will now process the same files unless you stop one of them: exclude style files from this config's files.includes in the project's biome.json ("!**/*.css", "!**/*.scss"), or don't point Stylelint at files Biome already covers.

@mkappelhof/stylelint-config still covers more ground — SCSS-specific checks (scss/* rules, @use/@mixin/@include correctness) and most stylistic rules (empty-line conventions, color notation, quoting, etc.) that Biome's CSS linter doesn't have an equivalent for yet — so for new SCSS-heavy projects, or any project not yet on Biome 2.6+, keep using it instead of relying on Biome alone.

AI agents

This package ships an AGENTS.md that describes the conventions this config enforces. Reference it from your project's AGENTS.md:

- Follow `node_modules/@mkappelhof/biome-config/AGENTS.md`