codesandbox-client icon indicating copy to clipboard operation
codesandbox-client copied to clipboard

ESLint Complains About Optional Chaining

Open fweth opened this issue 3 years ago • 0 comments
trafficstars

🐛 bug report

Preflight Checklist

  • [x] I have read the Contributing Guidelines for this project.
  • [x] I agree to follow the Code of Conduct that this project adheres to.
  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Description of the problem

CSB's version of ESLint complains about the line

  foo.bar?.()

with "Expected an assignment or function call and instead saw an expression."

Testing the same line with the latest version of ESLint shows no warning or error, also I think there is no logical reason to show the warning.

Link to sandbox: link

Link to ESLint playground: link

fweth avatar Aug 07 '22 18:08 fweth