update:更新依赖、代码格式lint

This commit is contained in:
3R-喜东东 2023-12-12 14:36:01 +08:00
parent f4b38483d6
commit dbc14c2137
5 changed files with 357 additions and 338 deletions

View File

@ -25,13 +25,13 @@
"@nestjs/platform-fastify": "^10.2.10", "@nestjs/platform-fastify": "^10.2.10",
"@nestjs/swagger": "^7.1.16", "@nestjs/swagger": "^7.1.16",
"@nestjs/typeorm": "^10.0.1", "@nestjs/typeorm": "^10.0.1",
"better-sqlite3": "^9.2.0", "better-sqlite3": "^9.2.2",
"class-transformer": "^0.5.1", "class-transformer": "^0.5.1",
"class-validator": "^0.14.0", "class-validator": "^0.14.0",
"deepmerge": "^4.3.1", "deepmerge": "^4.3.1",
"fastify": "^4.24.3", "fastify": "^4.24.3",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.14",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"sanitize-html": "^2.11.0", "sanitize-html": "^2.11.0",
"typeorm": "^0.3.17" "typeorm": "^0.3.17"
@ -42,13 +42,13 @@
"@nestjs/testing": "^10.2.10", "@nestjs/testing": "^10.2.10",
"@swc/cli": "^0.1.63", "@swc/cli": "^0.1.63",
"@swc/core": "^1.3.100", "@swc/core": "^1.3.100",
"@types/jest": "^29.5.10", "@types/jest": "^29.5.11",
"@types/lodash": "^4.14.202", "@types/lodash": "^4.14.202",
"@types/node": "^20.10.2", "@types/node": "^20.10.4",
"@types/sanitize-html": "^2.9.5", "@types/sanitize-html": "^2.9.5",
"@types/supertest": "^2.0.16", "@types/supertest": "^2.0.16",
"@typescript-eslint/eslint-plugin": "^6.13.1", "@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.13.1", "@typescript-eslint/parser": "^6.14.0",
"eslint": "^8.55.0", "eslint": "^8.55.0",
"eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0", "eslint-config-airbnb-typescript": "^17.1.0",
@ -58,14 +58,14 @@
"eslint-plugin-prettier": "^5.0.1", "eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-unused-imports": "^3.0.0", "eslint-plugin-unused-imports": "^3.0.0",
"jest": "^29.7.0", "jest": "^29.7.0",
"prettier": "^3.1.0", "prettier": "^3.1.1",
"source-map-support": "^0.5.21", "source-map-support": "^0.5.21",
"supertest": "^6.3.3", "supertest": "^6.3.3",
"ts-jest": "^29.1.1", "ts-jest": "^29.1.1",
"ts-loader": "^9.5.1", "ts-loader": "^9.5.1",
"ts-node": "^10.9.1", "ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0", "tsconfig-paths": "^4.2.0",
"typescript": "^5.3.2" "typescript": "^5.3.3"
}, },
"jest": { "jest": {
"moduleFileExtensions": [ "moduleFileExtensions": [

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,13 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { APP_FILTER, APP_INTERCEPTOR, APP_PIPE } from '@nestjs/core';
import { database } from '@/config'; import { database } from '@/config';
import { ContentModule } from '@/modules/content/content.module'; import { ContentModule } from '@/modules/content/content.module';
import { CoreModule } from '@/modules/core/core.module'; import { CoreModule } from '@/modules/core/core.module';
import { AppFilter, AppIntercepter, AppPipe } from '@/modules/core/providers'; import { AppFilter, AppIntercepter, AppPipe } from '@/modules/core/providers';
import { DatabaseModule } from '@/modules/database/database.module'; import { DatabaseModule } from '@/modules/database/database.module';
import { WelcomeModule } from '@/modules/welcome/welcome.module'; import { WelcomeModule } from '@/modules/welcome/welcome.module';
import { APP_FILTER, APP_INTERCEPTOR, APP_PIPE } from '@nestjs/core';
@Module({ @Module({
imports: [DatabaseModule.forRoot(database), ContentModule, WelcomeModule, CoreModule.forRoot()], imports: [DatabaseModule.forRoot(database), ContentModule, WelcomeModule, CoreModule.forRoot()],

View File

@ -1,8 +1,9 @@
import { DTO_VALIDATION_OPTIONS } from '@/modules/core/constants';
import { Paramtype, SetMetadata } from '@nestjs/common'; import { Paramtype, SetMetadata } from '@nestjs/common';
import { ClassTransformOptions } from 'class-transformer'; import { ClassTransformOptions } from 'class-transformer';
import { ValidatorOptions } from 'class-validator'; import { ValidatorOptions } from 'class-validator';
import { DTO_VALIDATION_OPTIONS } from '@/modules/core/constants';
/** /**
* DTO类装饰器 * DTO类装饰器
* @params options * @params options

View File

@ -1,5 +1,3 @@
import { DTO_VALIDATION_OPTIONS } from '@/modules/core/constants';
import { deepMerge } from '@/modules/core/helpers';
import { import {
ArgumentMetadata, ArgumentMetadata,
BadRequestException, BadRequestException,
@ -7,8 +5,12 @@ import {
Paramtype, Paramtype,
ValidationPipe, ValidationPipe,
} from '@nestjs/common'; } from '@nestjs/common';
import { isObject, omit } from 'lodash'; import { isObject, omit } from 'lodash';
import { DTO_VALIDATION_OPTIONS } from '@/modules/core/constants';
import { deepMerge } from '@/modules/core/helpers';
/** /**
* DTO验证 * DTO验证
*/ */