eslint-config-mongodb-js

eslint sharable configs for mongodb-js.

Apache-2.0 27 个版本
安装
npm install eslint-config-mongodb-js
yarn add eslint-config-mongodb-js
pnpm add eslint-config-mongodb-js
bun add eslint-config-mongodb-js
README

eslint-config-mongodb-js travis npm

eslint shareable configs for mongodb-js.

Usage

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.

Conventions

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}.

Usage

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.

compass-plugin

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

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

react

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

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

node

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

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

browser

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.

Changelog

5.0.0

  • Upgrade to eslint@5 #49

4.0.0

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

FAQ

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.

License

Apache 2.0

版本列表
5.0.3 2019-05-17
5.0.2 2019-05-09
5.0.1 2019-05-09
5.0.0 2019-05-08
4.0.0 2019-05-08
3.0.1 2018-05-05
3.0.0 2018-05-05
2.3.0 2017-11-14
2.2.0 2016-08-21
2.1.1 2016-08-21
2.1.0 2016-08-21
2.0.1 2016-08-10
2.0.0 2016-03-06
1.0.6 2015-11-16
1.0.5 2015-10-30
1.0.4 2015-10-26
1.0.3 2015-10-16
1.0.2 2015-10-16
1.0.1 2015-10-16
1.0.0 2015-10-16
0.1.6 2015-09-22
0.1.5 2015-07-15
0.1.4 2015-07-01
0.1.3 2015-07-01
0.1.2 2015-07-01
0.1.1 2015-06-30
0.1.0 2015-06-30