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:
Andrew Henry
2020-07-31 12:11:03 -07:00
committed by GitHub
parent 573a63d359
commit a09da30768
739 changed files with 4660 additions and 2339 deletions

View File

@ -88,7 +88,11 @@ define(
priority: -1000,
// Two-way bind key, ngModel, and parameters
scope: { key: "=", ngModel: "=", parameters: "=" }
scope: {
key: "=",
ngModel: "=",
parameters: "="
}
};
}

View File

@ -74,8 +74,8 @@ define(
// Filter candidates by object type
for (i = 0; i < candidates.length; i += 1) {
type = candidates[i].type;
if (!type || !domainObject ||
domainObject.getCapability('type').instanceOf(type)) {
if (!type || !domainObject
|| domainObject.getCapability('type').instanceOf(type)) {
return candidates[i];
}
}
@ -146,10 +146,10 @@ define(
}
function unchanged(canRepresent, idPath, key) {
return (canRepresent === couldRepresent) &&
(key === lastKey) &&
(idPath.length === lastIdPath.length) &&
idPath.every(function (id, i) {
return (canRepresent === couldRepresent)
&& (key === lastKey)
&& (idPath.length === lastIdPath.length)
&& idPath.every(function (id, i) {
return id === lastIdPath[i];
});
}
@ -158,9 +158,11 @@ define(
if (!domainObject) {
return [];
}
if (!domainObject.hasCapability('context')) {
return [domainObject.getId()];
}
return domainObject.getCapability('context')
.getPath().map(function (pathObject) {
return pathObject.getId();
@ -174,7 +176,7 @@ define(
var domainObject = $scope.domainObject,
representation = lookup($scope.key, domainObject),
uses = ((representation || {}).uses || []),
canRepresent = !!(representation && domainObject),
canRepresent = Boolean(representation && domainObject),
idPath = getIdPath(domainObject),
key = $scope.key;
@ -300,7 +302,6 @@ define(
* being represented
*/
return MCTRepresentation;
}
);

View File

@ -151,6 +151,7 @@ define(
} else {
removeElement();
}
activeTemplateUrl = templateUrl;
}

View File

@ -78,7 +78,6 @@ define(
domainObject.getId()
);
} catch (err) {
// Exceptions at this point indicate that the browser
// do not fully support drag-and-drop (e.g. if
@ -108,7 +107,6 @@ define(
this.endDragCallback = endDrag;
}
DragGesture.prototype.destroy = function () {
// Detach listener
this.element.removeAttr('draggable');

View File

@ -83,6 +83,7 @@ define(
// Indicate that we will accept the drag
event.preventDefault(); // Required in Chrome?
return false;
}
}
@ -123,7 +124,6 @@ define(
this.element.off('drop', this.dropCallback);
};
return DropGesture;
}
);

View File

@ -94,9 +94,9 @@ define(
attachedGestures = gestureKeys.map(function (key) {
return gestureMap[key];
}).filter(function (Gesture) {
return Gesture !== undefined && (Gesture.appliesTo ?
Gesture.appliesTo(domainObject) :
true);
return Gesture !== undefined && (Gesture.appliesTo
? Gesture.appliesTo(domainObject)
: true);
}).map(function (Gesture) {
return new Gesture(element, domainObject);
});