Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

Commit af9140a

Browse files
committed
fix eslint and jscs issues
1 parent b971412 commit af9140a

4 files changed

Lines changed: 33 additions & 43 deletions

File tree

.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
// we use JSCS, set most to off because they're on by default.
109109
// turn the few on that aren't handled by JSCS today.
110110
"camelcase": [ 0 ],
111-
"comma-dangle": [ 0 ],
112111
"key-spacing": [ 0 ],
113112
"no-lonely-if": [ 0 ],
114113
"no-multi-str": [ 0 ],

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Dependency Status](https://david-dm.org/restify/plugins.svg)](https://david-dm.org/restify/plugins)
77
[![devDependency Status](https://david-dm.org/restify/plugins/dev-status.svg)](https://david-dm.org/restify/plugins#info=devDependencies)
88
[![bitHound Score](https://www.bithound.io/github/restify/plugins/badges/score.svg)](https://www.bithound.io/github/restify/plugins/master)
9-
[![NSP Status](https://img.shields.io/badge/NSP%20status-vulnerabilities%20found-red.svg)](https://travis-ci.org/restify/plugins)
9+
[![NSP Status](https://img.shields.io/badge/NSP%20status-no%20vulnerabilities-green.svg)](https://travis-ci.org/restify/plugins)
1010

1111
> A collection of core restify plugins
1212

lib/plugins/multipartBodyParser.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function multipartBodyParser(options) {
8484
}
8585
};
8686

87-
form.parse(req, function (err, fields, files) {
87+
return form.parse(req, function (err, fields, files) {
8888
if (err) {
8989
return (next(new errors.BadRequestError(err.message)));
9090
}
@@ -132,6 +132,7 @@ function multipartBodyParser(options) {
132132
});
133133
});
134134
barrier.done('fs');
135+
return (false);
135136
} else {
136137
return next();
137138
}
@@ -140,8 +141,6 @@ function multipartBodyParser(options) {
140141
}
141142

142143
});
143-
144-
return (false);
145144
}
146145

147146
return (parseMultipartBody);

test/audit.test.js

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,21 @@ describe('audit logger', function () {
6161
}));
6262

6363
var self = this;
64-
SERVER.get('/foo',
65-
function (req, res, next) {
66-
res.send(200, {testdata : 'foo'});
67-
next();
68-
}
69-
);
70-
SERVER.get('/bar',
71-
function (req, res, next) {
72-
res.send(200, {testdata : 'bar'});
73-
next();
74-
}
75-
);
76-
SERVER.get('/auditrecords',
77-
function (req, res, next) {
78-
var data = logBuffer.records;
79-
res.send(200, data);
80-
next();
81-
}
82-
);
64+
SERVER.get('/foo', function (req, res, next) {
65+
res.send(200, {testdata : 'foo'});
66+
next();
67+
});
68+
69+
SERVER.get('/bar', function (req, res, next) {
70+
res.send(200, {testdata : 'bar'});
71+
next();
72+
});
73+
74+
SERVER.get('/auditrecords', function (req, res, next) {
75+
var data = logBuffer.records;
76+
res.send(200, data);
77+
next();
78+
});
8379

8480

8581
fooRequest = function foo(_, callback) {
@@ -139,25 +135,21 @@ describe('audit logger', function () {
139135
}));
140136

141137

142-
SERVER.get('/foo',
143-
function (req, res, next) {
144-
res.send(200, {testdata : 'foo'});
145-
next();
146-
}
147-
);
148-
SERVER.get('/bar',
149-
function (req, res, next) {
150-
res.send(200, {testdata : 'bar'});
151-
next();
152-
}
153-
);
154-
SERVER.get('/auditrecords',
155-
function (req, res, next) {
156-
var data = logBuffer.records;
157-
res.send(200, data);
158-
next();
159-
}
160-
);
138+
SERVER.get('/foo', function (req, res, next) {
139+
res.send(200, {testdata : 'foo'});
140+
next();
141+
});
142+
143+
SERVER.get('/bar', function (req, res, next) {
144+
res.send(200, {testdata : 'bar'});
145+
next();
146+
});
147+
148+
SERVER.get('/auditrecords', function (req, res, next) {
149+
var data = logBuffer.records;
150+
res.send(200, data);
151+
next();
152+
});
161153

162154
collectLog = function () {
163155
CLIENT.get('/auditrecords', function (err, req, res) {

0 commit comments

Comments
 (0)