I'm a .Net developer, but I've been using the RubyMine beta for editing all JavaScript. I'm not sure if it has the same features as IntelliJ, the other JetBrains product being recommended, but RubyMine provides similar refactoring features for JavaScript, that ReSharper does for C#.