1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

chore - remove standard and use individual config

Standard is not as up to date and still uses a old eslint version.
Instead, use the airbnb default with a couple of modifications.

All required changes are included.
This commit is contained in:
Ruben Bridgewater
2017-11-28 21:38:21 -02:00
parent 0206ecbf51
commit 2b4ab10305
97 changed files with 888 additions and 673 deletions

View File

@@ -1,10 +1,10 @@
'use strict'
const Buffer = require('buffer').Buffer
const { Buffer } = require('buffer')
const pubsub = require('./pubsub')
const utils = require('./utils')
function onError (client, err) {
function onError(client, err) {
const commandObj = client.commandQueue.shift()
if (commandObj.error) {
err.stack = commandObj.error.stack.replace(/^Error.*?\n/, `ReplyError: ${err.message}\n`)
@@ -28,7 +28,7 @@ function onError (client, err) {
commandObj.callback(err)
}
function normalReply (client, reply) {
function normalReply(client, reply) {
const command = client.commandQueue.shift()
if (client._multi === false) {
reply = utils.handleReply(client, reply, command)
@@ -36,10 +36,11 @@ function normalReply (client, reply) {
command.callback(null, reply)
}
function onResult (client, reply) {
// If in monitor mode, all normal commands are still working and we only want to emit the streamlined commands
// As this is not the average use case and monitor is expensive anyway, let's change the code here, to improve
// the average performance of all other commands in case of no monitor mode
function onResult(client, reply) {
// If in monitor mode, all normal commands are still working and we only want
// to emit the streamlined commands As this is not the average use case and
// monitor is expensive anyway, let's change the code here, to improve the
// average performance of all other commands in case of no monitor mode
if (client._monitoring === true) {
var replyStr
// TODO: This could be further improved performance wise