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

Commit fb6c6d9

Browse files
committed
1 parent 640267d commit fb6c6d9

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

lib/access.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ function accessAssertions (subcommand, uri, params, cb) {
125125
function typeChecks (specs) {
126126
Object.keys(specs).forEach(function (key) {
127127
var checks = specs[key]
128+
/* eslint valid-typeof:0 */
128129
assert(typeof checks[0] === checks[1],
129130
key + ' is required and must be of type ' + checks[1])
130131
})

lib/adduser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function adduser (uri, params, cb) {
2929
if (!username) return cb(new Error('No username supplied.'))
3030
if (!password) return cb(new Error('No password supplied.'))
3131
if (!email) return cb(new Error('No email address supplied.'))
32-
if (!email.match(/^[^@]+@[^\.]+\.[^\.]+/)) {
32+
if (!email.match(/^[^@]+@[^.]+\.[^.]+/)) {
3333
return cb(new Error('Please use a real email address.'))
3434
}
3535

@@ -111,7 +111,7 @@ function adduser (uri, params, cb) {
111111
client.log.verbose('adduser', 'back', [error, data, json])
112112
if (!error) {
113113
error = new Error(
114-
(response && response.statusCode || '') + ' ' +
114+
((response && response.statusCode) || '') + ' ' +
115115
'Could not create user\n' + JSON.stringify(data)
116116
)
117117
}

lib/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function requestDone (method, where, cb) {
269269
}
270270

271271
// for the search endpoint, the 'error' property can be an object
272-
if (parsed && parsed.error && typeof parsed.error !== 'object' ||
272+
if ((parsed && parsed.error && typeof parsed.error !== 'object') ||
273273
response.statusCode >= 400) {
274274
var w = url.parse(where).pathname.substr(1)
275275
var name

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"readable-stream": "^2.1.5",
2828
"require-inject": "^1.4.0",
2929
"rimraf": "^2.5.4",
30-
"standard": "~8.5.0",
30+
"standard": "^9.0.0",
3131
"tap": "^7.0.0"
3232
},
3333
"optionalDependencies": {

test/econnreset.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ function clientMock (t) {
5050
t.comment('[http] ' + section + ': ' + [].slice.call(arguments, 1).join(' '))
5151
}
5252
},
53-
authify: function (alwaysAuth, parsed, headers, auth) {
54-
return
55-
},
53+
authify: function (alwaysAuth, parsed, headers, auth) { },
5654
initialize: function (parsed, method, accept, headers) {
5755
return {}
5856
},

0 commit comments

Comments
 (0)