Skip to content

Commit f946e13

Browse files
committed
more lints fixes
1 parent f142ecc commit f946e13

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

lib/createClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = function createClient (port_arg, host_arg, options) {
3131
if (parsed.auth) {
3232
var columnIndex = parsed.auth.indexOf(':');
3333
options.password = parsed.auth.slice(columnIndex + 1);
34-
if (columnIndex > 0){
34+
if (columnIndex > 0) {
3535
options.user = parsed.auth.slice(0, columnIndex);
3636
}
3737
}

lib/individualCommands.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function auth_callback (self, pass, user, callback) {
185185
if (user instanceof Function) {
186186
callback = user;
187187
user = null;
188-
}
188+
}
189189
return function (err, res) {
190190
if (err) {
191191
if (no_password_is_set.test(err.message)) {
@@ -208,21 +208,21 @@ function auth_callback (self, pass, user, callback) {
208208
RedisClient.prototype.auth = RedisClient.prototype.AUTH = function auth (pass, user, callback) {
209209
debug('Sending auth to ' + this.address + ' id ' + this.connection_id);
210210

211-
// Backward compatibility support for auth with password only
212-
if (user instanceof Function){
213-
callback = user;
214-
user = null;
215-
}
211+
// Backward compatibility support for auth with password only
212+
if (user instanceof Function) {
213+
callback = user;
214+
user = null;
215+
}
216216
// Stash auth for connect and reconnect.
217217
this.auth_pass = pass;
218218
this.auth_user = user;
219219
var ready = this.ready;
220220
this.ready = ready || this.offline_queue.length === 0;
221221
var tmp;
222-
if(user){
223-
tmp = this.internal_send_command(new Command('auth', [pass, user], auth_callback(this, pass, user, callback)));
222+
if (user) {
223+
tmp = this.internal_send_command(new Command('auth', [pass, user], auth_callback(this, pass, user, callback)));
224224
} else {
225-
tmp = this.internal_send_command(new Command('auth', [pass], auth_callback(this, pass, callback)));
225+
tmp = this.internal_send_command(new Command('auth', [pass], auth_callback(this, pass, callback)));
226226
}
227227
this.ready = ready;
228228
return tmp;
@@ -232,18 +232,18 @@ RedisClient.prototype.auth = RedisClient.prototype.AUTH = function auth (pass, u
232232
Multi.prototype.auth = Multi.prototype.AUTH = function auth (pass, user, callback) {
233233
debug('Sending auth to ' + this.address + ' id ' + this.connection_id);
234234

235-
// Backward compatibility support for auth with password only
236-
if (user instanceof Function){
237-
callback = user;
238-
user = null;
239-
}
235+
// Backward compatibility support for auth with password only
236+
if (user instanceof Function) {
237+
callback = user;
238+
user = null;
239+
}
240240
// Stash auth for connect and reconnect.
241241
this.auth_pass = pass;
242-
this.auth_user = user;
243-
if(user){
244-
this.queue.push(new Command('auth', [pass, user], auth_callback(this._client, callback)));
242+
this.auth_user = user;
243+
if (user) {
244+
this.queue.push(new Command('auth', [pass, user], auth_callback(this._client, callback)));
245245
} else {
246-
this.queue.push(new Command('auth', [pass], auth_callback(this._client, callback)));
246+
this.queue.push(new Command('auth', [pass], auth_callback(this._client, callback)));
247247
}
248248
return this;
249249
};

0 commit comments

Comments
 (0)