From 0974863fba844cd8ac22d143f7f0ca7e182788a3 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 16 Aug 2022 09:53:54 +0100 Subject: [PATCH] Enable additional TypeScript ESLint rules --- .eslintrc.json | 8 ++++++-- packages/next/types/misc.d.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index cda24c1d8079ba3..4336569b39258f6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -93,7 +93,9 @@ } ], "no-useless-constructor": "off", - "@typescript-eslint/no-useless-constructor": "warn" + "@typescript-eslint/no-useless-constructor": "warn", + "@typescript-eslint/prefer-literal-enum-member": "error", + "@typescript-eslint/prefer-namespace-keyword": "error" } }, { @@ -326,6 +328,8 @@ "react/react-in-jsx-scope": "error", "react/require-render-return": "error", "react/style-prop-object": "warn", - "react-hooks/rules-of-hooks": "error" + "react-hooks/rules-of-hooks": "error", + // "@typescript-eslint/non-nullable-type-assertion-style": "warn", + "@typescript-eslint/prefer-as-const": "warn" } } diff --git a/packages/next/types/misc.d.ts b/packages/next/types/misc.d.ts index 3b80a2eaf1ebefb..61de69d2b8f22e6 100644 --- a/packages/next/types/misc.d.ts +++ b/packages/next/types/misc.d.ts @@ -343,7 +343,7 @@ declare module 'pnp-webpack-plugin' { export = PnpWebpackPlugin } -declare module NodeJS { +declare namespace NodeJS { interface ProcessVersions { pnp?: string }