pumpkin-zbh / amqp_comm_example

Require template literals instead of string concatenation JS-0246
Anti-pattern
Minor
4 occurrences in this check
Unexpected string concatenation
 79            }
 80        }
 81    }
 82    console.log("===Report Scan Data\n topic=" + topic) 83    console.log(payloadJson)
 84    return JSON.stringify(payloadJson);
 85}
Unexpected string concatenation
 30client.subscribe(subTopic)
 31client.on('message', function(topic, message) {
 32    console.log("topic " + topic)
 33    console.log("message " + message) 34})
 35
 36//IoT平台mqtt连接参数初始化
Unexpected string concatenation
 29const subTopic = `/${deviceConfig.productKey}/${deviceConfig.deviceName}/user/get`;
 30client.subscribe(subTopic)
 31client.on('message', function(topic, message) {
 32    console.log("topic " + topic) 33    console.log("message " + message)
 34})
 35
Unexpected string concatenation
28    let topic = msg.application_properties.topic;
29    let content =JSON.parse(Buffer.from(msg.body.content).toString().replace(/\'/g, '"'));
30    if (topic.indexOf('/user/update') !== -1) {
31        console.log("\nTopic: " + topic)32        if (content.subType === "SCAN") {
33            // 网关持续上传周围的跳绳清单和状态、配置信息
34            console.dir(content, { depth: null });