0

In WebStorm 2016.2, MacBook Pro with OSX 10.11.3.

My ./MyProject/List folder content:

enter image description here

I created ListContainer.js by the step:

  • Mouse point hover List folder
  • New
  • JavaScript File
  • type ListContainer.js
  • click "OK"

Pay attention to the file icon: it's not normal js file icon.

Inside the file (when editing it) WebStorm does not provide any syntax hightlighting of React code.

When investigating I found out that such confusing behaviour only happens with file(s) named ListContainer.js (upper case L and C).

Any ideas/suggestions?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
pingfengafei
  • 829
  • 2
  • 8
  • 12
  • 2
    see this answer http://stackoverflow.com/questions/26872024/webstorm-not-recognising-javascript-file/26888078#26888078 – anstarovoyt Aug 05 '16 at 10:53
  • 1
    You should not have typed `.js` when creating new file *using specific template*. In any case -- use solution that @anstarovoyt pointed to -- find unwanted pattern that associates this file with Text Files and remove it -- it will be treated as JavaScript File again. – LazyOne Aug 05 '16 at 12:16

0 Answers0