From e3efb6bb2368b61109d67a6e8b072a8fe07d6ffa Mon Sep 17 00:00:00 2001 From: Inga Date: Sun, 22 Oct 2023 17:20:30 +0000 Subject: [PATCH] use strict ts config --- package-lock.json | 7 +++++++ package.json | 1 + test/app.e2e-spec.ts | 2 +- tsconfig.json | 7 ++----- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 950bc97..40e87cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@nestjs/cli": "^10.0.0", "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", + "@tsconfig/strictest": "^2.0.2", "@types/express": "^4.17.17", "@types/jest": "^29.5.2", "@types/node": "^20.3.1", @@ -1836,6 +1837,12 @@ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true }, + "node_modules/@tsconfig/strictest": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/strictest/-/strictest-2.0.2.tgz", + "integrity": "sha512-jt4jIsWKvUvuY6adJnQJlb/UR7DdjC8CjHI/OaSQruj2yX9/K6+KOvDt/vD6udqos/FUk5Op66CvYT7TBLYO5Q==", + "dev": true + }, "node_modules/@types/babel__core": { "version": "7.20.3", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.3.tgz", diff --git a/package.json b/package.json index 260962a..6fcf0a0 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@nestjs/cli": "^10.0.0", "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", + "@tsconfig/strictest": "^2.0.2", "@types/express": "^4.17.17", "@types/jest": "^29.5.2", "@types/node": "^20.3.1", diff --git a/test/app.e2e-spec.ts b/test/app.e2e-spec.ts index ce86fb8..bd17625 100644 --- a/test/app.e2e-spec.ts +++ b/test/app.e2e-spec.ts @@ -1,6 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing'; import { INestApplication } from '@nestjs/common'; -import * as request from 'supertest'; +import request from 'supertest'; import { AppModule } from './../src/app.module'; describe('AppController (e2e)', () => { diff --git a/tsconfig.json b/tsconfig.json index 95f5641..7372c6e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,5 @@ { + "extends": "@tsconfig/strictest/tsconfig.json", "compilerOptions": { "module": "commonjs", "declaration": true, @@ -12,10 +13,6 @@ "baseUrl": "./", "incremental": true, "skipLibCheck": true, - "strictNullChecks": false, - "noImplicitAny": false, - "strictBindCallApply": false, - "forceConsistentCasingInFileNames": false, - "noFallthroughCasesInSwitch": false + "forceConsistentCasingInFileNames": false } }