diff --git a/project/.eslintrc.json b/project/.eslintrc.json index f69b3c19..c8ca42cc 100644 --- a/project/.eslintrc.json +++ b/project/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./tsconfig.strictNullChecks.json" + }, "extends": [ "plugin:@typescript-eslint/recommended", "plugin:@stylistic/recommended-extends", @@ -6,7 +9,7 @@ "plugin:import/typescript", "prettier" ], - "plugins": ["@typescript-eslint", "@stylistic", "import", "unused-imports", "switch-allman"], + "plugins": ["@typescript-eslint", "@stylistic", "import", "unused-imports", "switch-allman", "strict-null-checks"], "settings": { "import/resolver": { "typescript": { @@ -99,7 +102,8 @@ } ], "unused-imports/no-unused-imports-ts": "error", - "switch-allman/case-allman": "error" + "switch-allman/case-allman": "error", + "strict-null-checks/all": "warn" }, "overrides": [ { diff --git a/project/package.json b/project/package.json index fbd77aaa..ee659d1a 100644 --- a/project/package.json +++ b/project/package.json @@ -74,6 +74,7 @@ "eslint-import-resolver-typescript": "~3.6", "eslint-plugin-import": "~2.29", "eslint-plugin-prettier": "~5.1", + "eslint-plugin-strict-null-checks": "~0.1", "eslint-plugin-switch-allman": "~1.0", "eslint-plugin-unused-imports": "~3.2", "fs-extra": "~11.2", diff --git a/project/tsconfig.strictNullChecks.json b/project/tsconfig.strictNullChecks.json new file mode 100644 index 00000000..98cc566a --- /dev/null +++ b/project/tsconfig.strictNullChecks.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "strictNullChecks": true, + } +}