refactor: Convert project from JavaScript to TypeScript

- Converted all .js files to .ts
- Added TypeScript configuration (tsconfig.json)
- Added ESLint and Prettier configuration
- Updated package.json dependencies
- Modified Docker and application configurations
This commit is contained in:
2025-04-24 13:48:10 +08:00
parent 75185a59c3
commit 3c4dc51855
32 changed files with 1212 additions and 1004 deletions

View File

@@ -2,9 +2,13 @@
"name": "discord-music-bot",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "dist/index.js",
"scripts": {
"start": "node src/index.js",
"build": "tsc",
"start": "node dist/index.js",
"dev": "ts-node-dev --respawn --transpile-only src/index.ts",
"lint": "eslint src/**/*.ts tests/**/*.ts deploy-commands.ts",
"format": "prettier --write src/**/*.ts tests/**/*.ts deploy-commands.ts",
"test": "jest"
},
"keywords": [],
@@ -17,7 +21,18 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/js-yaml": "^4.0.9",
"@types/node": "^22.14.1",
"@typescript-eslint/eslint-plugin": "^8.31.0",
"@typescript-eslint/parser": "^8.31.0",
"eslint": "^9.25.1",
"eslint-config-prettier": "^10.1.2",
"eslint-plugin-prettier": "^5.2.6",
"jest": "^29.7.0",
"js-yaml": "^4.1.0"
"js-yaml": "^4.1.0",
"prettier": "^3.5.3",
"ts-node-dev": "^2.0.0",
"typescript": "^5.8.3"
}
}