Code Analysis and Context Actions
With ReSharper 7, we have placed a lot of effort in trying to analyze code and offer a series of context actions, be it quick fixes or refactoring. In fact, we added 30+ new context actions in ReSharper 7
Converting numbers to different formats
You can now convert back and forth from decimal to hexadecimal, to octal, all with a single Alt+Enter action.
Dealing with Conditionals
From simple if inversions of conditionals
to converting if conditionals to ternary and back
as well as the ability of merging multiple if statements or separating them out
All in all, we’ve added quite a lot of context actions to deal with conditionals.
ReSharper 7 also adds support for the new property accessors in EcmaScript 5
when selecting to wrap get-accessor gives way to
Alternatively, if selecting the first option, we’d get
We also now support defineProperty in multiple ways
These are just some of the context actions out of the 30+ that we have added, including tiny but small annoyances such as using double quotes when single is required
In terms of Code Completion, we have added support for event handlers under WinJS/WinRT (see below), as well as some nice little additions available globally
Once again, we also provide support for new methods defined in ECMAScript 5
Here is a sample of Code Completion with addEventListener/removeEventListener:
Unit Testing Enhancements
We’ve also added support for Jasmine and PhantomJS test driver in ReSharper 7, which we’ve already covered in this post.
Invisible but important features
JSLint for ReSharper
Last but not last, for those of you that like JSLint, know that although we do not ship support for JSLint out of the box, there is already a plug-in available from the community. Lars-Erik has written JSLint for ReSharper and it’s already available for ReSharper 7.0.
As always, we appreciate the feedback.