Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions packages/server/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export default ts.config(
prettier,
{
languageOptions: {
globals: { ...globals.node }
globals: { ...globals.node },
parserOptions: {
project: "./tsconfig.json"
}
},
rules: {
"no-undef": "off",
Expand All @@ -20,7 +23,13 @@ export default ts.config(
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-empty-object-type": "off",
"no-useless-catch": "warn"
"no-useless-catch": "warn",
// prevent auth bypass via missing await on async functions
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{ checksConditionals: true }
]
}
}
)
6 changes: 3 additions & 3 deletions packages/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ const gracefulShutdown = async (signal: string) => {
}

// Handle shutdown signals
process.on("SIGTERM", () => gracefulShutdown("SIGTERM"))
process.on("SIGINT", () => gracefulShutdown("SIGINT"))
process.on("SIGTERM", () => void gracefulShutdown("SIGTERM"))
process.on("SIGINT", () => void gracefulShutdown("SIGINT"))

// Start the server
const start = async (port: number) => {
Expand All @@ -94,4 +94,4 @@ const start = async (port: number) => {
}
}

start(Number(process.env.PORT))
void start(Number(process.env.PORT))