Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b67b6e4

Browse files
chore(eslint-plugin): [prefer-optional-chain] fix incorrect syntax in documentation (typescript-eslint#5172)
Fix incorrect syntax
1 parent 78af93b commit b67b6e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/eslint-plugin/docs/rules/prefer-optional-chain.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ foo && foo.a && foo.a.b && foo.a.b.c;
6161
foo && foo['a'] && foo['a'].b && foo['a'].b.c;
6262
foo && foo.a && foo.a.b && foo.a.b.method && foo.a.b.method();
6363

64-
(((foo || {}).a || {}).b {}).c;
65-
(((foo || {})['a'] || {}).b {}).c;
64+
(((foo || {}).a || {}).b || {}).c;
65+
(((foo || {})['a'] || {}).b || {}).c;
6666

6767
// this rule also supports converting chained strict nullish checks:
6868
foo &&

0 commit comments

Comments
 (0)