added eslint rule to protect against misused promises

This commit is contained in:
Miodec 2022-09-20 14:16:12 +02:00
parent ec29a7fecd
commit e062c16966

View file

@ -11,6 +11,11 @@
"ClipboardItem": "readonly",
"grecaptcha": "readonly"
},
"ignorePatterns": [
"backend/__tests__/**/*",
"backend/setup-tests.ts",
"backend/jest.config.ts"
],
"extends": [
"eslint:recommended",
"plugin:json/recommended",
@ -21,7 +26,8 @@
"plugins": ["json", "require-path-exists", "@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
"sourceType": "module",
"project": ["./frontend/tsconfig.json", "./backend/tsconfig.json"]
},
"rules": {
"json/*": ["error"],
@ -57,7 +63,17 @@
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off"
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": false
}
]
// "@typescript-eslint/no-floating-promises": "error",
// "@typescript-eslint/promise-function-async": "warn",
// "@typescript-eslint/strict-boolean-expressions": "warn",
// "@typescript-eslint/no-unnecessary-condition": "warn"
},
"overrides": [
{