I am using socket.io 8.7. I use Webstorm as IDE for writing my network app.
Webstorm shows me an error when I write this:
io.sockets.in("some room id").emit(...)
Webstorm underlines the in with red and says “name expected”. The result in Webstorm showing the entire JavaScript file containing this code line as a broken code file.
Does anyone know how to tell Webstorm to ignore this error? It is very annoying as it covers real error messages.
Any suggestions are appreciated.
It’s happening because “in” is a reserved word in JavaScript. It’s an operator:
In other words, that is a “real error”. Now, you can do this if you really really want a property/method called “in”: