Added null checks as warnings (!352)

Co-authored-by: clodan <clodan@clodan.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/352
Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com>
Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.com>
This commit is contained in:
Alex 2024-05-27 13:08:21 +00:00 committed by chomp
parent edbb6cec19
commit 1bf520a044
3 changed files with 13 additions and 2 deletions

View File

@ -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": [
{

View File

@ -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",

View File

@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"strictNullChecks": true,
}
}