mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
New eslint rules auto fix (#3058)
* no-implicit-coercion and no-unneeded-ternary * End every line with a semicolon * Spacing and formatting * Enabled semi-spacing * Applies npm run lint:fix to code after master merge * Fix merge issues * Switched operator-linebreak to 'before' Co-authored-by: Joshi <simplyrender@gmail.com>
This commit is contained in:
@ -23,6 +23,7 @@ define([
|
||||
key: i
|
||||
});
|
||||
}
|
||||
|
||||
while (objectString.indexOf(originalId) !== -1) {
|
||||
objectString = objectString.replace(
|
||||
'"' + originalId + '"',
|
||||
@ -42,6 +43,7 @@ define([
|
||||
return Object.keys(oldObjectMap)
|
||||
.reduce(function (newObjectMap, key) {
|
||||
newObjectMap[key] = objectUtils.toNewFormat(oldObjectMap[key], key);
|
||||
|
||||
return newObjectMap;
|
||||
}, {});
|
||||
}
|
||||
@ -49,6 +51,7 @@ define([
|
||||
/* Set the root location correctly for a top-level object */
|
||||
function setRootLocation(objectMap, rootIdentifier) {
|
||||
objectMap[objectUtils.makeKeyString(rootIdentifier)].location = 'ROOT';
|
||||
|
||||
return objectMap;
|
||||
}
|
||||
|
||||
@ -70,6 +73,7 @@ define([
|
||||
if (this.objectMap[keyString]) {
|
||||
return this.objectMap[keyString];
|
||||
}
|
||||
|
||||
throw new Error(keyString + ' not found in import models.');
|
||||
};
|
||||
|
||||
|
@ -23,6 +23,7 @@ define([
|
||||
})
|
||||
.then(function (importData) {
|
||||
cachedProvider = new StaticModelProvider(importData, rootIdentifier);
|
||||
|
||||
return cachedProvider;
|
||||
});
|
||||
|
||||
@ -32,6 +33,7 @@ define([
|
||||
if (!cachedProvider) {
|
||||
cachedProvider = loadProvider();
|
||||
}
|
||||
|
||||
return Promise.resolve(cachedProvider);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user