Code style ignored in index.js files
Recently my projects started to ignore code style settings in any file names index.js. When viewed in the project directory, files named index.js appear with a plain text file icon rather than a js file icon.
Please sign in to leave a comment.
Please check if
index.js
is added to text file patterns in Preferences | Editor | File types -> Text file type. Removing this pattern should solve your problem.If it's not the case, see if the file is marked as plain text (the option is in the file right-click menu). In this case, the option to mark it back as a JavaScript file is also in the context menu.
Has happened to me twice. File was named index,js in lieu of index.js (comma [,] in stead of dot [.])
Can also happen with spaces, which aren't always easy to see:
[index. js]
[index.js ]
&c.p.p.