eslint-config-mongodb-js

raw JSON →
5.0.3 verified Sat Apr 25 auth: no javascript maintenance

ESLint shareable configurations for mongodb-js projects, version 5.0.3, last updated ~2019. Provides multiple presets (compass-plugin, react, node, browser, shell) based on eslint-config-airbnb. Differentiates by offering project-specific configs for MongoDB ecosystem. Limited updates; consider using eslint-config-mongodb-js-legacy or maintaining your own.

error Cannot find module 'eslint-config-airbnb'
cause Missing peer dependency eslint-config-airbnb.
fix
npm install --save-dev eslint-config-airbnb
error Configuration for rule 'import/no-extraneous-dependencies' is invalid
cause Outdated peer dependencies, especially eslint-plugin-import versions.
fix
Update all peer dependencies to latest compatible versions, e.g., npm install --save-dev eslint-plugin-import@latest
error ESLint couldn't find the config "mongodb-js". Please make sure that your ESLint configuration is correct.
cause Incorrect extends value; missing the sub-config name.
fix
Use "extends": "mongodb-js/node" or another valid sub-config.
gotcha Requires eslint-config-airbnb as a peer dependency, which itself has many transitive peer deps. Missing any will fail silently.
fix Install eslint-config-airbnb and its peer deps (eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-react, etc.).
breaking Upgraded to eslint@5 in v5.0.0. If using ESLint 4, pin to v4.0.0 or earlier.
fix Use eslint@5+ or downgrade to eslint-config-mongodb-js@4.x for eslint@4.
deprecated No new releases since 2019; the package is unmaintained. Newer ESLint versions (>=6) may cause rule incompatibilities.
fix Consider using eslint-config-mongodb-js-legacy or switch to airbnb's default config.
gotcha The package name prefix is 'mongodb-js/' not '@mongodb-js/'. Using scoped name will not work.
fix Use 'mongodb-js/node' instead of '@mongodb-js/node'.
npm install eslint-config-mongodb-js
yarn add eslint-config-mongodb-js
pnpm add eslint-config-mongodb-js

Install peer deps and apply a mongodb-js ESLint config for Node.js projects.

// 1. Install dependencies
npm install --save-dev eslint eslint-config-mongodb-js eslint-config-airbnb

// 2. Create .eslintrc.json:
{
  "extends": "mongodb-js/node",
  "rules": {
    // Your overrides
  }
}

// 3. Run ESLint:
npx eslint .