From 4cab83eb9982109f7e527c8f67c71028f7a2bcb9 Mon Sep 17 00:00:00 2001 From: Ahmed Elsakaan Date: Wed, 26 Apr 2023 14:14:48 +0100 Subject: [PATCH] chore(nextjs): changes application generator tsconfig strict to true (#14855) --- e2e/next/src/next.test.ts | 5 +++-- .../application/files/common/tsconfig.json__tmpl__ | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/e2e/next/src/next.test.ts b/e2e/next/src/next.test.ts index 9c033a729b..c260e4624f 100644 --- a/e2e/next/src/next.test.ts +++ b/e2e/next/src/next.test.ts @@ -106,7 +106,8 @@ describe('Next.js Applications', () => { ` import { jsLibAsync } from '@${proj}/${jsLib}'; - export default async function handler(_, res) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + export default async function handler(_: any, res: any) { const value = await jsLibAsync(); res.send(value); } @@ -261,7 +262,7 @@ describe('Next.js Applications', () => { updateFile( `apps/${appName}/pages/api/hello.js`, ` - export default (_req, res) => { + export default (_req: any, res: any) => { res.status(200).send('Welcome'); }; ` diff --git a/packages/next/src/generators/application/files/common/tsconfig.json__tmpl__ b/packages/next/src/generators/application/files/common/tsconfig.json__tmpl__ index 35fd206998..885d5aa75a 100644 --- a/packages/next/src/generators/application/files/common/tsconfig.json__tmpl__ +++ b/packages/next/src/generators/application/files/common/tsconfig.json__tmpl__ @@ -6,7 +6,7 @@ "allowJs": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, - "strict": false, + "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "resolveJsonModule": true,