ESLint v1.3.0 released

We just pushed ESLint v1.3.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.

Highlights

This is a summary of the major changes you need to know about for this version of ESLint.

Using ASTs with the Node.js API

A long-requested feature was finally added for those using the Node.js API: the ability to pass ESLint an AST and retrieve an AST once ESLint is finished. There’s a new SourceCode type that encapsulates already-processed code, and a SourceCode object can now be passed to linter.verify() instead of text. For example:

var linter = require("eslint").linter,
    SourceCode = require("eslint").SourceCode;


var sourceCode = new SourceCode(someText, anAST),
    messages = linter.verify(sourceCode, config);

Additionally, you can retrieve a SourceCode object from linter after linting is complete:

var messages = linter.verify("var foo = bar"),
    sourceCode = linter.getSourceCode();

sourceCode.ast;     // the AST
sourceCode.text;    // the original text

This should make it easier for tools using the Node.js API to avoid double-parsing of JavaScript code if they are already creating an AST.

HTML Formatter

An exciting addition from Julian Laval, who contributed an HTML formatter. Designed and implemented by Julian, you can now pass -f html on the command line to generate a beautiful HTML report of your ESLint results.

Features

Enhancements

Bug Fixes

Documentation