Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-mongodb

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-mongodb

Lint your MongoDB queries.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
313
decreased by-9.8%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-mongodb

Eslint rules for MongoDB best practices.

NPM version Build status Dependency Status devDependency Status Coverage Status Code Climate

Usage

  1. Install eslint as a dev-dependency:
npm install --save-dev eslint
  1. Install eslint-plugin-mongodb as a dev-dependency:
npm install --save-dev eslint-plugin-mongodb
  1. Enable the plugin by adding it to your .eslintrc:
plugins:
  - mongodb
  1. You can also configure these rules in your .eslintrc. All rules defined in this plugin have to be prefixed by 'mongodb/'

    plugins:
      - mongodb
    rules:
      - mongodb/no-replace: 0
    

Rules

no-replace

Default: 'no_replace': 1

Check update queries to ensure no raw replace is done.

check-numeric-updates

Default: 'check-numeric-updates': 2

Check update queries to ensure numeric operators like $mul and $inc contain numeric values.

check-rename-updates

Default: 'check-rename-updates': 2

Check ``$rename` update operator usage.

How to create a new rule

Avoid wasting your time and follow those steps to suggest a new rule:

  • create and issue prefixed by [rule] and followed by it's name
  • OR create the rule tests file in the src/lib/rules directory directly, create a branch whose name is the proposed rule name. Finally create a pull request.
  • let's discuss about the feature and its implementation details.
  • implement the feature.

Contributing

Feel free to push your code if you agree with publishing under the MIT license.

Stats

NPM NPM

Keywords

FAQs

Package last updated on 19 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc