Pass linter on server build and start

pull/9/head
MiguelMLorente 2024-11-19 23:33:22 +01:00
parent a1eaab6534
commit 695ae069d5
2 changed files with 7 additions and 4 deletions

View File

@ -6,12 +6,12 @@
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"build": "npm run lint && nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start --watch",
"start": "npm run build && nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint": "eslint \"src/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",

View File

@ -17,6 +17,9 @@ export class AppService implements OnGatewayConnection {
handleCustomEvent(@ConnectedSocket() client:Socket,@MessageBody() data: string): unknown {
this.logger.debug(`Received request in backend with data: ${data}`);
this.logger.debug(`Received data id from client: ${client.id}`);
return {event: "example-response", data: `Replying from backend, received data: ${data}`};
return {
event: 'example-response',
data: `Replying from backend, received data: ${data}`,
};
}
}