Skip to content

Commit

Permalink
fix: add more unicorn rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiin committed Oct 11, 2023
1 parent c695f62 commit 0398326
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 34 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"@nestjs/cli": "10.1.18",
"@nestjs/schematics": "10.0.2",
"@nestjs/testing": "10.2.7",
"@rubiin/eslint-config": "^1.8.17",
"@rubiin/eslint-config": "^1.8.19",
"@rubiin/tsconfig": "^1.1.0",
"@sentry/types": "^7.73.0",
"@side/jest-runtime": "^1.1.0",
Expand Down
152 changes: 121 additions & 31 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/common/helpers/app.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ export const AppUtils = {
setTimeout(() => process.exit(1), 5000);
logger.verbose(`Signal received with code ${code} ⚡.`);
logger.log("❗Closing http server with grace.");
// eslint-disable-next-line rubiin/no-then
app.close().then(() => {
logger.log("✅ Http server closed.");
process.exit(0);
})
// eslint-disable-next-line rubiin/no-then
.catch((error) => {
logger.error(`❌ Http server closed with error: ${error}`);
process.exit(1);
Expand Down
3 changes: 1 addition & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ async function bootstrap() {
}

try {
~(async () => await bootstrap())();
(async () => await bootstrap())();
}

catch (error) {
logger.error(error);
}

0 comments on commit 0398326

Please sign in to comment.