Hacker News new | past | comments | ask | show | jobs | submit login

Steve Yeggae's js2-mode highlights globals during editing, and it's saved me a good many times.

http://code.google.com/p/js2-mode/

Mind you it won't catch globals declared in chained assignments

eg

    var x = y = 0; // y is defined globally



The fork of js2-mode at https://github.com/mooz/js2-mode will catch that, as will js3-mode.


If you're looking for a new IDE, JetBrains WebStorm does this. In the chained assignment, as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: