# eslint-plugin-mongo

> ESLint environments for MongoDB

Latest version **1.0.5** (published 2016-02-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-mongo
pnpm add eslint-plugin-mongo
yarn add eslint-plugin-mongo
bun add eslint-plugin-mongo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2016-02-20 |
| First published | 2016-02-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ian Springer |
| Maintainers | ispringer |
| Keywords | eslint, eslintplugin, eslint-plugin, mongo, mongodb |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-mongo
- Repository: https://github.com/ispringer/eslint-plugin-mongo
- Issues: https://github.com/ispringer/eslint-plugin-mongo/issues
- npm.io page: https://npm.io/package/eslint-plugin-mongo

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ~1.1.0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2016-02-20
- 1.0.4 — 2016-02-19
- 1.0.3 — 2016-02-19
- 1.0.2 — 2016-02-19
- 1.0.0 — 2016-02-19

## README

# ESLint plugin for MongoDB

This plugin includes two ESLint environments:

- `mongo/server-side` - for Mongo server-side scripts (i.e. mapReduce, eval, or $where)
- `mongo/shell` - for Mongo shell scripts

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ npm install eslint --save-dev
```

Next, install [`eslint-plugin-mongo`](https://www.npmjs.com/package/eslint-plugin-mongo):

```
$ npm install eslint-plugin-mongo --save-dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-mongo` globally.

## Usage


Add `mongo` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
    "plugins": [
        "mongo"
    ]
}
```

For Mongo server-side scripts, add the `mongo/server-side` environment to `.eslintrc`:

```json
{
    "env": {
        "mongo/server-side": true
    }
}
```

For Mongo shell scripts, add the `mongo/shell` environment to `.eslintrc`:

```json
{
    "env": {
        "mongo/shell": true
    }
}
```

---
_Source: https://npm.io/package/eslint-plugin-mongo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
