Can the Eclipse Javascript formatter be set up for JSLint compliance?

Viewed 3553

I can't seem to configure the Eclipse Javascript formatting options so that it generates markup JSLint doesn't complain about - primarily whitespace settings when the "tolerate sloppy whitespace" option isn't set on JSLint. It is possible to configure this?

For example, JSLint expects function declarations to be spaced as shown:


function () {
}

function foo() {
}

but I can only get the settings to produce:


function () {
}

function foo () {
}

or


function() {
}

function foo() {
}

Alternatively is there a lightweight editor/IDE which will format my javascript code to create markup that satisfies the whims of JSLint?

1 Answers
Related