Dotnet logo

.NET Tools

Essential productivity kit for .NET and game developers

How-To's

ReSharper 6 EAP is Open; Details on JavaScript Support

All ReSharper users, please kindly welcome ReSharper 6 Early Access Program that starts today.

Download ReSharper 6 EAP builds and watch that page for subsequent builds.

Why should you care? Here’s a couple of reasons why you should try ReSharper 6 EAP right now:

  • You’ve been asking yourself, why oh why ReSharper doesn’t support JavaScript. Now it does.
  • You’re working with a lot of CSS and you’re struggling to sort it out. Highlighting, navigation and search features for CSS are now available to you.
  • You’re a VB.NET developer who’s looking enviously at ReSharper code analysis features previously available for C# only. ReSharper 6 introduces code inspections for VB.NET as well.

For those of you hesitating, here’s why may want to refrain from trying ReSharper 6 EAP at this point:

  • EAP provides builds of that are not guaranteed to even run on your machine. They normally do run but certain features may not work as expected.
  • You’re expecting ASP.NET MVC 3/Razor support that we had earlier committed to provide. It’s not there yet but we’ll add it in forthcoming builds.

As usual, please report bugs and feature requests to ReSharper bug tracker. Let us know what you think.


We’ll be covering the functionality available in ReSharper 6 in a blog post series, and we’ll start from JavaScript – right now!

JavaScript Support

JavaScript support spans most ReSharper feature groups including code inspections, navigation, refactorings, and coding assistance.

Coding Assistance

JavaScript code is enabled with highlighting for keywords, methods, properties, and matching delimiters:

Syntax highlighting in JavaScript

ReSharper extends the scope of its code completion to JavaScript code, both in dedicated files and in inline script blocks within markup files. Smart Completion in jQuery code allows to narrow the myriad of applicable completion options to the limited set of jQuery properties:

ReSharper completion in JavaScript files

Navigation and Search

Whenever you open a JavaScript file, you can make use of ReSharper’s File Structure window to quickly understand how it’s organized:

File Structure in JavaScript

Go to File Member, which always goes hand in hand with File Structure, is available as well.

Find and Highlight Usages

You can find or highlight usages of a symbol inside a JavaScript file:

Find and highlight usages of symbols in JavaScript

Of course, you can also find usages of a JavaScript function in other parts of your solution:

Find solution-wide usages of a JavaScript function

If you’re browsing your solution using the Solution Explorer, you can see where in your markup files a certain JavaScript file is referenced:

Usages of a script in aspx files

Code Formatting

ReSharper 6 provides JavaScript code formatting that is traditionally available through Code Cleanup and configurable through the ReSharper Options dialog box:

ReSharper provides code formatting for JavaScript

JavaScript To-Dos

What JavaScript support lacks at this point is a solid code analysis engine incorporating both code inspections and quick-fixes. We’re going to add more code inspections (some of them are already available) and provide quick-fixes against them where applicable.

Look for subsequent blog posts for more information on CSS support, VB.NET improvements, and other red-hot ReSharper 6 features.

Once again, if you’re hungry to try JavaScript support right now, download ReSharper 6 EAP builds.

UPDATE. For more details on JavaScript support in ReSharper 6, see subsequent posts tagged ReSharper 6, including ReSharper 6 Enhances the JavaScript Experience and ReSharper 6 Introduces Support for JavaScript Unit Testing with QUnit.

image description