Permalink
Browse files

Moved NPM package (node-jshint) into the main repo.

This commit moves JSHint NPM pacakge into this repo. This change
will allow us to further support NPM package as a main wrapper
around JSHint.

To conform with other tests, I rewrote node-jshint tests using
nodeunit.
  • Loading branch information...
1 parent f50090e commit b0afb93ca05493e5994bd908f54bbdf21f4e1f0e @valueof valueof committed Oct 2, 2012
View
@@ -0,0 +1,3 @@
+#!/usr/bin/env node
+
+require("./../src/cli/cli.js").interpret(process.argv);
@@ -0,0 +1,2 @@
+ignored.js
+another.js
View
@@ -0,0 +1,5 @@
+{
+ "strict": true,
+ "undef": true,
+ "unused": true
+}
View
@@ -0,0 +1,21 @@
+"use strict";
+
+module.exports = {
+ reporter: function (res) {
+ var len = res.length;
+ var str = "";
+
+ res.forEach(function (r) {
+ var file = r.file;
+ var err = r.error;
+
+ str += file + ": line " + err.line + ", col " +
+ err.character + ", " + err.reason + "\n";
+ });
+
+ if (str) {
+ process.stdout.write(str + "\n" + len + " error" +
+ ((len === 1) ? "" : "s") + "\n");
+ }
+ }
+};
View
@@ -18,7 +18,10 @@ var OPTIONS = {
white: true,
smarttabs: true,
maxlen: 100,
- newcap: false
+ newcap: false,
+ undef: true,
+ unused: true,
+ onecase: true
};
target.all = function () {
View
@@ -17,6 +17,7 @@
"dependencies": {
"esprima": "https://github.com/ariya/esprima/tarball/master",
+ "shelljs": "*",
"underscore": "*",
"peakle": "*",
"cli": "0.4.3",
@@ -28,7 +29,8 @@
"shelljs": "*",
"browserify": "*",
"coveraje": "*",
- "nodeunit": "*"
+ "nodeunit": "*",
+ "sinon": "*"
},
"preferGlobal": true
Oops, something went wrong.

0 comments on commit b0afb93

Please sign in to comment.