@getlarge/eslint-plugin-nestjs-tools
v0.1.5
Published
ESLint rules for NestJS applications
Downloads
46
Maintainers
Readme
eslint-plugin
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"
}
}