expression expected when assigning json to javascript variables.
When I do this:
var myObject = {"a":"b"};
Javascript likes it just fine, but phpStorm reports an error of: "expression expected".
Might I be able to turn this error off without turning off any other errors?
Thanks,
Ed Greenberg
Please sign in to leave a comment.
I cannot reproduce it (I've tried a JavaScript file and a PHP file with and without <script> tags). In a JSON file I get tons of (different) errors because that is not JSON. Can you please provide more context and maybe a screenshot?
If the issue persists after caches invalidation (File > Invalidate Caches/Restart, Invalidate and restart), please share a file that shows up the issue plus a screenshot of the error