Skip to content

Commit ff50048

Browse files
committed
version bumps, jshint fixes
1 parent f13cdb9 commit ff50048

File tree

17 files changed

+27
-42
lines changed

17 files changed

+27
-42
lines changed

.jshintrc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@
7373
"nomen" : false, // Prohibit use of initial or trailing underbars in names.
7474
"onevar" : false, // Allow only one `var` statement per function.
7575
"plusplus" : false, // Prohibit use of `++` & `--`.
76-
"sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
77-
"trailing" : true, // Prohibit trailing whitespaces. (only works if white is 'true')
78-
"white" : true, // Check against strict whitespace and indentation rules.
79-
"indent" : 4 // ignored because "white" is false.
76+
"sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
77+
"trailing" : true, // Prohibit trailing whitespaces. (only works if white is 'true')
78+
"white" : true, // Check against strict whitespace and indentation rules.
79+
"indent" : 4, // ignored because "white" is false.
80+
"unused" : true
8081
}

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TEST_COMMAND = NODE_ENV=test ./node_modules/.bin/mocha
55
COVERAGE_OPTS = --lines 95 --statements 90 --branches 80 --functions 90
66
BUSTER = ./node_modules/.bin/buster test
77

8-
main: lint test
8+
main: lint test test-buster
99

1010
cover:
1111
$(ISTANBUL) cover test/run.js
@@ -28,7 +28,9 @@ test-acceptance:
2828
test/run.js -T acceptance
2929

3030
lint:
31-
./node_modules/jshint/bin/hint ./lib --config $(BASE)/.jshintrc && cd test && ../node_modules/jshint/bin/hint . && cd ..
31+
./node_modules/.bin/jshint ./lib --config $(BASE)/.jshintrc && \
32+
./node_modules/.bin/jshint ./test --config $(BASE)/.jshintrc
33+
./node_modules/.bin/jshint ./test-buster --config $(BASE)/.jshintrc
3234

3335

3436
.PHONY: test test-buster

lib/server/app_server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var logger = new Logger({
1515
]
1616
});
1717

18-
function AppServer(config, options) {
18+
function AppServer(config) {
1919
var self = this;
2020
self.config = config;
2121
self.started = false;

lib/server/responder.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var restify = require('restify');
2-
var util = require('util');
32

43
var responder = {
54
error: function (res, err, next) {

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717
},
1818
"devDependencies": {
1919
"buster": "0.6.3",
20-
"Faker" : "git://github.com/BryanDonovan/Faker.js.git#master",
21-
"jshint": "0.9.0",
22-
"jugglingdb": "0.2.0-2",
23-
"istanbul": "0.1.25",
24-
"mocha": "1.7.4",
25-
"sinon": "1.4.2"
20+
"Faker" : "0.5.6",
21+
"jshint": "1.0.0",
22+
"istanbul": "0.1.29",
23+
"mocha": "1.8.1",
24+
"sinon": "1.5.2"
2625
},
2726
"repository": {
2827
"type": "git",

test-buster/apps/users/controller.unit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var support = require('../../support');
77
var http = support.http;
88
var User = main.models.User;
99

10-
var spec = describe("users/controller.js", function () {
10+
describe("users/controller.js", function () {
1111
var app;
1212
var http_client;
1313

@@ -33,7 +33,7 @@ var spec = describe("users/controller.js", function () {
3333
cb(null, {});
3434
});
3535

36-
http_client.post('/users', params, function (err, result) {
36+
http_client.post('/users', params, function (err) {
3737
buster.refute(err);
3838
assert(User.create.calledWith(params));
3939
assert(true);

test-buster/support/http.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
var restify = require('restify');
2-
var util = require('util');
32
var host = process.env.HOST || 'localhost';
43
var port = process.env.PORT;
5-
var ENV = process.env.NODE_ENV;
64

75
if (!port) {
86
if (host === 'localhost') {

test/apps/users/controller.unit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe("users/controller.js", function () {
3131
cb(null, {});
3232
});
3333

34-
http_client.post('/users', params, function (err, result) {
34+
http_client.post('/users', params, function (err) {
3535
assert.ifError(err);
3636
assert.ok(User.create.calledWith(params));
3737
User.create.restore();

test/models/user.unit.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var assert = require('assert');
2-
var support = require('../support');
32
var User = main.models.User;
43

54
describe("User model", function () {

test/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
process.env.NODE_ENV = 'test';
33
require('../lib');
44

5-
var fs = require('fs');
65
var Mocha = require('mocha');
76
var optimist = require('optimist');
87
var walk_dir = require('./support/walk_dir');
@@ -67,6 +66,7 @@ function run(cb) {
6766
}
6867

6968
run(function (err) {
69+
if (err) { throw err; }
7070
mocha.run(function (failures) {
7171
process.exit(failures);
7272
});

0 commit comments

Comments
 (0)