mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 07:10:44 -05:00
Added null checks as warnings (!352)
Co-authored-by: clodan <clodan@clodan.com> Reviewed-on: SPT/Server#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": [
|
"extends": [
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
"plugin:@stylistic/recommended-extends",
|
"plugin:@stylistic/recommended-extends",
|
||||||
@ -6,7 +9,7 @@
|
|||||||
"plugin:import/typescript",
|
"plugin:import/typescript",
|
||||||
"prettier"
|
"prettier"
|
||||||
],
|
],
|
||||||
"plugins": ["@typescript-eslint", "@stylistic", "import", "unused-imports", "switch-allman"],
|
"plugins": ["@typescript-eslint", "@stylistic", "import", "unused-imports", "switch-allman", "strict-null-checks"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"import/resolver": {
|
"import/resolver": {
|
||||||
"typescript": {
|
"typescript": {
|
||||||
@ -99,7 +102,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"unused-imports/no-unused-imports-ts": "error",
|
"unused-imports/no-unused-imports-ts": "error",
|
||||||
"switch-allman/case-allman": "error"
|
"switch-allman/case-allman": "error",
|
||||||
|
"strict-null-checks/all": "warn"
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
|
@ -74,6 +74,7 @@
|
|||||||
"eslint-import-resolver-typescript": "~3.6",
|
"eslint-import-resolver-typescript": "~3.6",
|
||||||
"eslint-plugin-import": "~2.29",
|
"eslint-plugin-import": "~2.29",
|
||||||
"eslint-plugin-prettier": "~5.1",
|
"eslint-plugin-prettier": "~5.1",
|
||||||
|
"eslint-plugin-strict-null-checks": "~0.1",
|
||||||
"eslint-plugin-switch-allman": "~1.0",
|
"eslint-plugin-switch-allman": "~1.0",
|
||||||
"eslint-plugin-unused-imports": "~3.2",
|
"eslint-plugin-unused-imports": "~3.2",
|
||||||
"fs-extra": "~11.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…
x
Reference in New Issue
Block a user