Skip to content

Commit b9ff0ae

Browse files
committed
[eslint-config] [base] add disabled no-unsafe-optional-chaining rule
1 parent fb3214c commit b9ff0ae

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • packages/eslint-config-airbnb-base/rules

packages/eslint-config-airbnb-base/rules/errors.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ module.exports = {
149149
// https://eslint.org/docs/rules/no-unsafe-negation
150150
'no-unsafe-negation': 'error',
151151

152+
// disallow use of optional chaining in contexts where the undefined value is not allowed
153+
// https://eslint.org/docs/rules/no-unsafe-optional-chaining
154+
// TODO: enable, semver-minor, once eslint v7.15 is required (which is major)
155+
'no-unsafe-optional-chaining': ['off', { disallowArithmeticOperators: true }],
156+
152157
// Disallow useless backreferences in regular expressions
153158
// https://eslint.org/docs/rules/no-useless-backreference
154159
// TODO: enable, semver-minor, once eslint v7 is required (which is major)

0 commit comments

Comments
 (0)