chore: configure typescript, biome, and package scripts

This commit is contained in:
MythEclipse
2026-05-18 07:23:22 +07:00
parent 252b2e4a1f
commit 9c5a855f7d
3 changed files with 56 additions and 4 deletions
+32
View File
@@ -0,0 +1,32 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noNonNullAssertion": "off"
},
"suspicious": {
"noExplicitAny": "off"
}
}
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100,
"quoteStyle": "single",
"semicolons": "always"
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
}
}
+9 -4
View File
@@ -4,10 +4,12 @@
"description": "Telegram file uploader backend",
"type": "module",
"scripts": {
"dev": "bun --hot index.js",
"start": "NODE_ENV=production bun index.js",
"dev": "bun --hot src/index.ts",
"start": "NODE_ENV=production bun src/index.ts",
"db:migrate": "psql $DATABASE_URL -f schema.sql",
"test": "bun test test/rateLimit.test.js && bun test test/file.test.js && bun test test/telegram.test.js && bun test test/upload.test.js && bun test test/files.test.js && bun test test/health.test.js && bun test test/bot.test.js && bun test test/bootstrap.test.js"
"test": "bun test test/rateLimit.test.ts && bun test test/file.test.ts && bun test test/telegram.test.ts && bun test test/upload.test.ts && bun test test/files.test.ts && bun test test/health.test.ts && bun test test/bot.test.ts && bun test test/bootstrap.test.ts",
"lint": "bunx biome check src test",
"format": "bunx biome format --write src test"
},
"dependencies": {
"@prisma/engines": "^7.8.0",
@@ -19,6 +21,9 @@
"winston": "^3.11.0"
},
"devDependencies": {
"drizzle-kit": "^0.31.10"
"@biomejs/biome": "^2.4.15",
"@types/node": "^25.8.0",
"drizzle-kit": "^0.31.10",
"typescript": "^6.0.3"
}
}
+15
View File
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"lib": ["ESNext"],
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "Bundler",
"moduleDetection": "force",
"strict": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"types": ["bun-types"]
},
"include": ["src/**/*", "test/**/*"]
}