darraghoriordan / eslint-plugin-nestjs-typed

Some eslint rules for working with NestJs projects
http://www.darraghoriordan.com
171 stars 34 forks source link

New Rule: Use Dependency Injection #140

Open AlissonRS opened 8 months ago

AlissonRS commented 8 months ago

Controllers and Services should not have properties, apart from the ones injected via DI (e.g. in the constructor).

There was a similar rule in this POC, I think it's a very nice rule: https://github.com/unlight/eslint-plugin-nestjs/blob/master/src/use-dependency-injection/use-dependency-injection.md

darraghoriordan commented 8 months ago

Sounds good to me! Feel free to create a PR based on that the code from the other repo