Skip to content

Commit

Permalink
resolve lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryKwon committed Jan 15, 2025
1 parent f01c64e commit e321f62
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 37 deletions.
20 changes: 0 additions & 20 deletions clinic.js

This file was deleted.

3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const compat = new FlatCompat({

export default [
{
ignores: ['**/.eslintrc.js', '**/dist'],
ignores: ['**/.eslintrc.js', '**/eslint.config.mjs', '**/dist'],
},
...compat.extends(
'eslint:recommended',
Expand Down Expand Up @@ -56,6 +56,7 @@ export default [
'no-irregular-whitespace': 'off',
'no-extra-boolean-cast': 'off',
'no-inner-declarations': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-interface': 'off',
},
Expand Down
6 changes: 0 additions & 6 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ import { PrismaModule } from './prisma/prisma.module';
},
inject: [AuthConfig],
},
{
provide: APP_GUARD,
useFactory: () => {
const env = process.env.NODE_ENV;
},
},
JwtCookieGuard,
MockAuthGuard,
AppService,
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AppModule } from '../app.module';
import settings from '../settings';
import { SwaggerModule } from '@nestjs/swagger';
// import { AuthGuard, MockAuthGuard } from '../../common/guards/auth.guard'
import morgan = require('morgan');
import morgan from 'morgan';

async function bootstrap() {
const app = await NestFactory.create(AppModule);
Expand Down
2 changes: 0 additions & 2 deletions src/common/api-docs/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/ban-types */

import {
IAuth,
IUser,
Expand Down
6 changes: 2 additions & 4 deletions src/common/decorators/validators.decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export function RegexValidator(
regexExps: RegExp[],
validationOptions?: { message?: string },
) {
// eslint-disable-next-line @typescript-eslint/ban-types
return function (object: Object, propertyName: string) {
return function (object: object, propertyName: string) {
registerDecorator({
name: 'regexValidator',
target: object.constructor,
Expand All @@ -46,8 +45,7 @@ export function InverseRegexValidator(
regexExps: RegExp[],
validationOptions?: { message?: string },
) {
// eslint-disable-next-line @typescript-eslint/ban-types
return function (object: Object, propertyName: string) {
return function (object: object, propertyName: string) {
registerDecorator({
name: 'regexValidator',
target: object.constructor,
Expand Down
2 changes: 1 addition & 1 deletion src/common/interfaces/IAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export namespace IAuth {
};
}

export interface Response extends _Response {}
export type Response = _Response;

export interface JwtPayload {
sid: string;
Expand Down
4 changes: 2 additions & 2 deletions test/prisma.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ describe('AppController (e2e)', () => {
queryResult,
['ALL'],
);

const order = ['old_code', 'class_no'];
const orderedQuery = applyOrder<ELecture.Details>(
levelFilteredResult,
(['old_code', 'class_no'] ?? DEFAULT_ORDER) as (keyof ELecture.Details)[],
(order ?? DEFAULT_ORDER) as (keyof ELecture.Details)[],
);
const result = applyOffset<ELecture.Details>(orderedQuery, 0);
});
Expand Down

0 comments on commit e321f62

Please sign in to comment.