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 with 1 addition and 1 deletion.
  1. +1 −1 build/jslint-check.js
@@ -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

This comment has been minimized.

Copy link
Contributor

replied Sep 1, 2010

Why bother?

@brandonaaron

This comment has been minimized.

Copy link
Contributor Author

replied Sep 1, 2010

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

This comment has been minimized.

Copy link
Member

replied Sep 1, 2010

@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

This comment has been minimized.

Copy link
Contributor

replied Sep 1, 2010

Cool, thx.

@dmethvin

This comment has been minimized.

Copy link
Member

replied Sep 1, 2010

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.
You can’t perform that action at this time.