Skip to content

Commit 23904b4

Browse files
committed
Fix lint
1 parent 1d9e93d commit 23904b4

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
],
7373
"@typescript-eslint/no-extraneous-class": "off",
7474
"@typescript-eslint/no-unsafe-member-access": "off",
75+
"@typescript-eslint/restrict-template-expressions": ["error", { "allowNumber": true }],
7576
//#endregion
7677

7778
//#region sonarjs

bin/entity.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,6 @@ if (!process.env.DB_HOST) {
7070
writeFileSync(pathJoin(MODEL_DIR, 'index.ts'), files.join('\n'));
7171

7272
console.log(`> '${db}' database entities has been created: ${MODEL_DIR}`);
73-
})().catch(console.error);
73+
})().catch((error: unknown) => {
74+
console.error(error);
75+
});

src/common/filters/exceptions.filter.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { ArgumentsHost, Catch, HttpException, HttpStatus, Logger } from '@nestjs/common';
22
import { BaseExceptionFilter } from '@nestjs/core';
33
import { GqlArgumentsHost, GqlContextType, GqlExceptionFilter } from '@nestjs/graphql';
4-
import type { Request } from 'express';
54

65
@Catch()
76
export class ExceptionsFilter extends BaseExceptionFilter implements GqlExceptionFilter {
@@ -13,10 +12,9 @@ export class ExceptionsFilter extends BaseExceptionFilter implements GqlExceptio
1312
const gqlHost = GqlArgumentsHost.create(host);
1413
const {
1514
req: {
16-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
1715
body: { operationName, variables },
1816
},
19-
} = gqlHost.getContext<{ req: Request }>();
17+
} = gqlHost.getContext<{ req: { body: { operationName: string; variables: Record<string, unknown> } } }>();
2018
args = `${operationName} ${JSON.stringify(variables)}`;
2119
} else {
2220
super.catch(exception, host);

0 commit comments

Comments
 (0)