Enable the ESLint no-unsafe-optional-chaining rule

Given that we're using optional chaining in the code-base, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining, it can't hurt to add this ESLint rule to help catch one possible source of bugs when using optional chaining expressions.

Please find additional details about the ESLint rule at https://eslint.org/docs/rules/no-unsafe-optional-chaining
This commit is contained in:
Jonas Jenwald 2020-12-13 11:46:32 +01:00
parent ad91972eb2
commit 3655777db7

View File

@ -67,6 +67,7 @@
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": ["error", { "disallowArithmeticOperators": true }],
"use-isnan": ["error", { "enforceForIndexOf": true, }],
"valid-typeof": ["error", { "requireStringLiterals": true, }],