Closed micalevisk closed 1 year ago
Yea nice, this could be a rule. It could even be configurable because most of the decorators from nest/core likely shouldnt be applied twice.
@darraghoriordan good ideia
are you 100% sure that something like that is possible to have as a rule? I'm not familiar with ESLint rules but I can give it a try
:tada: This issue has been resolved in version 4.3.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Hey I added this rule. You can read the docs to see how you would configure it with your own list of decorators like "DiscoverDecorator".
since
@nestjs/core
v10.2.0 we can use theDiscoveryService.createDecorator
to create type-safe decoratorsbut we shouldn't be using them multiple times like this:
I'm not sure if this is feasbile to achieve as a lint rule.
sample code: https://stackblitz.com/edit/nestjs-discovery-service-issue-bt5oae