CI/CD: - Add .github/workflows/deploy.yml (lint, test, build Docker, Coolify deploy) Observability: - Add Pino logger (services/logger.js) — structured JSON logging - Add Prometheus metrics (services/metrics.js) — /metrics endpoint - Replace console.error with pino in error handler - Track http_request_duration, http_requests_total, active_loads, total_commission Testing: - Add Jest config to package.json - Add integration tests (tests/integration/app.test.js) — health, metrics, auth, 404 - Add unit tests (tests/unit/utils.test.js) — formatINR, getStatusColor, calcCommission, WhatsApp parser - Add devDeps: jest, supertest, eslint, prettier UX: - Debounced search (400ms) on Loads list page - Cache-busting asset versioning (?v=timestamp) on CSS/JS includes - ESLint + Prettier configs Package updates: - Add pino, pino-http, prom-client to dependencies - Add jest, eslint, prettier, supertest, nodemon to devDependencies
22 lines
527 B
JSON
22 lines
527 B
JSON
{
|
|
"env": {
|
|
"node": true,
|
|
"es2022": true,
|
|
"jest": true
|
|
},
|
|
"extends": ["eslint:recommended"],
|
|
"parserOptions": {
|
|
"ecmaVersion": 2022,
|
|
"sourceType": "module"
|
|
},
|
|
"rules": {
|
|
"no-var": "error",
|
|
"prefer-const": "warn",
|
|
"no-unused-vars": ["warn", { "argsIgnorePattern": "^(next|req|res)$" }],
|
|
"semi": ["error", "always"],
|
|
"no-console": ["warn", { "allow": ["error"] }],
|
|
"eqeqeq": "error",
|
|
"curly": "error"
|
|
},
|
|
"ignorePatterns": ["public/", "node_modules/", "coverage/"]
|
|
}
|