2.0.4 • Published 1 year ago

eslint-plugin-objectid-compare v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

eslint-plugin-objectid-compare

Comparing ObjectId from mongodb module

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-objectid-compare:

npm install eslint-plugin-objectid-compare --save-dev

Usage

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

{
    "plugins": [
        "objectid-compare"
    ]
}

Also this plugin required parser options, so please add in your .eslintrc configuration file:

{
    "parserOptions": {
        "project": ["path/to/your/tsconfig/file"]
    },
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "objectid-compare/rule-name": "warn"
    }
}

For currently supported rule:

{
    "rules": {
        "objectid-compare/objectid-compare": "warn"
    }
}

Supported Rules

  • objectid-compare

Usage - Examples

When comparation sign '===' is used, and both sides are type of ObjectId, or can be ObjectId, warning will be shown.

Example 1: example-1 Example 2: example-2


Author Info

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.0

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

0.0.1

1 year ago