Skip to content
Permalink
Browse files
Increase max number of JSLint errors. This is necessary because we ha…
…ve several error messages that we choose to ignore.
  • Loading branch information
brandonaaron committed Sep 1, 2010
1 parent 13f27fc commit a2e1051fb4b2065fb5ebea49dc0bcc583d113187
Showing 1 changed file with 1 addition and 1 deletion.
@@ -2,7 +2,7 @@ load("build/jslint.js");

var src = readFile("dist/jquery.js");

JSLINT(src, { evil: true, forin: true });
JSLINT(src, { evil: true, forin: true, maxerr: 100 });

// All of the following are known issues that we think are 'ok'
// (in contradiction with JSLint) more information here:

5 comments on commit a2e1051

@gf3
Copy link
Contributor

@gf3 gf3 commented on a2e1051 Sep 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why bother?

@brandonaaron
Copy link
Contributor Author

@brandonaaron brandonaaron commented on a2e1051 Sep 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that it doesn't throw the "Too many errors" error and stop processing the file.

These errors that are being let through are the ones we choose to overlook.

var ok = {
    "Expected an identifier and instead saw 'undefined' (a reserved word).": true,
    "Use '===' to compare with 'null'.": true,
    "Use '!==' to compare with 'null'.": true,
    "Expected an assignment or function call and instead saw an expression.": true,
    "Expected a 'break' statement before 'case'.": true
};

@jeresig
Copy link
Member

@jeresig jeresig commented on a2e1051 Sep 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gf3: It defaults to 50 and we intentionally generate some errors and then ignore them. More details here:
http://docs.jquery.com/JQuery_Core_Style_Guidelines#JSLint

@gf3
Copy link
Contributor

@gf3 gf3 commented on a2e1051 Sep 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thx.

@dmethvin
Copy link
Member

@dmethvin dmethvin commented on a2e1051 Sep 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been using Javascript Lint instead of jslint lately, it's a lot more configurable about the errors it reports so you can set the config file to enforce or ignore whichever rules you like. http://www.javascriptlint.com/

Please sign in to comment.