Fix lint issues
And disable eslint when building in prod mode Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -52,7 +52,9 @@ export class Actor implements IActor {
|
||||
}
|
||||
|
||||
public displayName(): string {
|
||||
return this.name != null && this.name !== "" ? this.name : this.usernameWithDomain();
|
||||
return this.name != null && this.name !== ""
|
||||
? this.name
|
||||
: this.usernameWithDomain();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,8 @@ export class Address implements IAddress {
|
||||
let alternativeName = "";
|
||||
let poiIcon: IPOIIcon = poiIcons.default;
|
||||
// Google Maps doesn't have a type
|
||||
if (this.type == null && this.description === this.street) this.type = "house";
|
||||
if (this.type == null && this.description === this.street)
|
||||
this.type = "house";
|
||||
|
||||
switch (this.type) {
|
||||
case "house":
|
||||
@@ -81,8 +82,12 @@ export class Address implements IAddress {
|
||||
case "zone":
|
||||
case "city":
|
||||
case "administrative":
|
||||
name = this.postalCode ? `${this.description} (${this.postalCode})` : this.description;
|
||||
alternativeName = [this.region, this.country].filter((zone) => zone).join(", ");
|
||||
name = this.postalCode
|
||||
? `${this.description} (${this.postalCode})`
|
||||
: this.description;
|
||||
alternativeName = [this.region, this.country]
|
||||
.filter((zone) => zone)
|
||||
.join(", ");
|
||||
poiIcon = poiIcons.defaultAdministrative;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -41,7 +41,9 @@ export class Discussion implements IDiscussion {
|
||||
this.title = hash.title;
|
||||
this.comments = {
|
||||
total: hash.comments.total,
|
||||
elements: hash.comments.elements.map((comment: IComment) => new CommentModel(comment)),
|
||||
elements: hash.comments.elements.map(
|
||||
(comment: IComment) => new CommentModel(comment)
|
||||
),
|
||||
};
|
||||
this.slug = hash.slug;
|
||||
this.creator = hash.creator;
|
||||
|
||||
@@ -184,7 +184,9 @@ export class EventModel implements IEvent {
|
||||
|
||||
this.onlineAddress = hash.onlineAddress;
|
||||
this.phoneAddress = hash.phoneAddress;
|
||||
this.physicalAddress = hash.physicalAddress ? new Address(hash.physicalAddress) : undefined;
|
||||
this.physicalAddress = hash.physicalAddress
|
||||
? new Address(hash.physicalAddress)
|
||||
: undefined;
|
||||
this.participantStats = hash.participantStats;
|
||||
|
||||
this.contacts = hash.contacts;
|
||||
@@ -209,7 +211,8 @@ export class EventModel implements IEvent {
|
||||
phoneAddress: this.phoneAddress,
|
||||
physicalAddress: this.physicalAddress,
|
||||
options: this.options,
|
||||
attributedToId: this.attributedTo && this.attributedTo.id ? this.attributedTo.id : null,
|
||||
attributedToId:
|
||||
this.attributedTo && this.attributedTo.id ? this.attributedTo.id : null,
|
||||
contacts: this.contacts.map(({ id }) => ({
|
||||
id,
|
||||
})),
|
||||
|
||||
Reference in New Issue
Block a user