feat: add ESLint and Prettier configuration for code quality

- Added ESLint with TypeScript support and custom rules.
- Introduced Prettier for consistent code formatting.
- Updated package.json to include lint and format scripts.
- Modified db.ts to ensure proper parsing of BIGINT types from PostgreSQL.
- Enhanced webRoutes to coerce timestamp fields to numbers and format isDeleted as boolean.
This commit is contained in:
2025-10-25 17:33:48 +02:00
parent 09a2b09913
commit 14c80197cc
13 changed files with 1620 additions and 44 deletions
+7
View File
@@ -7,6 +7,8 @@
"start": "node dist/index.js",
"dev": "ts-node-dev --respawn --transpile-only src/index.ts",
"build": "tsc",
"lint": "eslint src --ext .ts",
"format": "prettier --write \"**/*.{ts,js,json,md,yml,yaml}\"",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": ["collaboration", "api", "express"],
@@ -18,6 +20,11 @@
"better-sqlite3": "^11.0.0",
"dotenv": "^16.3.1",
"ws": "^8.16.0",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.3.3",
"pg": "^8.11.3"
},
"devDependencies": {