Registry / testing / eslint-config-mongodb-js

eslint-config-mongodb-js

JSON →
library5.0.3jsnpmunverified

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.

npm install eslint-config-mongodb-js
INSTALL
IMPORT
SIG · ESLINT-CONFIG-MONG
E
eslint-config-mongodb-js
testingjavascriptv5.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

eslint-config-mongodb-js
// In .eslintrc: { "extends": "mongodb-js/node" }
const config = require('eslint-config-mongodb-js')
Uses ESLint's extends feature, not a JS import. Common mistake: trying to import directly.
compass-plugin
{ "extends": "mongodb-js/compass-plugin" }
{ "extends": "mongodb-js" }
Must specify the full sub-config name; the root package alone does nothing.
react
{ "extends": "mongodb-js/react" }
{ "extends": "mongodb-js" }
Same as above: use the config name after the prefix.

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 .
Debug
Known issues
gotchaRequires 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.).
affects: >=1.0.0
breakingUpgraded 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.
affects: 5.0.0 - 5.0.3
deprecatedNo 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.
affects: >=5.0.3
gotchaThe 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'.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'eslint-config-airbnb'
Missing peer dependency eslint-config-airbnb.
fix
npm install --save-dev eslint-config-airbnb
Configuration for rule 'import/no-extraneous-dependencies' is invalid
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
ESLint couldn't find the config "mongodb-js". Please make sure that your ESLint configuration is correct.
Incorrect extends value; missing the sub-config name.
fix
Use "extends": "mongodb-js/node" or another valid sub-config.
Upgrade
Version history
5.0.3latest on npm
Audit
Dependencies
eslintrequiredPeer dependency required for any config to work
eslint-config-airbnbrequiredBase config; must be installed alongside
Agent activity
6 hits · last 30 days
node
6
Resources
eslint-config-mongodb-js — npm install eslint-config-mongodb-js · libregistry