Skip to content

Commit d8714bd

Browse files
committed
chore(deps): bump up all packages, update eslint config
1 parent 4e89a9d commit d8714bd

File tree

5 files changed

+1610
-1447
lines changed

5 files changed

+1610
-1447
lines changed

.eslintrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/middlewares/validateRequest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { NextFunction, Request, Response } from 'express'
22

3+
import createHttpError from 'http-errors'
34
import * as z from 'zod'
45

56
type ValidateRequest<B, P> = {
@@ -41,7 +42,7 @@ export const validateRequest =
4142
parseAndValidate(req.params, paramsSchema)
4243

4344
if (Object.keys(errors).length > 0) {
44-
return res.status(400).json({ statusCode: 400, messages: errors })
45+
return next(createHttpError(400, errors))
4546
}
4647

4748
next()

eslint.config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import eslintPluginJs from '@eslint/js'
2+
import eslintTsParser from '@typescript-eslint/parser'
3+
import eslintTypescript from 'typescript-eslint'
4+
5+
export default eslintTypescript.config(
6+
{
7+
languageOptions: {
8+
parser: eslintTsParser,
9+
ecmaVersion: 2018,
10+
sourceType: 'module',
11+
parserOptions: { warnOnUnsupportedTypeScriptVersion: false }
12+
}
13+
},
14+
eslintPluginJs.configs.recommended,
15+
eslintTypescript.configs.recommended,
16+
{ rules: { 'newline-before-return': 'error' } },
17+
{
18+
rules: {
19+
'@typescript-eslint/no-unused-vars': [
20+
'error',
21+
{ argsIgnorePattern: '^_' }
22+
],
23+
'@typescript-eslint/no-import-type-side-effects': 'error',
24+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
25+
'@typescript-eslint/array-type': ['error', { default: 'array' }],
26+
'@typescript-eslint/naming-convention': [
27+
'error',
28+
{ selector: 'typeLike', format: ['PascalCase'] }
29+
]
30+
}
31+
}
32+
)

package.json

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,47 @@
1414
"prepare": "husky"
1515
},
1616
"dependencies": {
17-
"@prisma/client": "^5.22.0",
17+
"@prisma/client": "^6.4.0",
1818
"bcrypt": "^5.1.1",
19-
"cloudinary": "^2.0.0",
19+
"cloudinary": "^2.5.1",
2020
"cors": "2.8.5",
21-
"dotenv": "^16.3.1",
22-
"express": "4.17.1",
23-
"google-auth-library": "^9.15.0",
21+
"dotenv": "^16.4.7",
22+
"express": "^4.21.2",
23+
"google-auth-library": "^9.15.1",
2424
"http-errors": "^2.0.0",
2525
"jsonwebtoken": "^9.0.2",
2626
"morgan": "1.10.0",
2727
"multer": "^1.4.5-lts.1",
28-
"nodemailer": "^6.9.9",
28+
"nodemailer": "^6.10.0",
2929
"swagger-ui-express": "^5.0.0",
30-
"zod": "^3.23.8"
30+
"zod": "^3.24.2"
3131
},
3232
"devDependencies": {
33-
"@commitlint/cli": "^18.6.0",
34-
"@commitlint/config-conventional": "^18.6.0",
35-
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
33+
"@commitlint/cli": "^19.7.1",
34+
"@commitlint/config-conventional": "^19.7.1",
35+
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
3636
"@types/bcrypt": "^5.0.2",
3737
"@types/cors": "^2.8.17",
38-
"@types/express": "^4.17.21",
38+
"@types/express": "4.17.21",
3939
"@types/jsonwebtoken": "^9.0.5",
4040
"@types/morgan": "^1.9.9",
41-
"@types/multer": "^1.4.11",
42-
"@types/node": "^20.11.10",
43-
"@types/nodemailer": "^6.4.14",
41+
"@types/multer": "^1.4.12",
42+
"@types/node": "^22.13.4",
43+
"@types/nodemailer": "^6.4.17",
4444
"@types/swagger-ui-express": "^4.1.6",
45-
"@types/validator": "^13.11.8",
46-
"@typescript-eslint/eslint-plugin": "^6.20.0",
47-
"@typescript-eslint/parser": "^6.20.0",
48-
"eslint": "^8.56.0",
49-
"eslint-formatter-mo": "^1.2.0",
50-
"husky": "^9.0.6",
51-
"lint-staged": "^15.2.7",
52-
"prettier": "^3.3.2",
53-
"prisma": "^5.22.0",
45+
"@types/validator": "^13.12.2",
46+
"@typescript-eslint/parser": "^8.24.1",
47+
"eslint": "^9.20.1",
48+
"eslint-formatter-mo": "^2.2.0",
49+
"husky": "^9.1.7",
50+
"jiti": "^2.4.2",
51+
"lint-staged": "^15.4.3",
52+
"prettier": "^3.5.1",
53+
"prisma": "^6.4.0",
5454
"ts-node": "^10.9.2",
5555
"ts-node-dev": "^2.0.0",
5656
"tsconfig-paths": "^4.2.0",
57-
"typescript": "^5.4.5"
57+
"typescript": "^5.7.3",
58+
"typescript-eslint": "^8.24.1"
5859
}
5960
}

0 commit comments

Comments
 (0)