Some of the JavaScript features also apply to TypeScript.

Features

JSHint

JSHint is a really good way of making sure your JavaScript follows certain coding guidelines and best practices. The default settings are very relaxed, but you can turn on more rules through the new options dialog.

JSHint

The error window updates as you type, so you don’t have to right-click the .js file to kick off JSHint. It happens as you write.

Each indiviual JavaScript file can override the global settings by using the official JSHint comment format descripted in the JSHint documentation.

.jshintrc and .jshintignore

These two files are fully supported and will be automatically applied when found.

Regions

Some people hate them, other people love them. This is a feature that was in the original Web Essentials 2010 and by popular request now made it in the 2012 version.

JavaScript regions

Outlining/code folding

Only functions provide outlining support by Visual Studio 2012. Web Essentials adds outlining supports to any scope including multiline arrays.

Minification

Right-click any JS file in Solution Explorer to produce a *.min.js file. Whenever the source .js file is changed, the .min.js file is updated accordingly.

Source Maps

When minifying, Source Map (.js.maps) files are automatically generated by enabling it in Tools -> Options.

Auto-complete braces

When an opening curly brace, square bracket or parenthesis is typed, the closing ditto is inserted to the right of the cursor. Type-through is supported to not mess with muscle memory.

Smarter indent

Hitting Enter when the cursor is between an opening and closing curly brace now places the cursor correctly on the line below with the correct indentation.

Find All References

Use Shift+F12 to see all references of any particular JavaScript identifier.

Go To Definition

Go To Definition is built in to VS2012 and VS2013. This feature makes the feature work with /// <reference> constructs

Intellisense

getElementById

Finds #ID references in all stylesheets in the project and provide Intellisense for them in JavaScript.

getElementsByTagName

Intellisense for all HTML elements supported by the VS HTML editor.

getElementsByClassName

Finds .classnames in all stylesheets in the project and provide Intellisense for them in JavaScript.

"use strict"

Get Intellisense for "use strict" as well as "use asm".

NodeJS modules

Get Intellisense referencing NodeJS modules.