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 🙏

© 2025 – Pkg Stats / Ryan Hefner

eslint-plugin-biome-x

v0.1.0

Published

An ESLint plugin to integrate Biome into ESLint

Readme

Overview

eslint-plugin-biome-x is an ESLint plugin to integrate Biome into ESLint.

Screenshot

Motivation

Biome is considered as a replacement for ESLint and Prettier, but in real world projects, ESLint is still widely used, and there are still a lot of rules provided by ESLint and its plugins that are not available in Biome.

Certainly we could use Biome and ESLint at the same time in a project, and then we may get confused after setting up multiple lint processes for CI/Git hooks or multiple linter plugins in the editor.

Could we keep using ESLint but get unified suggestions from Biome through ESLint rules, like what eslint-plugin-prettier did for Prettier? With eslint-plugin-biome-x, the answer is yes.

Install

npm i -D eslint-plugin-biome-x

Usage

We use ESM format to demonstrate the usage, but if your project does not specify "type": "module" in its package.json file, then the config file must be in CommonJS format.

Flat config (eslint.config.js, require ESLint >=8.56.0)

import eslintBiomeX from 'eslint-plugin-biome-x'

export default [
  eslintBiomeX.configs.recommended
]

Legacy config (.eslintrc.js, not recommended as it has been deprecated since ESLint 9.0.0)

export default {
  extends: ['plugin:biome-x/recommended-legacy'],
}

Configuration

eslint-plugin-biome-x comes with a reasonable default configuration provided by Biome, see recommended rules of Biome.

If it does not fit your need, there are several ways of configuring eslint-plugin-biome-x. If you set you configuration in more than one place, they will be deeply merged.

  • biome.json in your project's root directory
  • biome field in the package.json
    {
      "name": "awsome-package",
      "biome": { /** your configuation goes here */ }
    }
  • settings['biome-x'] field in the ESLint config file
    export default [{
      settings: {
        'biome-x': {
          biomeConfig: { /** your configuation goes here */ }
        }
      }
    }]
  • Rule options
    import eslintPluginBiomeX from 'eslint-plugin-biome-x'
    
    export default [{
      plugins: {
        'biome-x': eslintPluginBiomeX,
      }
      rules: {
        'biome-x/format': ['warn', { /** your configuation goes here */ }]
        'biome-x/lint': ['error', { /** your configuration goes here and it can be different from above */ }]
      }
    }]

The structure of the configuration can be found on the configuration reference of Biome.

Rules

💼 Configurations enabled in.
⚠️ Configurations set to warn in.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.

| Name | Description | 💼 | ⚠️ | 🔧 | | :-- | :-- | :-- | :-- | :-- | | format | Enforce the code to follow the style introduced by biome format. | | ✅ | 🔧 | | lint | Report errors raised by biome lint. | ✅ | | |

Settings

  • biomeConfig

    Specifies the configuration for Biome. Its structure can be found on the configuration reference of Biome.

    Example:

    // eslint.config.js
    import eslintBiomeX from 'eslint-plugin-biome-x'
    
    export default [
      eslintBiomeX.configs.recommended,
      {
        settings: {
          'biome-x': {
            biomeConfig: {
              formatter: { lineWidth: 120 },
              javascript: { formatter: { quoteStyle: 'single' } },
              linter: {
                rules: {
                  style: { noDefaultExport: 'error' },
                  suspicious: { noConsole: { level: 'error', options: { allow: ['assert'] } } },
                },
              },
            },
          },
        },
      },
    ]
  • biomeInstance

    Specifies the Biome instance to be used for linting if you don't want to use the bundled one. If the biomeInstance setting is set, the biomeConfig setting will be ignored, you have to handle its configuation yourself.

    Example:

    // eslint.config.js
    import eslintBiomeX from 'eslint-plugin-biome-x'
    import { Biome } from '@biomejs/js-api'
    import module from '@biomejs/wasm-nodejs'
    
    const biome = await Biome.create({})
    biome.applyConfiguration({ /** your custom configuation */ })
    
    export default [
      eslintBiomeX.configs.recommended,
      {
        settings: {
          'biome-x': { biomeInstance: biome }
        }
      }
    ]

Downsides

  • eslint-plugin-biome-x uses @biomejs/js-api under the hood, which is now a lot slower than running native Biome command.
  • As of now, autofix functionality of biome lint is not usable when using eslint-plugin-biome-x. eslint-plugin-biome-x only reports errors raised by Biome.

Credits

  • @biomejs/js-api We utilize the JavaScript APIs of Biome exposed by this package.
  • eslint-plugin-prettier The implementation of the format rule is hightly inspired by the source code of eslint-plugin-prettier.

License

MIT