Format all files with no breaking changes

Lint all files using `npm run lint -- --fix`.
Format all files using `prettier --write "**/*.{ts,tsx,js,jsx,json}"`

No breaking change, only code style is modified.

Gitlab: #29
Change-Id: I4f034a7fb4d3eea10bcd3e38b44a65a1046de62f
diff --git a/model/Account.js b/model/Account.js
index e5d3ffe..aa1e957 100644
--- a/model/Account.js
+++ b/model/Account.js
@@ -1,149 +1,140 @@
-import Contact from './Contact.js'
+import Contact from './Contact.js';
 
 class Account {
-    constructor(id, details, volatileDetails) {
-        this.id = id
-        this.details = details
-        this.volatileDetails = volatileDetails
-        this.contactCache = {}
-        this.contacts = {}
-        this.conversations = {}
-        this.lookups = []
-        this.devices = {}
-    }
+  constructor(id, details, volatileDetails) {
+    this.id = id;
+    this.details = details;
+    this.volatileDetails = volatileDetails;
+    this.contactCache = {};
+    this.contacts = {};
+    this.conversations = {};
+    this.lookups = [];
+    this.devices = {};
+  }
 
-    static from(object) {
-        const account = new Account(
-            object.id,
-            object.details,
-            object.volatileDetails
-        )
-        if (object.defaultModerators)
-            account.defaultModerators = object.defaultModerators.map((m) =>
-                Contact.from(m)
-            )
-        return account
-    }
+  static from(object) {
+    const account = new Account(object.id, object.details, object.volatileDetails);
+    if (object.defaultModerators) account.defaultModerators = object.defaultModerators.map((m) => Contact.from(m));
+    return account;
+  }
 
-    update(data) {
-        this.details = data.details
-        this.volatileDetails = data.volatileDetails
-    }
+  update(data) {
+    this.details = data.details;
+    this.volatileDetails = data.volatileDetails;
+  }
 
-    async getObject() {
-        const hasModerators = this.defaultModerators && this.defaultModerators.length
-        return {
-            id: this.id,
-            details: this.details,
-            defaultModerators: hasModerators
-                ? await Promise.all(
-                    this.defaultModerators.map(async (c) => await c.getObject())
-                )
-                : undefined,
-            volatileDetails: this.volatileDetails,
-        }
-    }
+  async getObject() {
+    const hasModerators = this.defaultModerators && this.defaultModerators.length;
+    return {
+      id: this.id,
+      details: this.details,
+      defaultModerators: hasModerators
+        ? await Promise.all(this.defaultModerators.map(async (c) => await c.getObject()))
+        : undefined,
+      volatileDetails: this.volatileDetails,
+    };
+  }
 
-    getId() {
-        return this.id
-    }
+  getId() {
+    return this.id;
+  }
 
-    getType() {
-        return this.details['Account.type']
-    }
+  getType() {
+    return this.details['Account.type'];
+  }
 
-    getUri() {
-        return this.details['Account.username']
-    }
+  getUri() {
+    return this.details['Account.username'];
+  }
 
-    getRegisteredName() {
-        return this.volatileDetails['Account.registeredName']
-    }
+  getRegisteredName() {
+    return this.volatileDetails['Account.registeredName'];
+  }
 
-    isRendezVous() {
-        return this.details['Account.rendezVous'] === Account.BOOL_TRUE
-    }
+  isRendezVous() {
+    return this.details['Account.rendezVous'] === Account.BOOL_TRUE;
+  }
 
-    isPublicIn() {
-        return this.details['DHT.PublicInCalls'] === Account.BOOL_TRUE
-    }
+  isPublicIn() {
+    return this.details['DHT.PublicInCalls'] === Account.BOOL_TRUE;
+  }
 
-    setDetail(detail, value) {
-        this.details[detail] = value
-    }
+  setDetail(detail, value) {
+    this.details[detail] = value;
+  }
 
-    updateDetails(details) {
-        return Object.assign(this.details, details)
-    }
+  updateDetails(details) {
+    return Object.assign(this.details, details);
+  }
 
-    getDetails() {
-        return this.details
-    }
+  getDetails() {
+    return this.details;
+  }
 
-    getSummary() {
-        return this.getObject()
-    }
+  getSummary() {
+    return this.getObject();
+  }
 
-    getDisplayName() {
-        return this.details['Account.displayName'] || this.getDisplayUri()
-    }
+  getDisplayName() {
+    return this.details['Account.displayName'] || this.getDisplayUri();
+  }
 
-    getDisplayUri() {
-        return this.getRegisteredName() || this.getUri()
-    }
+  getDisplayUri() {
+    return this.getRegisteredName() || this.getUri();
+  }
 
-    getDisplayNameNoFallback() {
-        return this.details['Account.displayName'] || this.getRegisteredName()
-    }
+  getDisplayNameNoFallback() {
+    return this.details['Account.displayName'] || this.getRegisteredName();
+  }
 
-    getConversationIds() {
-        return Object.keys(this.conversations)
-    }
-    getConversations() {
-        return this.conversations
-    }
+  getConversationIds() {
+    return Object.keys(this.conversations);
+  }
+  getConversations() {
+    return this.conversations;
+  }
 
-    getConversation(conversationId) {
-        return this.conversations[conversationId]
-    }
+  getConversation(conversationId) {
+    return this.conversations[conversationId];
+  }
 
-    addConversation(conversation) {
-        this.conversations[conversation.getId()] = conversation
-    }
+  addConversation(conversation) {
+    this.conversations[conversation.getId()] = conversation;
+  }
 
-    removeConversation(conversationId) {
-        delete this.conversations[conversationId]
-    }
+  removeConversation(conversationId) {
+    delete this.conversations[conversationId];
+  }
 
-    getContactFromCache(uri) {
-        let contact = this.contactCache[uri]
-        if (!contact) {
-            contact = new Contact(uri)
-            this.contactCache[uri] = contact
-        }
-        return contact
+  getContactFromCache(uri) {
+    let contact = this.contactCache[uri];
+    if (!contact) {
+      contact = new Contact(uri);
+      this.contactCache[uri] = contact;
     }
+    return contact;
+  }
 
-    getContacts() {
-        return this.contacts
-    }
+  getContacts() {
+    return this.contacts;
+  }
 
-    getDefaultModerators() {
-        return this.defaultModerators
-    }
+  getDefaultModerators() {
+    return this.defaultModerators;
+  }
 
-    setDevices(devices) {
-        this.devices = { ...devices }
-    }
-    getDevices() {
-        return this.devices
-    }
+  setDevices(devices) {
+    this.devices = { ...devices };
+  }
+  getDevices() {
+    return this.devices;
+  }
 }
 
-Account.TYPE_JAMI = 'RING'
-Account.TYPE_SIP = 'SIP'
+Account.TYPE_JAMI = 'RING';
+Account.TYPE_SIP = 'SIP';
 
-Account.BOOL_TRUE = 'true'
-Account.BOOL_FALSE = 'false'
+Account.BOOL_TRUE = 'true';
+Account.BOOL_FALSE = 'false';
 
-export default Account
+export default Account;
diff --git a/model/Contact.js b/model/Contact.js
index 66459d2..cc8e386 100644
--- a/model/Contact.js
+++ b/model/Contact.js
@@ -1,41 +1,46 @@
 class Contact {
-    constructor(uri) {
-        this.uri = uri
-        this.displayName = undefined
-        this.registeredName = undefined
-    }
+  constructor(uri) {
+    this.uri = uri;
+    this.displayName = undefined;
+    this.registeredName = undefined;
+  }
 
-    static from(object) {
-        const contact = new Contact(object.uri)
-        if (object.registeredName)
-            contact.setRegisteredName(object.registeredName)
-        return contact
-    }
+  static from(object) {
+    const contact = new Contact(object.uri);
+    if (object.registeredName) contact.setRegisteredName(object.registeredName);
+    return contact;
+  }
 
-    getUri() { return this.uri }
+  getUri() {
+    return this.uri;
+  }
 
-    getRegisteredName() { return this.registeredName }
+  getRegisteredName() {
+    return this.registeredName;
+  }
 
-    setRegisteredName(name) { this.registeredName = name }
+  setRegisteredName(name) {
+    this.registeredName = name;
+  }
 
-    isRegisteredNameResolved() {
-        return this.registeredName !== undefined
-    }
+  isRegisteredNameResolved() {
+    return this.registeredName !== undefined;
+  }
 
-    getDisplayName() {
-        return this.getDisplayNameNoFallback() || this.getUri()
-    }
+  getDisplayName() {
+    return this.getDisplayNameNoFallback() || this.getUri();
+  }
 
-    getDisplayNameNoFallback() {
-        return this.displayName || this.getRegisteredName()
-    }
+  getDisplayNameNoFallback() {
+    return this.displayName || this.getRegisteredName();
+  }
 
-    async getObject() {
-        return {
-            uri: this.uri,
-            registeredName: await this.registeredName
-        }
-    }
+  async getObject() {
+    return {
+      uri: this.uri,
+      registeredName: await this.registeredName,
+    };
+  }
 }
 
-export default Contact
+export default Contact;
diff --git a/model/Conversation.js b/model/Conversation.js
index 956b1c9..174ba03 100644
--- a/model/Conversation.js
+++ b/model/Conversation.js
@@ -1,95 +1,104 @@
-import Contact from './Contact.js'
+import Contact from './Contact.js';
 
 class Conversation {
-    constructor(id, accountId, members) {
-        this.id = id
-        this.accountId = accountId
-        this.members = members || []
-        this.messages = []
-        this.infos = {}
-    }
+  constructor(id, accountId, members) {
+    this.id = id;
+    this.accountId = accountId;
+    this.members = members || [];
+    this.messages = [];
+    this.infos = {};
+  }
 
-    static from(accountId, object) {
-        const conversation = new Conversation(object.id, accountId, object.members.map(member => {
-            member.contact = Contact.from(member.contact)
-            return member
-        }))
-        conversation.messages = object.messages
-        return conversation
-    }
-    static fromSingleContact(accountId, contact) {
-        return new Conversation(undefined, accountId, [{contact}])
-    }
+  static from(accountId, object) {
+    const conversation = new Conversation(
+      object.id,
+      accountId,
+      object.members.map((member) => {
+        member.contact = Contact.from(member.contact);
+        return member;
+      })
+    );
+    conversation.messages = object.messages;
+    return conversation;
+  }
+  static fromSingleContact(accountId, contact) {
+    return new Conversation(undefined, accountId, [{ contact }]);
+  }
 
-    getId() { return this.id }
+  getId() {
+    return this.id;
+  }
 
-    getAccountId() { return this.accountId }
+  getAccountId() {
+    return this.accountId;
+  }
 
-    getDisplayName() {
-        if (this.members.length !== 0) {
-            return this.members[0].contact.getDisplayName()
-        }
-        return this.getDisplayUri()
+  getDisplayName() {
+    if (this.members.length !== 0) {
+      return this.members[0].contact.getDisplayName();
     }
+    return this.getDisplayUri();
+  }
 
-    getDisplayNameNoFallback() {
-        if (this.members.length !== 0) {
-            return this.members[0].contact.getDisplayNameNoFallback()
-        }
+  getDisplayNameNoFallback() {
+    if (this.members.length !== 0) {
+      return this.members[0].contact.getDisplayNameNoFallback();
     }
+  }
 
-    async getObject(params) {
-        const members = params.memberFilter ? this.members.filter(params.memberFilter) : this.members
-        return {
-            id: this.id,
-            messages: this.messages,
-            members: await Promise.all(members.map(async member => {
-                const copiedMember = { role: member.role }//Object.assign({}, member);
-                copiedMember.contact = await member.contact.getObject()
-                return copiedMember
-            }))
-        }
-    }
+  async getObject(params) {
+    const members = params.memberFilter ? this.members.filter(params.memberFilter) : this.members;
+    return {
+      id: this.id,
+      messages: this.messages,
+      members: await Promise.all(
+        members.map(async (member) => {
+          const copiedMember = { role: member.role }; //Object.assign({}, member);
+          copiedMember.contact = await member.contact.getObject();
+          return copiedMember;
+        })
+      ),
+    };
+  }
 
-    getSummary() {
-        return this.getObject()
-    }
+  getSummary() {
+    return this.getObject();
+  }
 
-    getDisplayUri() {
-        return this.getId() || this.getFirstMember().contact.getUri()
-    }
+  getDisplayUri() {
+    return this.getId() || this.getFirstMember().contact.getUri();
+  }
 
-    getFirstMember() {
-        return this.members[0]
-    }
+  getFirstMember() {
+    return this.members[0];
+  }
 
-    getMembers() {
-        return this.members
-    }
+  getMembers() {
+    return this.members;
+  }
 
-    addMessage(message) {
-        if (this.messages.length === 0)
-            this.messages.push(message)
-        else if (message.id === this.messages[this.messages.length - 1].linearizedParent) {
-            this.messages.push(message)
-        } else if (message.linearizedParent === this.messages[0].id) {
-            this.messages.unshift(message)
-        } else {
-            console.log("Can't insert message " + message.id)
-        }
+  addMessage(message) {
+    if (this.messages.length === 0) this.messages.push(message);
+    else if (message.id === this.messages[this.messages.length - 1].linearizedParent) {
+      this.messages.push(message);
+    } else if (message.linearizedParent === this.messages[0].id) {
+      this.messages.unshift(message);
+    } else {
+      console.log("Can't insert message " + message.id);
     }
+  }
 
-    addLoadedMessages(messages) {
-        messages.forEach(message => this.addMessage(message))
-    }
+  addLoadedMessages(messages) {
+    messages.forEach((message) => this.addMessage(message));
+  }
 
-    getMessages() {
-        return this.messages
-    }
+  getMessages() {
+    return this.messages;
+  }
 
-    setInfos(infos){
-        this.infos = infos
-    }
+  setInfos(infos) {
+    this.infos = infos;
+  }
 }
 
 export default Conversation;