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:
parent
edbb6cec19
commit
1bf520a044
@ -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": [
|
||||
{
|
||||
|
@ -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",
|
||||
|
6
project/tsconfig.strictNullChecks.json
Normal file
6
project/tsconfig.strictNullChecks.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "./tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"strictNullChecks": true,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user