Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including eslint-config-mongodb-js with all npm packages installed. Try it out:

var eslintConfigMongodbJs = require("eslint-config-mongodb-js")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

eslint-config-mongodb-js v5.0.3

eslint sharable configs for mongodb-js.

eslint-config-mongodb-js travis npm

eslint shareable configs for mongodb-js.


Shareable configs are designed to work with the extends feature of .eslintrc files. This allows us to easily extend from a base configuration to provide the right rules for all of the extensive range of environments we build modules for:

  • mongodb-js/compass-plugin
  • mongodb-js/react
  • mongodb-js/node
  • mongodb-js/browser
  • mongodb-js/shell

You can learn more about Shareable Configs on the official ESLint website.


Our eslint-config is based on eslint-config-airbnb. We make a best effort to explicitly call out any rules we differ from eslint-config-airbnb will include a JSDoc comment of @differ #{dang good reason}.


To use the mongodb-js shareable config, first run:

npm install --save-dev eslint-config-mongodb-js

NOTE You do not need to add multiple extends: [] in your .eslintrc! The inheritance of the mongodb-js/* configs inherits bottom up. For example, mongodb-js/compass-plugin already includes mongodb-js/react.


If you're building a MongoDB Compass Plugin, your ./.eslintrc should be:

{"extends": "mongodb-js/compass-plugin"}


For react modules, your ./.eslintrc should be:

{"extends": "mongodb-js/react"}


For vanilla node.js projects, your ./.eslintrc should be:

{"extends": "mongodb-js/node"}


If you're working on a UI project that uses browserify, your ./.eslintrc should be:

{"extends": "mongodb-js/browser"}


  • mongodb-js-precommit The first line of defense to fighting bugs is not letting bad code into your project in the first place.
  • eslint-plugin-mongodb Syntax guidance and best practices reinforcement when using MongoDB node.js driver.



  • Upgrade to eslint@5 #49


  • Adds mongodb-js/compass-plugin config #48


My editor is now showing unexpected errors

Make sure your editor is using the correct version of eslint. If you're using Visual Studio Code, npm i -g eslint@latest will resolve this problem.


Apache 2.0

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free