Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* report bugs

  • Loading branch information...
commit 47030d81da24d1459acd37470e9e578a357561cf 1 parent d93d48f
Julien Polo authored
Showing with 7 additions and 9 deletions.
  1. +6 −8 lib/lint/parser.js
  2. +1 −1  package.json
View
14 lib/lint/parser.js
@@ -144,7 +144,7 @@ Parser.prototype.update = function (sourcePart) {
* @return this
*/
Parser.prototype.validate = function (force) {
- var result, config, property, errors, n;
+ var result, config, property, errors;
if (this._report === null || force) {
config = {};
@@ -170,14 +170,12 @@ Parser.prototype.validate = function (force) {
this._report = [];
errors = JSLINT.data().errors || [];
- n = errors.length;
- while (n < errors.length) {
- if (errors[n]) {
- this._report.push(errors[n]);
+ errors.forEach(function (error) {
+ if (error) {
+ this._report.push(error);
}
- n += 1;
- }
- this._isValid = (JSLINT.errors.length === 0);
+ }.bind(this));
+ this._isValid = (this._report.length === 0);
}
return this;
};
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "lint",
"description": "This package provide lint validation library + node-lint command line tool allows you to check for problems using JSLint. You can specify your own --config file to use alternate JSLint options and your own --formatter file if you want to customize the generated output.",
- "version": "0.1.7",
+ "version": "0.1.8",
"homepage": "https://github.com/as-jpolo/node-lint",
"author": "tav <tav@espians.com> (http://tav.espians.com)",
"contributors": [
Please sign in to comment.
Something went wrong with that request. Please try again.