Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* more npm bugs corrected...

  • Loading branch information...
commit df3e7e5bd05699c5afa0fd3f3ceee2ab8e19e8aa 1 parent 296f2d6
Julien Polo authored
View
1  bin/node-lint
@@ -1,4 +1,5 @@
#!/usr/bin/env node
+var util = require(process.binding('natives').util ? 'util' : 'sys');
var path = require('path');
var ROOT_PATH, LIB_PATH;
View
4 lib/lint/launcher.js
@@ -331,9 +331,11 @@ Launcher.prototype._validateFile = function (filePath, callback) {
parser.reset().update(data);
report = parser.getReport();
- report.forEach(function (error) {
+ report.forEach(function (error) {
error.file = filePath;
});
+
+
callback(undefined, report);
}
}.bind(this));
View
15 lib/lint/parser.js
@@ -144,7 +144,7 @@ Parser.prototype.update = function (sourcePart) {
* @return this
*/
Parser.prototype.validate = function (force) {
- var result, config, property;
+ var result, config, property, errors, n;
if (this._report === null || force) {
config = {};
@@ -167,7 +167,18 @@ Parser.prototype.validate = function (force) {
result = JSLINT(this._source, this._config);
- this._report = JSLINT.data().errors || [];
+
+ this._report = [];
+ errors = JSLINT.data().errors || [];
+ n = errors.length;
+ while (n) {
+ if (errors[n]) {
+ this._report.push(errors[n]);
+ }
+ n -= 1;
+ }
+
+ //this._report = JSLINT.data().errors || [];
this._isValid = (JSLINT.errors.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.2",
+ "version": "0.1.3",
"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.