Currently this rule will skip if the parameter is of type Identifier or TemplateLiteral. Along the same lines, I believe it should skip if the parameter is of type MemberExpression (Enum or Static Class Method).
For example, the below will trigger an error.
enum AppRoutes {
Root = 'app',
VerifyParams = ':id',
}
@Controller(AppRoutes.Root)
export class AppController {
@Post(AppRoutes.VerifyParams)
verifyParams(@Param('id', ParseUUIDPipe) id: string): VerifyParamsResponseDto {
return new VerifyParamsResponseDto({ token: id });
}
}
Another option would be to skip if the parameter is not of type Literal, ArrayExpression, or ObjectExpression.
Currently this rule will skip if the parameter is of type Identifier or TemplateLiteral. Along the same lines, I believe it should skip if the parameter is of type MemberExpression (Enum or Static Class Method).
For example, the below will trigger an error.
Another option would be to skip if the parameter is not of type Literal, ArrayExpression, or ObjectExpression.