This is how it looks like inside file
I did this eclipse preference also :
Check in Window -> Preferences -> General -> Editors -> File Associations. For *.js file type select any relevant script editor as default (For e.g JS Editor) in the Associated editors window and apply.
If *.js is not present under file types, add it and select JS Editor as default in Associated Editors pane.