Apply eqeqeq lint rule
This commit is contained in:
1 parent
61ac4d7fa5
commit
40a39f089f
4 files changed
+8
-7
No files matched your search
+2
-1
@@ -15,6 +15,7 @@
|
||||
"curly": ["error", "multi-or-nest", "consistent"],
|
||||
"consistent-return": ["error", {"treatUndefinedAsUnspecified": true}],
|
||||
"no-buffer-constructor": "error",
|
||||
"prefer-const": ["error", {"destructuring": "all"}]
|
||||
"prefer-const": ["error", {"destructuring": "all"}],
|
||||
"eqeqeq": ["error", "always", {"null": "ignore"}]
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -157,7 +157,7 @@ function unpack(deviceData, path, revision) {
|
||||
) {
|
||||
for (let m = 0; m < allMatches.length; ++m) {
|
||||
let k;
|
||||
for (k = i; k >= 0; --k) if (allMatches[m][k] != up[k]) break;
|
||||
for (k = i; k >= 0; --k) if (allMatches[m][k] !== up[k]) break;
|
||||
|
||||
if (k < 0) {
|
||||
filtered.push(allMatches[m]);
|
||||
@@ -226,7 +226,7 @@ function clear(deviceData, path, timestamp, attributes, changeFlags = 0) {
|
||||
deviceData.timestamps.delete(p);
|
||||
deviceData.attributes.delete(p);
|
||||
changeFlags |= 1;
|
||||
} else if (attributes && p.length == path.length) {
|
||||
} else if (attributes && p.length === path.length) {
|
||||
const currentAttributes = deviceData.attributes.get(p);
|
||||
if (currentAttributes) {
|
||||
let newAttrs;
|
||||
|
||||
+2
-2
@@ -96,11 +96,11 @@ function killAll(callback) {
|
||||
for (const n in processes) {
|
||||
++counter;
|
||||
kill(processes[n], () => {
|
||||
if (--counter == 0 && callback) callback();
|
||||
if (--counter === 0 && callback) callback();
|
||||
});
|
||||
delete processes[n];
|
||||
}
|
||||
if (--counter == 0 && callback) callback();
|
||||
if (--counter === 0 && callback) callback();
|
||||
}
|
||||
|
||||
exports.run = run;
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ class InstanceSet {
|
||||
const keysA = Object.keys(a);
|
||||
const keysB = Object.keys(b);
|
||||
|
||||
if (keysA.length != keysB.length) return keysB.length - keysA.length;
|
||||
if (keysA.length !== keysB.length) return keysB.length - keysA.length;
|
||||
|
||||
keysA.sort();
|
||||
keysB.sort();
|
||||
@@ -86,7 +86,7 @@ class InstanceSet {
|
||||
const keysA = Object.keys(a);
|
||||
const keysB = Object.keys(b);
|
||||
|
||||
if (keysA.length != keysB.length) return keysA.length - keysB.length;
|
||||
if (keysA.length !== keysB.length) return keysA.length - keysB.length;
|
||||
|
||||
keysA.sort();
|
||||
keysB.sort();
|
||||
|
||||
Reference in new issue
Block a user