diff --git a/.prettierrc b/.prettierrc index 0a72520..a20502b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,4 @@ { - "trailingComma": "es5", - "tabWidth": 2, - "semi": true, - "singleQuote": true + "singleQuote": true, + "trailingComma": "all" } diff --git a/src/main.ts b/src/main.ts index 8a9ae9b..43523a0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,8 +18,7 @@ async function bootstrap() { app.useGlobalPipes( new ValidationPipe({ whitelist: true, - // eslint-disable-next-line prettier/prettier - }) + }), ); await app.listen(process.env.PORT || 3000); diff --git a/src/offer/offer.controller.ts b/src/offer/offer.controller.ts index ac92822..65eb13f 100644 --- a/src/offer/offer.controller.ts +++ b/src/offer/offer.controller.ts @@ -1,4 +1,3 @@ -/* eslint-disable prettier/prettier */ import { Body, Controller, @@ -36,7 +35,7 @@ export class OfferController { createRole( @Body() dto: OfferDto, - @GetUser() user: User + @GetUser() user: User, ) { return this.offerService.createOffer(user.id, dto); } @@ -46,7 +45,7 @@ export class OfferController { editOfferById( @Param('id') offerId: string, @Body() dto: OfferDto, - @GetUser() user: User + @GetUser() user: User, ) { return this.offerService.editOfferById(user.id, offerId, dto); } diff --git a/src/trade/trade.controller.ts b/src/trade/trade.controller.ts index d29a24d..4c996b5 100644 --- a/src/trade/trade.controller.ts +++ b/src/trade/trade.controller.ts @@ -1,4 +1,3 @@ -/* eslint-disable prettier/prettier */ import { Body, Controller, @@ -35,7 +34,7 @@ export class TradeController { // @GetUser() user: User, @Body() dto: TradeDto, - @GetUser() user: User + @GetUser() user: User, ) { return this.tradeService.createTrade(user.id, dto); } @@ -45,7 +44,7 @@ export class TradeController { editPromoCodeById( @Param('id') promoCodeId: string, @Body() dto: TradeDto, - @GetUser() user: User + @GetUser() user: User, ) { return this.tradeService.editTradeById(user.id, promoCodeId, dto); } diff --git a/src/trade/trade.service.ts b/src/trade/trade.service.ts index f2fc60c..00b12be 100644 --- a/src/trade/trade.service.ts +++ b/src/trade/trade.service.ts @@ -48,8 +48,7 @@ export class TradeService { const price = crypto.value * dto.amount_traded; if (buyer.dollarAvailables < price) { throw new ForbiddenException( - // eslint-disable-next-line prettier/prettier - `Acqueror ${buyer.pseudo} doesnt have enough money to make this trade` + `Acqueror ${buyer.pseudo} doesnt have enough money to make this trade`, ); } diff --git a/src/user/user.controller.ts b/src/user/user.controller.ts index 13bb563..e033bd6 100644 --- a/src/user/user.controller.ts +++ b/src/user/user.controller.ts @@ -1,4 +1,3 @@ -/* eslint-disable prettier/prettier */ import { Body, Controller, Get, UseGuards } from '@nestjs/common'; import { GetUser } from '../auth/decorator'; import { JwtGuard } from '../auth/guard'; @@ -16,7 +15,7 @@ export class UserController { GetMyAssets( @Body() @GetUser() - user: User + user: User, ) { return this.userService.GetMyAssets(user.id); } @@ -24,7 +23,7 @@ export class UserController { GetMyTrades( @Body() @GetUser() - user: User + user: User, ) { return this.userService.GetMyTrades(user.id); }