darraghoriordan / eslint-plugin-nestjs-typed

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

fix: Treat literals like primitives in validated-non-primitive-property-needs-type-decorator #188

Closed abrindam closed 5 months ago

abrindam commented 5 months ago

Fixes #185.

Treats literal types, e.g. literal strings or literal numbers, as primitives for the purposes of this rule. Properties whose type are a literal type, or are union types containing literal types, no longer trigger the need for @Type decorator.

Includes a couple of test cases that used to fail.

darraghoriordan commented 5 months ago

thank you!

darraghoriordan commented 5 months ago

:tada: This PR is included in version 5.0.10 :tada:

The release is available on:

Your semantic-release bot :package::rocket: