From 129e698d60416dab05fd7dc3aa35e91250b853b2 Mon Sep 17 00:00:00 2001 From: Stuart Longland Date: Thu, 8 Feb 2024 16:15:40 +1000 Subject: [PATCH] index.js: Drop inline index number comments on errors table. ``` Error: Code did not pass lint rulesindex.js: line 38, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 39, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 40, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 41, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 42, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 43, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 44, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 45, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 46, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 47, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 48, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) index.js: line 49, col 5, Error - Expected space or tab after '/*' in comment. (spaced-comment) 12 problems at Context. (node_modules/mocha-eslint/index.js:38:15) at processImmediate (node:internal/timers:466:21) ``` Sorry @samueltoh, those comments have got to go: --- index.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index 5b31bb3..b88fa58 100644 --- a/index.js +++ b/index.js @@ -35,18 +35,18 @@ const TRANSACTION_TIMED_OUT_MESSAGE = "Timed out"; const TRANSACTION_TIMED_OUT_ERRNO = "ETIMEDOUT"; const modbusErrorMessages = [ - /*code 0=*/"Unknown error", - /*code 1=*/"Illegal function (device does not support this read/write function)", - /*code 2=*/"Illegal data address (register not supported by device)", - /*code 3=*/"Illegal data value (value cannot be written to this register)", - /*code 4=*/"Slave device failure (device reports internal error)", - /*code 5=*/"Acknowledge (requested data will be available later)", - /*code 6=*/"Slave device busy (retry request again later)", - /*code 7=*/"Negative acknowledge (slave device cannot perform programming functions)", - /*code 8=*/"Memory parity error (slave device detected a parity error in memory)", - /*code 9=*/"Unknown error", - /*code10=*/"Gateway path unavailable (misconfigured gateway)", - /*code11=*/"Gateway target device failed to respond (retry request again later)" + "Unknown error", + "Illegal function (device does not support this read/write function)", + "Illegal data address (register not supported by device)", + "Illegal data value (value cannot be written to this register)", + "Slave device failure (device reports internal error)", + "Acknowledge (requested data will be available later)", + "Slave device busy (retry request again later)", + "Negative acknowledge (slave device cannot perform programming functions)", + "Memory parity error (slave device detected a parity error in memory)", + "Unknown error", + "Gateway path unavailable (misconfigured gateway)", + "Gateway target device failed to respond (retry request again later)" ]; const PortNotOpenError = function() {