Why is PHPStorm not able to understand nullish coalescing operator in Javascript when set to ES6+ / Flow?

I am getting a warning from ESLint:

Not sure where this setting is or why PHPStorm seems to think this Javascript code has an error.

It's valid Javascript, using the nullish coalescing operator.

I have my Javascript set to Flow.

Any ideas?

 

System Details

PhpStorm 2021.1.2
Build #PS-211.7142.44, built on April 30, 2021
Licensed to REDACTED
Subscription is active until February 18, 2022.
Runtime version: 11.0.10+9-b1341.41 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 2014M
Cores: 4
Registry: run.processes.with.pty=TRUE, debugger.watches.in.variables=false
Non-Bundled Plugins: ColorIde (2.3), com.berzanmikaili.intellij.monokai_pro (2.0.2c), com.intellij.ideolog (203.0.27.0), com.markskelton.one-dark-theme (5.1.5), intellij.webp (211.6693.44), monokai-pro (1.2.2), ru.adelf.idea.dotenv (2021.1)

0

The error comes from JSHint and not from the IDE itself. JSHint doesn't support nullish coalescing: https://github.com/jshint/jshint/issues/3443.

You can disable it in `Settings | Languages & Frameworks | JavaScript | Code Quality Tools | JSHint`

0

请先登录再写评论。