eclipsesource / jshint-eclipse

JSHint integration for the Eclipse IDE
http://github.eclipsesource.com/jshint-eclipse/
146 stars 31 forks source link

Is there a way to autoformat code to be accepted for JSLint? #84

Closed edu791 closed 10 years ago

edu791 commented 10 years ago

For example if I have this code:

function foo(){
    //Some code
}

and I run source->format, the code turns into this:

function foo() {
    //Some code
}

but the problem is that JSLint doesn't accept that code because I have to put a white space between "foo" and "("

Is there a way in jshint-eclipse to automatically format that code to be acceptable to JSLint ?

ralfstx commented 10 years ago

No, jshint-eclipse only integrates JSHint into Eclipse, it's not a JavaScript tool suite.

However, to get rid of these warnings, you may have to set the option white to false. AFAIK, those formatting checks are considered obsolete and will be removed from JSHint in the future. See http://www.jshint.com/docs/options/