ESLint one-var, no-var rules (#3239)

* fixed issues for eslint one-var and no-var rules

Co-authored-by: Joshi <simplyrender@gmail.com>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
Joel McKinnon
2020-08-10 12:13:23 -07:00
committed by GitHub
parent 4d560086dd
commit c6ca912f2b
193 changed files with 1601 additions and 1541 deletions

View File

@@ -110,9 +110,9 @@ export default {
this.$set(this.secondaryTelemetryObjects, primary.key, []);
this.primaryTelemetryObjects.push(primary);
let composition = this.openmct.composition.get(primary.domainObject),
addCallback = this.addSecondary(primary),
removeCallback = this.removeSecondary(primary);
let composition = this.openmct.composition.get(primary.domainObject);
let addCallback = this.addSecondary(primary);
let removeCallback = this.removeSecondary(primary);
composition.on('add', addCallback);
composition.on('remove', removeCallback);
@@ -125,8 +125,8 @@ export default {
});
},
removePrimary(identifier) {
let index = this.primaryTelemetryObjects.findIndex(primary => this.openmct.objects.makeKeyString(identifier) === primary.key),
primary = this.primaryTelemetryObjects[index];
let index = this.primaryTelemetryObjects.findIndex(primary => this.openmct.objects.makeKeyString(identifier) === primary.key);
let primary = this.primaryTelemetryObjects[index];
this.$delete(this.secondaryTelemetryObjects, primary.key);
this.primaryTelemetryObjects.splice(index, 1);
@@ -151,8 +151,8 @@ export default {
},
removeSecondary(primary) {
return (identifier) => {
let array = this.secondaryTelemetryObjects[primary.key],
index = array.findIndex(secondary => this.openmct.objects.makeKeyString(identifier) === secondary.key);
let array = this.secondaryTelemetryObjects[primary.key];
let index = array.findIndex(secondary => this.openmct.objects.makeKeyString(identifier) === secondary.key);
array.splice(index, 1);