New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-nestjs-orm

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-nestjs-orm

Guardrails to prevent bad practices or do some serious mistakes when using NestJS Moongose or ORMs.

  • 0.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
61
decreased by-46.02%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-nestjs-orm

npm-badge GitHub stars npm

Guardrails to prevent bad practices or do some serious mistakes when using NestJS Moongose or ORMs.

Motivation 💡

No one likes unused variables, and we remove them. But with Mongoose there is a catch, if you attach inject model to non-model variable accidentally, you will get no error, but you will get a bug. This plugin will help you to avoid this.

One such incident is shown below:

BeforeAfter
BeforeAfter

Installation 🛠️

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-nestjs-orm:

npm install eslint-plugin-nestjs-orm --save-dev

Usage 🚀

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

{
    "plugins": [
        "nestjs-orm"
    ]
}

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

{
    "rules": {
        "nestjs-orm/mongoose-no-bad-model-injection": "error"
    }
}

Tools Used 💪🏻

Keywords

FAQs

Package last updated on 31 Jan 2024

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