0.1.5 • Published 10 months ago

@getlarge/eslint-plugin-nestjs-tools v0.1.5

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

eslint-plugin

npm

This set of ESLint rules is provided to enforce a consistent patterns and practices across all NestJS projects.

Installation

npm install --save @getlarge/eslint-plugin-nestjs-tools

Usage

return-class-instance

This rule enforces that all public Service methods return a class instance of the same return type. The purpose of this rule is to ensure you return class instances instead of plain objects, which is essentials when using the ClassSerializerInterceptor.

In order to use this rule, add it to your ESLint configuration file:

{
  "files": ["*.ts", "*.tsx"],
  "plugins": ["@getlarge/nestjs-tools"],
  "rules": {
    "@getlarge/nestjs-tools/return-class-instance": "error"
  }
}
0.1.4

11 months ago

0.1.5

10 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago