Add rules for decorator ordering in DTO and param classes
For describing and validating requests and responses in the NestJs, we use classes and libraries.
Version v1.2.0 supports decorators from the following libraries:
- @nestjs/swagger
- class-validator
- class-transformer
All other decorators are considered custom. These decorators are used on properties inside DTO, query params and path params classes.
Order enforced by the rule:
- @nestjs/swagger
- class-transformer
- class-validator
- IsOptional (class-validator)
- custom decorators
If there are more class-validator or custom decorators, they are ordered alphabetically.