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

@digitalbazaar/eslint-config

v8.0.1

Published

Digital Bazaar's eslint rules

Readme

Digital Bazaar ESLint Configs (@digitalbazaar/eslint-config)

This package provides eslint rules used by Digital Bazaar as a set of extendable shared configs.

There are various core rule sets:

  • @digitalbazaar/eslint-config: Base rules for both node and browser code.
  • @digitalbazaar/eslint-config/import: Rules for es6 imports in the browser and node code.
  • @digitalbazaar/eslint-config/jsdoc: Rules for JSDoc for both node and browser code.
  • @digitalbazaar/eslint-config/module: Rules for modules for both node and browser code.
  • @digitalbazaar/eslint-config/vue3: Rules for Vue 3 code.

For common use cases, there are recommended configs, that load the core rules:

  • @digitalbazaar/eslint-config/browser-recommended: Recommended rules for projects targeting web browsers.
  • @digitalbazaar/eslint-config/node-recommended: Recommended rules for projects targeting node.
  • @digitalbazaar/eslint-config/recommended: Common recommended rules.
  • @digitalbazaar/eslint-config/universal-recommended: Recommended rules for projects targeting node and web browsers.
  • @digitalbazaar/eslint-config/vue3-recommended: Recommended rules for projects targeting Vue 3.

Installation

Requires:

  • eslint v9
npm i -D eslint@9
npm i -D @digitalbazaar/eslint-config

To start an eslint config file:

npx eslint --init

Or copy a template from the examples/ directory:

cp node_modules/@digitalbazaar/eslint-config/examples/node-recommended.js ./eslint.config.js

Dependencies

NOTE: The core and recommended configs use dependencies that are automatically installed. Depending on the configs you use, there may be extra plugin dependencies installed that are not needed. This adds some development bloat but simplifies usage and dependency management. A future version may provide alternative slimmer packages with appropriate dependencies.

Notable dependencies that are always installed:

Usage

Config files can use the simple array syntax or the defineConfig syntax (see shareable configs).

Example eslint.config.js root setup:

import config from '@digitalbazaar/eslint-config/recommended'

export default [
  ...config
];

Recommended configs (listed earlier) exist for common use cases. They may be sufficient on their own when using the opinionated code and file style used by Digital Bazaar for specific types of packages. However, they can also be mixed and matched and modified as needed. Note that currently required plugin dependencies must be manually installed when using recommended configs.

Imports

To use the import plugin rules you need to install eslint-plugin-import:

npm i -D eslint-plugin-import

Example eslint.config.js import setup:

import config from '@digitalbazaar/eslint-config/recommended'
import importConfig from '@digitalbazaar/eslint-config/import'

export default [
  ...config,
  ...importConfig
];

JSDoc

Example eslint.config.js to explicitly use the JSDoc rules:

import config from '@digitalbazaar/eslint-config'
import jsdocConfig from '@digitalbazaar/eslint-config/jsdoc'

export default [
  ...config,
  ...jsdocConfig
];

Modules

Example eslint.config.js to explicitly use ES module rules:

import config from '@digitalbazaar/eslint-config'
import moduleConfig from '@digitalbazaar/eslint-config/module'

export default [
  ...config,
  ...moduleConfig
];

Vue 3

Example eslint.config.js to explicitly use Vue 3 rules:

import config from '@digitalbazaar/eslint-config'
import vue3Config from '@digitalbazaar/eslint-config/vue3'

export default [
  ...config,
  ...vue3Config
];

For command line use you may need to explicitly enable linting .vue files.

Composition

The core rules do not depend on each other and are composable:

import config from '@digitalbazaar/eslint-config'
import jsdocConfig from '@digitalbazaar/eslint-config/jsdoc'
import vue3Config from '@digitalbazaar/eslint-config/vue3'

export default [
  ...config,
  ...jsdoconfig,
  ...vue3Config
];

Other Rules

Other rules that can be useful:

unicorn/prefer-node-protocol

  • Use node:module style for Node.js modules.
  • This is included in the node related recommended configs.

See unicorn/prefer-node-protocol.

Example eslint.config.js:

import config from '@digitalbazaar/eslint-config'

export default [
  ...config,
  {
    rules: {
      'unicorn/prefer-node-protocol': 'error'
    }
  }
];

Commercial Support

Commercial support for this package is available upon request from Digital Bazaar: [email protected]

License

BSD-3-Clause Copyright 2025 Digital Bazaar, Inc.