Controller parameters ordering
Only NestJS controller files are linted.
Only controller function parameters are linted.
Parameters are linted only if all parameters have decorator.
Custom parameters are last and ordered by name ascending.
// Bad
public findAll(
@Req() req: ProficoRequest,
@Query() queryParams: QueryParams,
@Custom2() customParam2: CustomParam,
@Custom1() customParam1: CustomParam,
) {
return this.service.find();
}
// Good
public findAll(
@Query() queryParams: QueryParams,
@Req() req: ProficoRequest,
@Custom1() customParam1: CustomParam,
@Custom2() customParam2: CustomParam,
) {
return this.service.find();
}