mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-04 02:34:43 +08:00
added eslint rule to protect against misused promises
This commit is contained in:
parent
ec29a7fecd
commit
e062c16966
1 changed files with 18 additions and 2 deletions
|
@ -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": [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue