mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Performance Improvements: - Add ESLint --cache flags to all lint commands (frontend, backend, cypress) - Frontend linting: 80s -> 2.5s on subsequent runs (97% improvement) - Backend and Cypress linting also benefit from caching Configuration Changes: - Update frontend/package.json: Add --cache flag to lint script - Update backend/package.json: Add --cache flag to lint script - Update package.json: Add --cache flag to lint:cypress script - Add lint:staged script preparation (npx lint-staged) - Update pre-commit hook to use optimized lint:staged approach - Add lint-staged configuration for changed-files-only linting Resolves: Slow pre-commit hooks that caused development delays Impact: Dramatic reduction in linting time, especially on repeated runs
64 lines
2.2 KiB
JSON
64 lines
2.2 KiB
JSON
{
|
|
"name": "backend",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"dev": "npx tsx watch --clear-screen=false src/index.ts",
|
|
"build": "tsc",
|
|
"test:api": "jest src/api-tests --runInBand --coverage --config jest-config.js --detectOpenHandles --forceExit --silent",
|
|
"test:unit": "jest src/unit-tests --coverage --config jest-config.js --detectOpenHandles --forceExit --silent",
|
|
"test:api:local": "DOTENV_CONFIG_PATH=../.test.env npm run test:api -- --setupFiles dotenv/config",
|
|
"start": "node build/index.js",
|
|
"lint": "eslint --cache --report-unused-disable-directives --max-warnings 0",
|
|
"prisma": "prisma generate --schema prisma/schema.prisma && prisma generate --schema prisma/schema_log.prisma",
|
|
"clean": "rm -rf node_modules && rm -rf prisma/generated && rm -rf build && rm -rf coverage"
|
|
},
|
|
"author": "",
|
|
"devDependencies": {
|
|
"@babel/core": "^7.18.5",
|
|
"@babel/preset-env": "^7.18.2",
|
|
"@babel/preset-typescript": "^7.24.7",
|
|
"@eslint/compat": "^1.4.1",
|
|
"@eslint/eslintrc": "^3.1.0",
|
|
"@eslint/js": "^9.13.0",
|
|
"dotenv": "^16.4.5",
|
|
"eslint": "^9.13.0",
|
|
"eslint-config-prettier": "^9.1.0",
|
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
"eslint-plugin-import": "^2.31.0",
|
|
"eslint-plugin-prettier": "^5.2.1",
|
|
"globals": "^15.11.0",
|
|
"jest": "^29.7.0",
|
|
"prettier": "^3.2.5",
|
|
"prisma": "^5.22.0",
|
|
"supertest": "^7.0.0",
|
|
"tsx": "^4.7.1",
|
|
"typescript-eslint": "^8.12.2"
|
|
},
|
|
"dependencies": {
|
|
"@jest/globals": "^29.7.0",
|
|
"@prisma/client": "^5.22.0",
|
|
"@types/bcrypt": "^5.0.2",
|
|
"@types/compression": "^1.7.5",
|
|
"@types/cors": "^2.8.17",
|
|
"@types/express": "^4.17.21",
|
|
"@types/jsonwebtoken": "^9.0.6",
|
|
"@types/md5": "^2.3.5",
|
|
"@types/nodemailer": "^6.4.15",
|
|
"@types/supertest": "^6.0.2",
|
|
"bcrypt": "^5.1.1",
|
|
"compression": "^1.7.4",
|
|
"cors": "^2.8.5",
|
|
"express": "^4.18.2",
|
|
"express-async-errors": "^3.1.1",
|
|
"express-rate-limit": "^7.5.0",
|
|
"fast-csv": "^5.0.2",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"mariadb": "^3.3.0",
|
|
"md5": "^2.3.0",
|
|
"nodemailer": "^6.9.14",
|
|
"typescript": "^5.4.5"
|
|
}
|
|
}
|