[Pkg-javascript-commits] [node-coveralls] 52/332: add jshint.

Bastien Roucariès rouca at moszumanska.debian.org
Thu Nov 9 13:53:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-coveralls.

commit 7e73beeff55ad4e0fdf425c657bf25c9dc394bc2
Author: cainus <gregg at caines.ca>
Date:   Wed Jun 19 20:45:47 2013 -0700

    add jshint.
---
 Makefile          | 4 ++++
 index.js          | 1 -
 lib/getOptions.js | 3 ++-
 package.json      | 3 ++-
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 9b4a1f4..c2a3b99 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,12 @@
 REPORTER = spec
 test:
+	$(MAKE) lint
 	echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
 	@NODE_ENV=test ./node_modules/.bin/mocha -b --reporter $(REPORTER)
 
+lint:
+	./node_modules/.bin/jshint ./lib ./test ./index.js
+
 lib-cov:
 	./node_modules/jscoverage/bin/jscoverage lib lib-cov
 
diff --git a/index.js b/index.js
index 3bef933..d1195bc 100644
--- a/index.js
+++ b/index.js
@@ -6,4 +6,3 @@ exports.convertLcovToCoveralls = require(dir + 'convertLcovToCoveralls');
 exports.sendToCoveralls = require(dir + 'sendToCoveralls');
 exports.getOptions = require(dir + 'getOptions');
 exports.handleInput = require(dir + 'handleInput');
-
diff --git a/lib/getOptions.js b/lib/getOptions.js
index 735ac9d..9e6894d 100644
--- a/lib/getOptions.js
+++ b/lib/getOptions.js
@@ -25,7 +25,8 @@ var getOptions = function(){
     var yml = path.join(process.cwd(), '.coveralls.yml');
     try {
       if (fs.statSync(yml).isFile()) {
-        options.repo_token = yaml.eval(fs.readFileSync(yml, 'utf8')).repo_token;
+				var evaluate = 'eval';  // hack for jshint
+        options.repo_token = yaml[evaluate](fs.readFileSync(yml, 'utf8')).repo_token;
       }
     } catch(ex){
       logger.warn("Repo token could not be determined.  Continuing without it.");
diff --git a/package.json b/package.json
index bd917cf..e038c55 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,8 @@
     "mocha-lcov-reporter": "0.0.1",
     "mocha": "1.8.1",
     "should": "1.1.0",
-    "jscoverage": "0.3.7"
+    "jscoverage": "0.3.7",
+    "jshint": "2.1.3"
   },
   "engines": {
     "node": ">=0.8.6",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-coveralls.git



More information about the Pkg-javascript-commits mailing list