From 0d67663476bc573830c26f2762d5283fb7465684 Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Tue, 3 Oct 2023 22:17:47 +0545 Subject: [PATCH] chores: remove uneeded deps and configs --- .editorconfig | 2 +- .lintstagedrc | 6 +----- package.json | 5 +---- pnpm-lock.yaml | 8 ++++---- src/common/@types/types/common.types.ts | 2 +- src/modules/user/user.service.ts | 4 ++-- 6 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.editorconfig b/.editorconfig index b668e65f..dc3b8f03 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,5 +14,5 @@ trim_trailing_whitespace = true quote_type = single [Makefile] -indent_size = 8 +indent_size = 4 indent_style = tab diff --git a/.lintstagedrc b/.lintstagedrc index 9ddc07b9..f3b33662 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,9 +1,5 @@ { "*.{ts,tsx}": [ - "eslint_d '{src,test}/**/*.ts' --cache --fix", - "prettier --cache --write" - ], - "*.{json,md,yaml,yml}": [ - "prettier --cache --write" + "eslint --cache --fix" ] } diff --git a/package.json b/package.json index 59675630..ba46a2c3 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "lint": "eslint --cache", "lint:fix": "eslint --cache --fix", "orm": "npx mikro-orm", - "prebuild": "rimraf dist", "sample": "cd env; npx sample-env --env .env.dev", "start": "nest start", "start:dev": "nest start --watch", @@ -98,7 +97,6 @@ "date-fns": "^2.30.0", "date-fns-tz": "^2.0.0", "eta": "^3.1.1", - "express-basic-auth": "^1.2.1", "firebase-admin": "^11.11.0", "handlebars": "^4.7.8", "helmet": "^7.0.0", @@ -123,7 +121,7 @@ "passport-magic-login": "^1.2.2", "pino-http": "^8.5.0", "pino-pretty": "^10.2.0", - "poolifier": "^2.7.4", + "poolifier": "^2.7.5", "preview-email": "^3.0.19", "prom-client": "^14.2.0", "pug": "^3.0.2", @@ -178,7 +176,6 @@ "cross-env": "^7.0.3", "cz-conventional-changelog": "3.3.0", "eslint": "^8.50.0", - "eslint_d": "^12.2.1", "husky": "^8.0.3", "jest": "29.7.0", "lint-staged": "^14.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4b681d48..9c51bdb5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -210,8 +210,8 @@ dependencies: specifier: ^10.2.0 version: 10.2.0 poolifier: - specifier: ^2.7.4 - version: 2.7.4 + specifier: ^2.7.5 + version: 2.7.5 preview-email: specifier: ^3.0.19 version: 3.0.19 @@ -11686,8 +11686,8 @@ packages: resolution: {integrity: sha512-3IKLNXclQgkU++2fSi93sQ6BznFuxSLB11HdvZQ6JW/spahf/P1pAHBQEahr20rs0htZW0UDkM1HmA+nZkXKsw==} engines: {node: '>=12.0.0'} - /poolifier@2.7.4: - resolution: {integrity: sha512-Rkw7M1reDRWPLnPtS8+DFcv8IQIie44TBQ4CgQMSghu2YZ4Gip1VwbTw9t+SEgiLbIe6+cSTdlYAGtQ81DD67A==} + /poolifier@2.7.5: + resolution: {integrity: sha512-JU12qU1IpW2abb5N6YTBPbnQL6wYX3hdjUy/jR+2VIZI97R/20GwuVwZxkQTyt+IsZBneEpqz3/ym1fOeorZAQ==} engines: {node: '>=16.14.0', pnpm: '>=8.6.0'} requiresBuild: true dev: false diff --git a/src/common/@types/types/common.types.ts b/src/common/@types/types/common.types.ts index d8012a70..ca76c24b 100644 --- a/src/common/@types/types/common.types.ts +++ b/src/common/@types/types/common.types.ts @@ -4,6 +4,6 @@ export type Optional = T | undefined; export type Nullable = T | null; // This type represents a dto that contains a file or files -export type DtoWithFile = T & { +export type RecordWithFile = T & { files: K }; diff --git a/src/modules/user/user.service.ts b/src/modules/user/user.service.ts index 43e456b4..7443c349 100644 --- a/src/modules/user/user.service.ts +++ b/src/modules/user/user.service.ts @@ -11,7 +11,7 @@ import type { Observable } from "rxjs"; import { from, map, mergeMap, of, switchMap, throwError } from "rxjs"; import type { - DtoWithFile, + RecordWithFile, PaginationResponse, } from "@common/@types"; import { @@ -99,7 +99,7 @@ export class UserService { * @param dto - CreateWithFile * @returns The user object */ - create(dto: DtoWithFile): Observable { + create(dto: RecordWithFile): Observable { const { files, ...rest } = dto; const user = this.userRepository.create(rest);