13
Vote

Unable to turn off JSHint "Missing space after 'function'" error

description

I have version 1.4.2 of JSLint.VS2012 installed and using the JSHint linter. It doesn't appear possible to turn off the "Missing space after 'function'" error even though the strict whitespace option is turned off. Is there a configuration option that I'm missing or is this a defect?

Below is an example of code that will trigger this error. However when I run this same code through the linter at jshint.com I do not receive the missing space error.
window.TestModel = function(data) {
    var model = window.ko.mapping.fromJS(data);
    return model;
};

comments

ryantofteland wrote Jan 10, 2013 at 7:27 PM

To clarify - I'm looking for an option in the settings to handle this globally. I am able to turn this off on a file by file basis with this command: /jslint white: true /.

wrote Jan 15, 2013 at 3:22 PM

wrote Jan 15, 2013 at 3:24 PM

wrote Jan 23, 2013 at 7:43 AM

wrote Jan 30, 2013 at 11:03 PM

wrote Jan 30, 2013 at 11:03 PM

tetsuo wrote Jan 30, 2013 at 11:07 PM

There is a checkbox option in the JSHint area called "Strict whitespace."

This checkbox corresponds to the "white" option in JSHint.

Unfortunately, unchecking the checkbox does not have the desired affect. JSHint is always run with "white":true.

wrote Feb 21, 2013 at 10:36 PM

wrote May 30, 2013 at 3:44 PM

AmosFiveSix wrote May 30, 2013 at 3:46 PM

I get the same result as tetsuo when using the VS 2012 1.4.2 add-in and the MSBuild task. This is a deal breaker for me.

wrote Aug 29, 2013 at 5:22 AM

wrote Sep 11, 2013 at 3:19 PM

wrote Sep 26, 2013 at 6:28 PM

wrote Dec 21, 2013 at 4:12 PM

wrote Feb 24, 2014 at 5:45 AM

wrote Apr 30, 2014 at 9:40 AM

wrote Nov 4, 2014 at 2:46 PM