From 1c3ef056b2f3be4e1c61f270f284a277cadc58f7 Mon Sep 17 00:00:00 2001 From: Inga Date: Sun, 22 Oct 2023 19:11:31 +0000 Subject: [PATCH] use strict eslint config --- .eslintrc.js | 6 +++--- src/app.module.ts | 2 ++ src/main.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 259de13..c417de3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,7 +7,8 @@ module.exports = { }, plugins: ['@typescript-eslint/eslint-plugin'], extends: [ - 'plugin:@typescript-eslint/recommended', + 'eslint:recommended', + 'plugin:@typescript-eslint/strict-type-checked', 'plugin:prettier/recommended', ], root: true, @@ -19,7 +20,6 @@ module.exports = { rules: { '@typescript-eslint/interface-name-prefix': 'off', '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off' }, }; diff --git a/src/app.module.ts b/src/app.module.ts index da156b4..30914da 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -7,4 +7,6 @@ import { AppService } from './app.service'; controllers: [AppController], providers: [AppService], }) + +// eslint-disable-next-line @typescript-eslint/no-extraneous-class export class AppModule {} diff --git a/src/main.ts b/src/main.ts index 827b631..25f3010 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,4 +5,4 @@ async function bootstrap() { const app = await NestFactory.create(AppModule); await app.listen(3000); } -bootstrap(); +void bootstrap();