You've already forked node-redis
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user