chore: cleanup
This commit is contained in:
13
.eslintrc.js
13
.eslintrc.js
@@ -1,7 +1,20 @@
|
||||
module.exports = {
|
||||
extends: ['@innei-util/eslint-config-ts'],
|
||||
plugins: ['unused-imports'],
|
||||
rules: {
|
||||
'no-empty': 'warn',
|
||||
'no-fallthrough': 'error',
|
||||
'no-unused-vars': 'off', // or "@typescript-eslint/no-unused-vars": "off",
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'unused-imports/no-unused-imports': 'error',
|
||||
'unused-imports/no-unused-vars': [
|
||||
'warn',
|
||||
{
|
||||
vars: 'all',
|
||||
varsIgnorePattern: '^_',
|
||||
args: 'after-used',
|
||||
argsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
"cron": "*",
|
||||
"cross-env": "7.0.3",
|
||||
"eslint": "*",
|
||||
"eslint-plugin-unused-imports": "2.0.0",
|
||||
"husky": "7.0.4",
|
||||
"ioredis": "5.0.4",
|
||||
"jest": "27.5.1",
|
||||
|
||||
21
pnpm-lock.yaml
generated
21
pnpm-lock.yaml
generated
@@ -67,6 +67,7 @@ specifiers:
|
||||
dayjs: 1.11.0
|
||||
ejs: 3.1.6
|
||||
eslint: '*'
|
||||
eslint-plugin-unused-imports: 2.0.0
|
||||
fastify-cookie: 5.6.0
|
||||
fastify-multipart: 5.3.1
|
||||
fastify-swagger: 5.1.1
|
||||
@@ -217,6 +218,7 @@ devDependencies:
|
||||
cron: 1.7.2
|
||||
cross-env: 7.0.3
|
||||
eslint: 8.11.0
|
||||
eslint-plugin-unused-imports: 2.0.0_eslint@8.11.0
|
||||
husky: 7.0.4
|
||||
ioredis: 5.0.4
|
||||
jest: 27.5.1_ts-node@10.7.0
|
||||
@@ -3672,6 +3674,25 @@ packages:
|
||||
tsconfig-paths: 3.14.1
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-unused-imports/2.0.0_eslint@8.11.0:
|
||||
resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/eslint-plugin': ^5.0.0
|
||||
eslint: ^8.0.0
|
||||
peerDependenciesMeta:
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
optional: true
|
||||
dependencies:
|
||||
eslint: 8.11.0
|
||||
eslint-rule-composer: 0.3.0
|
||||
dev: true
|
||||
|
||||
/eslint-rule-composer/0.3.0:
|
||||
resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
dev: true
|
||||
|
||||
/eslint-scope/5.1.1:
|
||||
resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
import { Observable } from 'rxjs'
|
||||
|
||||
import {
|
||||
CanActivate,
|
||||
ExecutionContext,
|
||||
Inject,
|
||||
Injectable,
|
||||
} from '@nestjs/common'
|
||||
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'
|
||||
import { AuthGuard as _AuthGuard } from '@nestjs/passport'
|
||||
|
||||
import { isTest } from '~/global/env.global'
|
||||
import { mockUser1 } from '~/mock/user.mock'
|
||||
import { AuthService } from '~/modules/auth/auth.service'
|
||||
import { UserService } from '~/modules/user/user.service'
|
||||
import { getNestExecutionContextRequest } from '~/transformers/get-req.transformer'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
import { Transform } from 'class-transformer'
|
||||
import {
|
||||
IsIn,
|
||||
IsInt,
|
||||
IsOptional,
|
||||
IsString,
|
||||
Min,
|
||||
ValidateIf,
|
||||
} from 'class-validator'
|
||||
import { IsIn, IsInt, IsString, Min, ValidateIf } from 'class-validator'
|
||||
|
||||
export class LogQueryDto {
|
||||
@IsIn(['out', 'error'])
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
|
||||
import { BusinessEvents, EventScope } from '~/constants/business-event.constant'
|
||||
import { isDev } from '~/global/env.global'
|
||||
import { AdminEventsGateway } from '~/processors/gateway/admin/events.gateway'
|
||||
import {
|
||||
EmailService,
|
||||
LinkApplyEmailType,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Transform } from 'class-transformer'
|
||||
import { IsBoolean, IsIn, IsOptional, IsSemVer, IsUrl } from 'class-validator'
|
||||
import { IsBoolean, IsIn, IsOptional, IsSemVer } from 'class-validator'
|
||||
|
||||
import { IsAllowedUrl } from '~/utils/validator/isAllowedUrl'
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
BadRequestException,
|
||||
ForbiddenException,
|
||||
Injectable,
|
||||
InternalServerErrorException,
|
||||
Logger,
|
||||
UnprocessableEntityException,
|
||||
} from '@nestjs/common'
|
||||
|
||||
Reference in New Issue
Block a user