So, the question is as the title reads. I would greatly appreciate any help in understanding why could PhpStorm use different syntax highlighting colors in a .js file and .php file for JavaScript.
Contrary to the popular question of why js syntax highlighting doesn't work in .php files :)
I imported settings from PhpStorm 10 to 2016.3, but as I recall, version 10 had the same problem for me.
Here is how it looks:
As you can see, variable identifiers, function declaration, function calls, and other stuff is not highlighted correctly in the .js file, but looks just fine under <script>
tags in .php files.
Here is a screenshot of Editor - Colors & Fonts - JavaScript:
According to this, everything is fine. But not in my .js files, where the bulk of work is :(
So it turns out, as Juan Tonina suggested in the comment to my question, code inspection/highlighting was off for .js files for some reason. Big thanks!