The actual eslint cleanup...

This commit is contained in:
2016-06-08 11:25:51 +02:00
parent 46178864fc
commit 9ed0f31cbc
2 changed files with 26 additions and 22 deletions
+18 -13
View File
@@ -4,20 +4,25 @@
"mocha": true "mocha": true
}, },
"rules": { "rules": {
"strict": [2, "safe"], "strict": [2, "global"],
"no-mixed-requires": 0, "no-mixed-requires": [0],
"no-multi-spaces": 0, "no-multi-spaces": [0],
"space-infix-ops": 2, "space-infix-ops": [2],
"quotes": [1, "single"], "quotes": [2, "single"],
"vars-on-top": 1, "vars-on-top": [2],
"one-var": 1, "one-var": [2],
"no-shadow": 0, "no-shadow": [0],
"eol-last": 0, "eol-last": [0],
"key-spacing": 0, "key-spacing": [0],
"no-mixed-spaces-and-tabs": [2, "smart-tabs"], "no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"space-unary-ops": [1, { "words": true, "nonwords": true }], "space-unary-ops": [1, { "words": true, "nonwords": true }],
"no-underscore-dangle": 0, "no-underscore-dangle": [0],
"camelcase": 0, "camelcase": [0],
"no-process-exit": 0 "no-process-exit": [0],
"no-use-before-define": [0],
"no-unused-expressions": [2],
"semi": [2, "always"],
"no-unused-vars": [2],
"comma-spacing": [2, {"before": false, "after": true}]
} }
} }
+8 -9
View File
@@ -372,15 +372,14 @@ function longSms(pduObj) {
// reference number is of one octet otherwise it consists of 2 octets. Other fields can // reference number is of one octet otherwise it consists of 2 octets. Other fields can
// be found from below reference. // be found from below reference.
// reference: https://en.wikipedia.org/wiki/Concatenated_SMS // reference: https://en.wikipedia.org/wiki/Concatenated_SMS
var udhHeaderSize = pduObj.params.short_message[0], // First octet is the size of UDH Header var udhHeaderSize = pduObj.params.short_message[0], // First octet is the size of UDH Header
headerSize = pduObj.params.short_message[2], // Header size other than first 2 octets headerSize = pduObj.params.short_message[2], // Header size other than first 2 octets
csmsReference = pduObj.params.short_message.slice(3, 3 + headerSize - 2), // CSMS Reference starts from csmsReference = pduObj.params.short_message.slice(3, 3 + headerSize - 2), // CSMS Reference starts from
// 4th octet and length is // 4th octet and length is
// header size -2 octets // header size -2 octets
partsCount = pduObj.params.short_message[2 + csmsReference.length + 1], partsCount = pduObj.params.short_message[2 + csmsReference.length + 1],
partNr = pduObj.params.short_message[2 + csmsReference.length + 1]; partNr = pduObj.params.short_message[2 + csmsReference.length + 1],
longSmsId = pduObj.params.source_addr + '_' + pduObj.params.destination_addr + '_' + csmsReference;
var longSmsId = pduObj.params.source_addr + '_' + pduObj.params.destination_addr + '_' + csmsReference;
if (this.longSmses[longSmsId] === undefined) { if (this.longSmses[longSmsId] === undefined) {
this.longSmses[longSmsId] = { this.longSmses[longSmsId] = {