mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
ESLint upgrade, implement additional rules (#3230)
* upgrade to ESLintv7, added overrides for rules violated * removed overrides for spec files * fixed no-prototype-builtins issues * added rules for default-case-last, default-param-last, grouped-accessor-pairs, no-constructor-return, and added override for one violation Co-authored-by: Andrew Henry <akhenry@gmail.com> Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
This commit is contained in:
@ -56,7 +56,7 @@ define([], function () {
|
||||
* @returns {boolean} true if present; false if not
|
||||
*/
|
||||
ModelCacheService.prototype.has = function (id) {
|
||||
return this.cache.hasOwnProperty(id);
|
||||
return Object.prototype.hasOwnProperty.call(this.cache, id);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([], function () {
|
||||
|
||||
|
@ -75,13 +75,13 @@ define(
|
||||
function mergeObjects(a, b) {
|
||||
var result = {};
|
||||
Object.keys(a).forEach(function (k) {
|
||||
result[k] = b.hasOwnProperty(k)
|
||||
result[k] = Object.prototype.hasOwnProperty.call(b, k)
|
||||
? mergeModels(a[k], b[k], (merger || {})[k])
|
||||
: a[k];
|
||||
});
|
||||
Object.keys(b).forEach(function (k) {
|
||||
// Copy any properties not already merged
|
||||
if (!a.hasOwnProperty(k)) {
|
||||
if (!Object.prototype.hasOwnProperty.call(a, k)) {
|
||||
result[k] = b[k];
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user