Hello!
I recently had the same issue with my javascript files, and found a solution!
Right click on the file=>click on properties (usually the last option on the menu)=>click on the "change" button, located by the "opens with" text => then look for your favorite word processor, notepad, or other writing program compatible with javascript files.
Then you should no longer have this issue!
P.S. I prefer notepad.