Bug 1577835 - Reformat mailnews/ code with eslint and Prettier. r=mkmelin
authorPaul Morris <paul@thunderbird.net>
Fri, 30 Aug 2019 22:10:02 -0400
changeset 35711 5b47088d84e77f42fd810d0c68c9518be20bc6f5
parent 35710 3aceadebffb57f6cc20db9a3a612e0af55071035
child 35712 b53bee47da4e80abed1aaee62358fbeaeed5ee97
push id2486
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:24:43 +0000
treeherdercomm-beta@1b30a9a6e7f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1577835
Bug 1577835 - Reformat mailnews/ code with eslint and Prettier. r=mkmelin # ignore-this-changeset These changes were achieved by: 1. Using eslint to add curly brackets to control statements that did not have them (if, else, etc.), thanks to the eslint rule: "curly": ["error", "all"] Done by running |mach eslint mailnews/ --fix| 2. Reformatting the code using Prettier. Done by deleting the mailnews/ line from the .prettierignore file and running: |mach eslint mailnews/ --fix|
.prettierignore
mailnews/addrbook/content/abAddressBookNameDialog.js
mailnews/addrbook/content/abDragDrop.js
mailnews/addrbook/content/abMailListDialog.js
mailnews/addrbook/content/abResultsPane.js
mailnews/addrbook/content/map-list.js
mailnews/addrbook/jsaddrbook/AddrBookCard.jsm
mailnews/addrbook/jsaddrbook/AddrBookDirectory.jsm
mailnews/addrbook/jsaddrbook/AddrBookFactory.jsm
mailnews/addrbook/jsaddrbook/AddrBookMailingList.jsm
mailnews/addrbook/jsaddrbook/AddrBookUtils.jsm
mailnews/addrbook/prefs/content/pref-directory-add.js
mailnews/addrbook/prefs/content/pref-editdirectories.js
mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
mailnews/addrbook/src/nsAbAutoCompleteSearch.js
mailnews/addrbook/src/nsAbLDAPAttributeMap.js
mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
mailnews/addrbook/test/unit/head_addrbook.js
mailnews/addrbook/test/unit/head_jsaddrbook.js
mailnews/addrbook/test/unit/test_basic_nsIAbCard.js
mailnews/addrbook/test/unit/test_basic_nsIAbDirectory.js
mailnews/addrbook/test/unit/test_bug1522453.js
mailnews/addrbook/test/unit/test_bug387403.js
mailnews/addrbook/test/unit/test_bug448165.js
mailnews/addrbook/test/unit/test_bug534822.js
mailnews/addrbook/test/unit/test_cardForEmail.js
mailnews/addrbook/test/unit/test_collection.js
mailnews/addrbook/test/unit/test_collection_2.js
mailnews/addrbook/test/unit/test_db_enumerator.js
mailnews/addrbook/test/unit/test_jsaddrbook.js
mailnews/addrbook/test/unit/test_ldap1.js
mailnews/addrbook/test/unit/test_ldap2.js
mailnews/addrbook/test/unit/test_ldapOffline.js
mailnews/addrbook/test/unit/test_mailList1.js
mailnews/addrbook/test/unit/test_notifications.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteMyDomain.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch1.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch2.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch3.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch4.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch5.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch6.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch7.js
mailnews/addrbook/test/unit/test_nsAbManager1.js
mailnews/addrbook/test/unit/test_nsAbManager2.js
mailnews/addrbook/test/unit/test_nsAbManager3.js
mailnews/addrbook/test/unit/test_nsIAbCard.js
mailnews/addrbook/test/unit/test_uid.js
mailnews/addrbook/test/unit/test_uuid.js
mailnews/base/content/dateFormat.js
mailnews/base/content/folder-menupopup.js
mailnews/base/content/folderProps.js
mailnews/base/content/jsTreeView.js
mailnews/base/content/junkCommands.js
mailnews/base/content/junkLog.js
mailnews/base/content/markByDate.js
mailnews/base/content/menulist-charsetpicker.js
mailnews/base/content/msgAccountCentral.js
mailnews/base/content/msgFolderPickerOverlay.js
mailnews/base/content/msgPrintEngine.js
mailnews/base/content/msgSelectOfflineFolders.js
mailnews/base/content/msgSynchronize.js
mailnews/base/content/newFolderDialog.js
mailnews/base/content/newmailalert.js
mailnews/base/content/newsError.js
mailnews/base/content/renameFolderDialog.js
mailnews/base/content/retention.js
mailnews/base/content/shutdownWindow.js
mailnews/base/content/subscribe.js
mailnews/base/content/virtualFolderListEdit.js
mailnews/base/content/virtualFolderProperties.js
mailnews/base/prefs/content/AccountManager.js
mailnews/base/prefs/content/AccountWizard.js
mailnews/base/prefs/content/SmtpServerEdit.js
mailnews/base/prefs/content/accountUtils.js
mailnews/base/prefs/content/am-addressing.js
mailnews/base/prefs/content/am-archiveoptions.js
mailnews/base/prefs/content/am-copies.js
mailnews/base/prefs/content/am-help.js
mailnews/base/prefs/content/am-identities-list.js
mailnews/base/prefs/content/am-identity-edit.js
mailnews/base/prefs/content/am-junk.js
mailnews/base/prefs/content/am-main.js
mailnews/base/prefs/content/am-offline.js
mailnews/base/prefs/content/am-prefs.js
mailnews/base/prefs/content/am-server-advanced.js
mailnews/base/prefs/content/am-server.js
mailnews/base/prefs/content/am-serverwithnoidentities.js
mailnews/base/prefs/content/am-smtp.js
mailnews/base/prefs/content/amUtils.js
mailnews/base/prefs/content/aw-accname.js
mailnews/base/prefs/content/aw-accounttype.js
mailnews/base/prefs/content/aw-done.js
mailnews/base/prefs/content/aw-identity.js
mailnews/base/prefs/content/aw-incoming.js
mailnews/base/prefs/content/aw-outgoing.js
mailnews/base/prefs/content/converterDialog.js
mailnews/base/prefs/content/removeAccount.js
mailnews/base/search/content/CustomHeaders.js
mailnews/base/search/content/FilterEditor.js
mailnews/base/search/content/searchTerm.js
mailnews/base/search/content/searchWidgets.js
mailnews/base/search/content/viewLog.js
mailnews/base/search/src/PeriodicFilterManager.jsm
mailnews/base/search/src/nsMsgTraitService.js
mailnews/base/src/folderLookupService.js
mailnews/base/src/msgAsyncPrompter.js
mailnews/base/src/msgOAuth2Module.js
mailnews/base/src/newMailNotificationService.js
mailnews/base/src/nsMailNewsCommandLineHandler.js
mailnews/base/src/virtualFolderWrapper.js
mailnews/base/test/unit/head_mailbase.js
mailnews/base/test/unit/test_accountMgr.js
mailnews/base/test/unit/test_accountMgrCustomTypes.js
mailnews/base/test/unit/test_accountMigration.js
mailnews/base/test/unit/test_acctRepair.js
mailnews/base/test/unit/test_base64_decoding.js
mailnews/base/test/unit/test_bccInDatabase.js
mailnews/base/test/unit/test_bug366491.js
mailnews/base/test/unit/test_bug404489.js
mailnews/base/test/unit/test_bug428427.js
mailnews/base/test/unit/test_bug434810.js
mailnews/base/test/unit/test_bug471682.js
mailnews/base/test/unit/test_bug514945.js
mailnews/base/test/unit/test_compactColumnSave.js
mailnews/base/test/unit/test_compactFailure.js
mailnews/base/test/unit/test_converterDeferredAccount.js
mailnews/base/test/unit/test_copyChaining.js
mailnews/base/test/unit/test_copyThenMoveManual.js
mailnews/base/test/unit/test_copyToInvalidDB.js
mailnews/base/test/unit/test_detachToFile.js
mailnews/base/test/unit/test_emptyTrash.js
mailnews/base/test/unit/test_fix_deferred_accounts.js
mailnews/base/test/unit/test_folderCompact.js
mailnews/base/test/unit/test_folderLookupService.js
mailnews/base/test/unit/test_formatFileSize.js
mailnews/base/test/unit/test_getMsgTextFromStream.js
mailnews/base/test/unit/test_headerFoldingInDatabase.js
mailnews/base/test/unit/test_hostnameUtils.js
mailnews/base/test/unit/test_imapPump.js
mailnews/base/test/unit/test_inheritedFolderProperties.js
mailnews/base/test/unit/test_iteratorUtils.js
mailnews/base/test/unit/test_jsTreeSelection.js
mailnews/base/test/unit/test_junkWhitelisting.js
mailnews/base/test/unit/test_junkingWhenDisabled.js
mailnews/base/test/unit/test_loadVirtualFolders.js
mailnews/base/test/unit/test_mailServices.js
mailnews/base/test/unit/test_mailstoreConverter.js
mailnews/base/test/unit/test_mimemaltdetach.js
mailnews/base/test/unit/test_newMailNotification.js
mailnews/base/test/unit/test_nsIFolderListener.js
mailnews/base/test/unit/test_nsIMsgContentPolicy.js
mailnews/base/test/unit/test_nsIMsgFolder.js
mailnews/base/test/unit/test_nsIMsgFolderListener.js
mailnews/base/test/unit/test_nsIMsgFolderListenerLocal.js
mailnews/base/test/unit/test_nsIMsgTagService.js
mailnews/base/test/unit/test_nsMailDirProvider.js
mailnews/base/test/unit/test_nsMsgDBView.js
mailnews/base/test/unit/test_nsMsgDBView_headerValues.js
mailnews/base/test/unit/test_nsMsgMailSession_Alerts.js
mailnews/base/test/unit/test_nsMsgMailSession_Listeners.js
mailnews/base/test/unit/test_nsMsgTraitService.js
mailnews/base/test/unit/test_postPluginFilters.js
mailnews/base/test/unit/test_quarantineFilterMove.js
mailnews/base/test/unit/test_retention.js
mailnews/base/test/unit/test_search.js
mailnews/base/test/unit/test_searchAddressInAb.js
mailnews/base/test/unit/test_searchBody.js
mailnews/base/test/unit/test_searchBoolean.js
mailnews/base/test/unit/test_searchChaining.js
mailnews/base/test/unit/test_searchCustomTerm.js
mailnews/base/test/unit/test_searchJunk.js
mailnews/base/test/unit/test_searchLocalizationStrings.js
mailnews/base/test/unit/test_searchTag.js
mailnews/base/test/unit/test_searchUint32HdrProperty.js
mailnews/base/test/unit/test_testsuite_fakeserverAuth.js
mailnews/base/test/unit/test_testsuite_fakeserver_imapd_gmail.js
mailnews/base/test/unit/test_testsuite_fakeserver_imapd_list-extended.js
mailnews/base/test/unit/test_viewSortByAddresses.js
mailnews/base/util/ABQueryUtils.jsm
mailnews/base/util/IOUtils.js
mailnews/base/util/JXON.js
mailnews/base/util/MailServices.jsm
mailnews/base/util/OAuth2.jsm
mailnews/base/util/OAuth2Providers.jsm
mailnews/base/util/StringBundle.js
mailnews/base/util/converterWorker.js
mailnews/base/util/errUtils.js
mailnews/base/util/folderUtils.jsm
mailnews/base/util/hostnameUtils.jsm
mailnews/base/util/iteratorUtils.jsm
mailnews/base/util/jsTreeSelection.js
mailnews/base/util/mailnewsMigrator.js
mailnews/base/util/mailstoreConverter.jsm
mailnews/base/util/msgDBCacheManager.js
mailnews/base/util/templateUtils.js
mailnews/base/util/traceHelper.js
mailnews/compose/content/askSendFormat.js
mailnews/compose/content/sendProgress.js
mailnews/compose/src/nsSMTPProtocolHandler.js
mailnews/compose/test/unit/head_compose.js
mailnews/compose/test/unit/test_attachment.js
mailnews/compose/test/unit/test_attachment_intl.js
mailnews/compose/test/unit/test_autoReply.js
mailnews/compose/test/unit/test_bug155172.js
mailnews/compose/test/unit/test_bug235432.js
mailnews/compose/test/unit/test_bug474774.js
mailnews/compose/test/unit/test_detectAttachmentCharset.js
mailnews/compose/test/unit/test_expandMailingLists.js
mailnews/compose/test/unit/test_longLines.js
mailnews/compose/test/unit/test_mailtoURL.js
mailnews/compose/test/unit/test_messageHeaders.js
mailnews/compose/test/unit/test_nsIMsgCompFields.js
mailnews/compose/test/unit/test_nsMsgCompose1.js
mailnews/compose/test/unit/test_nsMsgCompose2.js
mailnews/compose/test/unit/test_nsMsgCompose3.js
mailnews/compose/test/unit/test_nsMsgCompose4.js
mailnews/compose/test/unit/test_nsSmtpService1.js
mailnews/compose/test/unit/test_saveDraft.js
mailnews/compose/test/unit/test_sendBackground.js
mailnews/compose/test/unit/test_sendMailAddressIDN.js
mailnews/compose/test/unit/test_sendMailMessage.js
mailnews/compose/test/unit/test_sendMessageFile.js
mailnews/compose/test/unit/test_sendMessageLater.js
mailnews/compose/test/unit/test_sendMessageLater2.js
mailnews/compose/test/unit/test_sendMessageLater3.js
mailnews/compose/test/unit/test_sendObserver.js
mailnews/compose/test/unit/test_smtp8bitMime.js
mailnews/compose/test/unit/test_smtpAuthMethods.js
mailnews/compose/test/unit/test_smtpPassword.js
mailnews/compose/test/unit/test_smtpPassword2.js
mailnews/compose/test/unit/test_smtpPasswordFailure1.js
mailnews/compose/test/unit/test_smtpPasswordFailure2.js
mailnews/compose/test/unit/test_smtpPasswordFailure3.js
mailnews/compose/test/unit/test_smtpProtocols.js
mailnews/compose/test/unit/test_smtpProxy.js
mailnews/compose/test/unit/test_smtpURL.js
mailnews/compose/test/unit/test_splitRecipients.js
mailnews/compose/test/unit/test_staleTemporaryFileCleanup.js
mailnews/compose/test/unit/test_temporaryFilesRemoved.js
mailnews/db/gloda/components/glautocomp.js
mailnews/db/gloda/components/jsmimeemitter.js
mailnews/db/gloda/content/autocomplete-richlistitem.js
mailnews/db/gloda/content/glodacomplete.js
mailnews/db/gloda/content/overlay.js
mailnews/db/gloda/modules/collection.js
mailnews/db/gloda/modules/connotent.js
mailnews/db/gloda/modules/databind.js
mailnews/db/gloda/modules/datamodel.js
mailnews/db/gloda/modules/datastore.js
mailnews/db/gloda/modules/dbview.js
mailnews/db/gloda/modules/everybody.js
mailnews/db/gloda/modules/explattr.js
mailnews/db/gloda/modules/facet.js
mailnews/db/gloda/modules/fundattr.js
mailnews/db/gloda/modules/gloda.js
mailnews/db/gloda/modules/index_ab.js
mailnews/db/gloda/modules/index_msg.js
mailnews/db/gloda/modules/indexer.js
mailnews/db/gloda/modules/log4moz.js
mailnews/db/gloda/modules/mimeTypeCategories.js
mailnews/db/gloda/modules/mimemsg.js
mailnews/db/gloda/modules/msg_search.js
mailnews/db/gloda/modules/noun_freetag.js
mailnews/db/gloda/modules/noun_mimetype.js
mailnews/db/gloda/modules/noun_tag.js
mailnews/db/gloda/modules/public.js
mailnews/db/gloda/modules/query.js
mailnews/db/gloda/modules/suffixtree.js
mailnews/db/gloda/modules/utils.js
mailnews/db/gloda/test/unit/base_gloda_content.js
mailnews/db/gloda/test/unit/base_index_junk.js
mailnews/db/gloda/test/unit/base_index_messages.js
mailnews/db/gloda/test/unit/base_query_messages.js
mailnews/db/gloda/test/unit/head_gloda.js
mailnews/db/gloda/test/unit/resources/asyncCallbackHandler.js
mailnews/db/gloda/test/unit/resources/genericIndexer.js
mailnews/db/gloda/test/unit/resources/glodaTestHelper.js
mailnews/db/gloda/test/unit/resources/mockIndexer.js
mailnews/db/gloda/test/unit/resources/mockTimer.js
mailnews/db/gloda/test/unit/test_cleanup_msf_databases.js
mailnews/db/gloda/test/unit/test_corrupt_database.js
mailnews/db/gloda/test/unit/test_folder_logic.js
mailnews/db/gloda/test/unit/test_fts3_tokenizer.js
mailnews/db/gloda/test/unit/test_gloda_content_imap_offline.js
mailnews/db/gloda/test/unit/test_gloda_content_local.js
mailnews/db/gloda/test/unit/test_index_addressbook.js
mailnews/db/gloda/test/unit/test_index_bad_messages.js
mailnews/db/gloda/test/unit/test_index_compaction.js
mailnews/db/gloda/test/unit/test_index_junk_imap_offline.js
mailnews/db/gloda/test/unit/test_index_junk_imap_online.js
mailnews/db/gloda/test/unit/test_index_junk_local.js
mailnews/db/gloda/test/unit/test_index_messages_imap_offline.js
mailnews/db/gloda/test/unit/test_index_messages_imap_online.js
mailnews/db/gloda/test/unit/test_index_messages_imap_online_to_offline.js
mailnews/db/gloda/test/unit/test_index_messages_local.js
mailnews/db/gloda/test/unit/test_index_sweep_folder.js
mailnews/db/gloda/test/unit/test_intl.js
mailnews/db/gloda/test/unit/test_migration.js
mailnews/db/gloda/test/unit/test_mime_attachments_size.js
mailnews/db/gloda/test/unit/test_mime_emitter.js
mailnews/db/gloda/test/unit/test_msg_search.js
mailnews/db/gloda/test/unit/test_noun_mimetype.js
mailnews/db/gloda/test/unit/test_nuke_migration.js
mailnews/db/gloda/test/unit/test_query_core.js
mailnews/db/gloda/test/unit/test_query_messages_imap_offline.js
mailnews/db/gloda/test/unit/test_query_messages_imap_online.js
mailnews/db/gloda/test/unit/test_query_messages_imap_online_to_offline.js
mailnews/db/gloda/test/unit/test_query_messages_local.js
mailnews/db/gloda/test/unit/test_smime_mimemsg_representation.js
mailnews/db/gloda/test/unit/test_startup_offline.js
mailnews/db/msgdb/test/unit/head_maildb.js
mailnews/db/msgdb/test/unit/test_enumerator_cleanup.js
mailnews/db/msgdb/test/unit/test_filter_enumerator.js
mailnews/db/msgdb/test/unit/test_maildb.js
mailnews/db/msgdb/test/unit/test_propertyEnumerator.js
mailnews/db/msgdb/test/unit/test_references_parsing.js
mailnews/extensions/bayesian-spam-filter/test/unit/head_bayes.js
mailnews/extensions/bayesian-spam-filter/test/unit/resources/trainingfile.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_bug228675.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_customTokenization.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_junkAsTraits.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_msgCorpus.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_traitAliases.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_traits.js
mailnews/extensions/dsn/content/am-dsn.js
mailnews/extensions/dsn/src/dsn-service.js
mailnews/extensions/mdn/content/am-mdn.js
mailnews/extensions/mdn/src/mdn-service.js
mailnews/extensions/mdn/test/unit/head_mdn.js
mailnews/extensions/mdn/test/unit/test_askuser.js
mailnews/extensions/mdn/test/unit/test_mdnFlags.js
mailnews/extensions/newsblog/content/Feed.js
mailnews/extensions/newsblog/content/FeedItem.js
mailnews/extensions/newsblog/content/FeedUtils.jsm
mailnews/extensions/newsblog/content/am-newsblog.js
mailnews/extensions/newsblog/content/feed-parser.js
mailnews/extensions/newsblog/content/feed-subscriptions.js
mailnews/extensions/newsblog/content/feedAccountWizard.js
mailnews/extensions/newsblog/content/newsblogOverlay.js
mailnews/extensions/newsblog/js/newsblog.js
mailnews/extensions/newsblog/test/unit/head_feeds.js
mailnews/extensions/newsblog/test/unit/test_feedparser.js
mailnews/extensions/offline-startup/js/offlineStartup.js
mailnews/extensions/smime/content/am-smime.js
mailnews/extensions/smime/content/certFetchingStatus.js
mailnews/extensions/smime/content/msgCompSecurityInfo.js
mailnews/extensions/smime/content/msgReadSMIMEOverlay.js
mailnews/extensions/smime/content/msgReadSecurityInfo.js
mailnews/extensions/smime/src/smime-service.js
mailnews/imap/test/unit/head_imap_maildir.js
mailnews/imap/test/unit/head_server.js
mailnews/imap/test/unit/test_autosync_date_constraints.js
mailnews/imap/test/unit/test_bccProperty.js
mailnews/imap/test/unit/test_bug460636.js
mailnews/imap/test/unit/test_cacheParts.js
mailnews/imap/test/unit/test_chunkLastLF.js
mailnews/imap/test/unit/test_compactOfflineStore.js
mailnews/imap/test/unit/test_converterImap.js
mailnews/imap/test/unit/test_copyThenMove.js
mailnews/imap/test/unit/test_customCommandReturnsFetchResponse.js
mailnews/imap/test/unit/test_dod.js
mailnews/imap/test/unit/test_dontStatNoSelect.js
mailnews/imap/test/unit/test_downloadOffline.js
mailnews/imap/test/unit/test_fetchCustomAttribute.js
mailnews/imap/test/unit/test_filterCustomHeaders.js
mailnews/imap/test/unit/test_filterNeedsBody.js
mailnews/imap/test/unit/test_folderOfflineFlags.js
mailnews/imap/test/unit/test_gmailAttributes.js
mailnews/imap/test/unit/test_gmailOfflineMsgStore.js
mailnews/imap/test/unit/test_imapAttachmentSaves.js
mailnews/imap/test/unit/test_imapAuthMethods.js
mailnews/imap/test/unit/test_imapAutoSync.js
mailnews/imap/test/unit/test_imapChunks.js
mailnews/imap/test/unit/test_imapContentLength.js
mailnews/imap/test/unit/test_imapCopyTimeout.js
mailnews/imap/test/unit/test_imapFilterActions.js
mailnews/imap/test/unit/test_imapFilterActionsPostplugin.js
mailnews/imap/test/unit/test_imapFlagChange.js
mailnews/imap/test/unit/test_imapFolderCopy.js
mailnews/imap/test/unit/test_imapHdrChunking.js
mailnews/imap/test/unit/test_imapHdrStreaming.js
mailnews/imap/test/unit/test_imapHighWater.js
mailnews/imap/test/unit/test_imapID.js
mailnews/imap/test/unit/test_imapMove.js
mailnews/imap/test/unit/test_imapPasswordFailure.js
mailnews/imap/test/unit/test_imapProtocols.js
mailnews/imap/test/unit/test_imapProxy.js
mailnews/imap/test/unit/test_imapRename.js
mailnews/imap/test/unit/test_imapSearch.js
mailnews/imap/test/unit/test_imapStatusCloseDBs.js
mailnews/imap/test/unit/test_imapStoreMsgOffline.js
mailnews/imap/test/unit/test_imapUndo.js
mailnews/imap/test/unit/test_imapUrls.js
mailnews/imap/test/unit/test_largeOfflineStore.js
mailnews/imap/test/unit/test_listClosesDB.js
mailnews/imap/test/unit/test_listSubscribed.js
mailnews/imap/test/unit/test_localToImapFilter.js
mailnews/imap/test/unit/test_localToImapFilterQuarantine.js
mailnews/imap/test/unit/test_lsub.js
mailnews/imap/test/unit/test_mailboxes.js
mailnews/imap/test/unit/test_nsIMsgFolderListenerIMAP.js
mailnews/imap/test/unit/test_offlineCopy.js
mailnews/imap/test/unit/test_offlineDraftDataloss.js
mailnews/imap/test/unit/test_offlinePlayback.js
mailnews/imap/test/unit/test_offlineStoreLocking.js
mailnews/imap/test/unit/test_partsOnDemand.js
mailnews/imap/test/unit/test_preserveDataOnMove.js
mailnews/imap/test/unit/test_saveImapDraft.js
mailnews/imap/test/unit/test_saveTemplate.js
mailnews/imap/test/unit/test_starttlsFailure.js
mailnews/imap/test/unit/test_stopMovingToLocalFolder.js
mailnews/imap/test/unit/test_subfolderLocation.js
mailnews/imap/test/unit/test_syncChanges.js
mailnews/imap/test/unit/test_trustSpamAssassin.js
mailnews/import/content/fieldMapImport.js
mailnews/import/content/importDialog.js
mailnews/import/test/unit/head_import.js
mailnews/import/test/unit/resources/TestMailImporter.js
mailnews/import/test/unit/resources/import_helper.js
mailnews/import/test/unit/resources/mock_windows_reg_factory.js
mailnews/import/test/unit/test_becky_addressbook.js
mailnews/import/test/unit/test_becky_filters.js
mailnews/import/test/unit/test_bug_263304.js
mailnews/import/test/unit/test_bug_437556.js
mailnews/import/test/unit/test_csv_GetSample.js
mailnews/import/test/unit/test_csv_import.js
mailnews/import/test/unit/test_csv_import_quote.js
mailnews/import/test/unit/test_ldif_import.js
mailnews/import/test/unit/test_outlook_settings.js
mailnews/import/test/unit/test_shiftjis_csv.js
mailnews/import/test/unit/test_utf16_csv.js
mailnews/import/test/unit/test_vcard_import.js
mailnews/import/test/unit/test_winmail.js
mailnews/intl/test/unit/head_CharsetConversionTests.js
mailnews/intl/test/unit/test_decode_utf-7.js
mailnews/intl/test/unit/test_decode_utf-7_internal.js
mailnews/intl/test/unit/test_encode_utf-7.js
mailnews/intl/test/unit/test_encode_utf-7_internal.js
mailnews/jsaccount/modules/JSAccountUtils.jsm
mailnews/jsaccount/modules/JaBaseUrl.jsm
mailnews/jsaccount/test/unit/head_jsaccount.js
mailnews/jsaccount/test/unit/resources/testJaBaseIncomingServer.jsm
mailnews/jsaccount/test/unit/resources/testJaBaseIncomingServerComponent.js
mailnews/jsaccount/test/unit/resources/testJaBaseMsgFolder.jsm
mailnews/jsaccount/test/unit/resources/testJaBaseMsgFolderComponent.js
mailnews/jsaccount/test/unit/resources/testJaFooUrlComponent.js
mailnews/jsaccount/test/unit/resources/testJaMsgProtocolInfoComponent.js
mailnews/jsaccount/test/unit/test_componentsExist.js
mailnews/jsaccount/test/unit/test_fooUrl.js
mailnews/jsaccount/test/unit/test_jaMsgFolder.js
mailnews/local/test/unit/head_maillocal.js
mailnews/local/test/unit/test_bug457168.js
mailnews/local/test/unit/test_duplicateKey.js
mailnews/local/test/unit/test_fileName.js
mailnews/local/test/unit/test_folderLoaded.js
mailnews/local/test/unit/test_localFolder.js
mailnews/local/test/unit/test_mailboxContentLength.js
mailnews/local/test/unit/test_mailboxProtocol.js
mailnews/local/test/unit/test_mailboxURL.js
mailnews/local/test/unit/test_movemailDownload.js
mailnews/local/test/unit/test_msgCopy.js
mailnews/local/test/unit/test_msgIDParsing.js
mailnews/local/test/unit/test_nsIMsgLocalMailFolder.js
mailnews/local/test/unit/test_nsIMsgParseMailMsgState.js
mailnews/local/test/unit/test_nsIMsgPluggableStore.js
mailnews/local/test/unit/test_over2GBMailboxes.js
mailnews/local/test/unit/test_over4GBMailboxes.js
mailnews/local/test/unit/test_pop3AuthMethods.js
mailnews/local/test/unit/test_pop3Download.js
mailnews/local/test/unit/test_pop3DownloadTempFileHandling.js
mailnews/local/test/unit/test_pop3Duplicates.js
mailnews/local/test/unit/test_pop3FilterActions.js
mailnews/local/test/unit/test_pop3GSSAPIFail.js
mailnews/local/test/unit/test_pop3GetNewMail.js
mailnews/local/test/unit/test_pop3MoveFilter.js
mailnews/local/test/unit/test_pop3MoveFilter2.js
mailnews/local/test/unit/test_pop3MultiCopy.js
mailnews/local/test/unit/test_pop3MultiCopy2.js
mailnews/local/test/unit/test_pop3Password.js
mailnews/local/test/unit/test_pop3Password2.js
mailnews/local/test/unit/test_pop3Password3.js
mailnews/local/test/unit/test_pop3PasswordFailure.js
mailnews/local/test/unit/test_pop3PasswordFailure2.js
mailnews/local/test/unit/test_pop3PasswordFailure3.js
mailnews/local/test/unit/test_pop3Proxy.js
mailnews/local/test/unit/test_pop3Pump.js
mailnews/local/test/unit/test_pop3ServerBrokenCRAMDisconnect.js
mailnews/local/test/unit/test_pop3ServerBrokenCRAMFail.js
mailnews/local/test/unit/test_preview.js
mailnews/local/test/unit/test_saveMessage.js
mailnews/local/test/unit/test_streamHeaders.js
mailnews/local/test/unit/test_undoDelete.js
mailnews/local/test/unit/test_verifyLogon.js
mailnews/mapi/test/unit/head_mapi.js
mailnews/mapi/test/unit/test_mapisendmail.js
mailnews/mime/jsmime/jsmime.js
mailnews/mime/jsmime/test/head_xpcshell_glue.js
mailnews/mime/jsmime/test/mock_date.js
mailnews/mime/jsmime/test/test_custom_headers.js
mailnews/mime/jsmime/test/test_header.js
mailnews/mime/jsmime/test/test_header_emitter.js
mailnews/mime/jsmime/test/test_mime_tree.js
mailnews/mime/jsmime/test/test_structured_header_emitters.js
mailnews/mime/jsmime/test/test_structured_headers.js
mailnews/mime/src/jsmime.jsm
mailnews/mime/src/mimeJSComponents.js
mailnews/mime/src/mimeParser.jsm
mailnews/mime/test/unit/head_mime.js
mailnews/mime/test/unit/test_EncodeMimePartIIStr_UTF8.js
mailnews/mime/test/unit/test_alternate_p7m_handling.js
mailnews/mime/test/unit/test_attachment_size.js
mailnews/mime/test/unit/test_badContentType.js
mailnews/mime/test/unit/test_bug493544.js
mailnews/mime/test/unit/test_hidden_attachments.js
mailnews/mime/test/unit/test_jsmime_charset.js
mailnews/mime/test/unit/test_message_attachment.js
mailnews/mime/test/unit/test_mimeContentType.js
mailnews/mime/test/unit/test_mimeStreaming.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser1.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser2.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser3.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser4.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser5.js
mailnews/mime/test/unit/test_parseHeadersWithArray.js
mailnews/mime/test/unit/test_parser.js
mailnews/mime/test/unit/test_rfc822_body.js
mailnews/mime/test/unit/test_smime_decrypt.js
mailnews/mime/test/unit/test_structured_headers.js
mailnews/mime/test/unit/test_text_attachment.js
mailnews/news/content/downloadheaders.js
mailnews/news/src/nsNewsAutoCompleteSearch.js
mailnews/news/test/unit/head_server_setup.js
mailnews/news/test/unit/test_biff.js
mailnews/news/test/unit/test_bug37465.js
mailnews/news/test/unit/test_bug403242.js
mailnews/news/test/unit/test_bug540288.js
mailnews/news/test/unit/test_bug695309.js
mailnews/news/test/unit/test_filter.js
mailnews/news/test/unit/test_getNewsMessage.js
mailnews/news/test/unit/test_internalUris.js
mailnews/news/test/unit/test_newsAutocomplete.js
mailnews/news/test/unit/test_nntpContentLength.js
mailnews/news/test/unit/test_nntpGroupPassword.js
mailnews/news/test/unit/test_nntpPassword.js
mailnews/news/test/unit/test_nntpPassword2.js
mailnews/news/test/unit/test_nntpPassword3.js
mailnews/news/test/unit/test_nntpPasswordFailure.js
mailnews/news/test/unit/test_nntpPost.js
mailnews/news/test/unit/test_nntpProtocols.js
mailnews/news/test/unit/test_nntpProxy.js
mailnews/news/test/unit/test_nntpUrl.js
mailnews/news/test/unit/test_server.js
mailnews/news/test/unit/test_uriParser.js
mailnews/test/fakeserver/auth.js
mailnews/test/fakeserver/imapd.js
mailnews/test/fakeserver/maild.js
mailnews/test/fakeserver/nntpd.js
mailnews/test/fakeserver/pop3d.js
mailnews/test/fakeserver/smtpd.js
mailnews/test/resources/IMAPpump.js
mailnews/test/resources/MockFactory.js
mailnews/test/resources/NetworkTestUtils.jsm
mailnews/test/resources/POP3pump.js
mailnews/test/resources/PromiseTestUtils.jsm
mailnews/test/resources/abSetup.js
mailnews/test/resources/alertTestUtils.js
mailnews/test/resources/asyncTestUtils.js
mailnews/test/resources/filterTestUtils.js
mailnews/test/resources/folderEventLogHelper.js
mailnews/test/resources/localAccountUtils.js
mailnews/test/resources/logHelper.js
mailnews/test/resources/mailShutdown.js
mailnews/test/resources/mailTestUtils.js
mailnews/test/resources/messageGenerator.js
mailnews/test/resources/messageInjection.js
mailnews/test/resources/messageModifier.js
mailnews/test/resources/msgFolderListenerSetup.js
mailnews/test/resources/passwordStorage.js
mailnews/test/resources/searchTestUtils.js
mailnews/test/resources/smimeUtils.jsm
--- a/.prettierignore
+++ b/.prettierignore
@@ -5,11 +5,10 @@
 *.html
 *.xhtml
 *.xul
 *.xml
 
 # Ignore .eslintrc.js for now.
 .eslintrc.js
 
-# Ignore all top-level directories that contain JS files (for now).
-mailnews/**
+# Ignore SeaMonkey files.
 suite/**
--- a/mailnews/addrbook/content/abAddressBookNameDialog.js
+++ b/mailnews/addrbook/content/abAddressBookNameDialog.js
@@ -1,17 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
-var {
-  fixIterator,
-} = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
+var { fixIterator } = ChromeUtils.import(
+  "resource:///modules/iteratorUtils.jsm"
+);
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gOkButton;
 var gNameInput;
 var gDirectory = null;
 
 var kPersonalAddressbookURI = "moz-abmdbdirectory://abook.mab";
 var kCollectedAddressbookURI = "moz-abmdbdirectory://history.mab";
 var kAllDirectoryRoot = "moz-abdirectory://";
@@ -20,70 +22,84 @@ var kPABDirectory = 2; // defined in nsD
 document.addEventListener("dialogaccept", abNameOKButton);
 
 function abNameOnLoad() {
   // Get the document elements.
   gOkButton = document.documentElement.getButton("accept");
   gNameInput = document.getElementById("name");
 
   // look in arguments[0] for parameters to see if we have a directory or not
-  if ("arguments" in window && window.arguments[0] &&
-      "selectedDirectory" in window.arguments[0]) {
+  if (
+    "arguments" in window &&
+    window.arguments[0] &&
+    "selectedDirectory" in window.arguments[0]
+  ) {
     gDirectory = window.arguments[0].selectedDirectory;
     gNameInput.value = gDirectory.dirName;
   }
 
   // Work out the window title (if we have a directory specified, then it's a
   // rename).
   var bundle = document.getElementById("bundle_addressBook");
 
   if (gDirectory) {
     let oldListName = gDirectory.dirName;
-    document.title = bundle.getFormattedString("addressBookTitleEdit", [oldListName]);
+    document.title = bundle.getFormattedString("addressBookTitleEdit", [
+      oldListName,
+    ]);
   } else {
     document.title = bundle.getString("addressBookTitleNew");
   }
 
-  if (gDirectory &&
-     (gDirectory.URI == kCollectedAddressbookURI ||
-       gDirectory.URI == kPersonalAddressbookURI ||
-       gDirectory.URI == kAllDirectoryRoot + "?")) {
+  if (
+    gDirectory &&
+    (gDirectory.URI == kCollectedAddressbookURI ||
+      gDirectory.URI == kPersonalAddressbookURI ||
+      gDirectory.URI == kAllDirectoryRoot + "?")
+  ) {
     // Address book name is not editable, therefore disable the field and
     // only have an ok button that doesn't do anything.
     gNameInput.readOnly = true;
     document.documentElement.buttons = "accept";
     document.documentElement.removeAttribute("ondialogaccept");
   } else {
     gNameInput.focus();
     abNameDoOkEnabling();
   }
 }
 
 function abNameOKButton(event) {
   var newName = gNameInput.value.trim();
 
   // Do not allow an already existing name.
-  for (let ab of fixIterator(MailServices.ab.directories,
-                             Ci.nsIAbDirectory)) {
-    if ((ab.dirName.toLowerCase() == newName.toLowerCase()) &&
-        (!gDirectory || (ab.URI != gDirectory.URI))) {
-      const kAlertTitle = document.getElementById("bundle_addressBook")
-                                  .getString("duplicateNameTitle");
-      const kAlertText = document.getElementById("bundle_addressBook")
-                                 .getFormattedString("duplicateNameText", [ab.dirName]);
+  for (let ab of fixIterator(MailServices.ab.directories, Ci.nsIAbDirectory)) {
+    if (
+      ab.dirName.toLowerCase() == newName.toLowerCase() &&
+      (!gDirectory || ab.URI != gDirectory.URI)
+    ) {
+      const kAlertTitle = document
+        .getElementById("bundle_addressBook")
+        .getString("duplicateNameTitle");
+      const kAlertText = document
+        .getElementById("bundle_addressBook")
+        .getFormattedString("duplicateNameText", [ab.dirName]);
       Services.prompt.alert(window, kAlertTitle, kAlertText);
       event.preventDefault();
       return;
     }
   }
 
   // Either create a new directory or update an existing one depending on what
   // we were given when we started.
-  if (gDirectory)
+  if (gDirectory) {
     gDirectory.dirName = newName;
-  else
-    MailServices.ab.newAddressBook(newName, "",
-      Services.prefs.getIntPref("mail.addr_book.newDirType", kPABDirectory));
+  } else {
+    MailServices.ab.newAddressBook(
+      newName,
+      "",
+      Services.prefs.getIntPref("mail.addr_book.newDirType", kPABDirectory)
+    );
+  }
 }
 
 function abNameDoOkEnabling() {
   gOkButton.disabled = gNameInput.value.trim() == "";
 }
--- a/mailnews/addrbook/content/abDragDrop.js
+++ b/mailnews/addrbook/content/abDragDrop.js
@@ -3,108 +3,137 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* import-globals-from ../../../mail/base/content/nsDragAndDrop.js */
 /* import-globals-from ../../../mail/components/addrbook/content/abCommon.js */
 /* import-globals-from ../../../mail/components/compose/content/addressingWidgetOverlay.js */
 /* import-globals-from abResultsPane.js */
 
-var {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+var { PluralForm } = ChromeUtils.import(
+  "resource://gre/modules/PluralForm.jsm"
+);
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
 
 // Returns the load context for the current window
 function getLoadContext() {
   return window.docShell.QueryInterface(Ci.nsILoadContext);
 }
 
 var abFlavorDataProvider = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsIFlavorDataProvider]),
 
   getFlavorData(aTransferable, aFlavor, aData, aDataLen) {
     if (aFlavor == "application/x-moz-file-promise") {
       var primitive = {};
       aTransferable.getTransferData("text/vcard", primitive, {});
       var vCard = primitive.value.QueryInterface(Ci.nsISupportsString).data;
-      aTransferable.getTransferData("application/x-moz-file-promise-dest-filename", primitive, {});
+      aTransferable.getTransferData(
+        "application/x-moz-file-promise-dest-filename",
+        primitive,
+        {}
+      );
       var leafName = primitive.value.QueryInterface(Ci.nsISupportsString).data;
-      aTransferable.getTransferData("application/x-moz-file-promise-dir", primitive, {});
+      aTransferable.getTransferData(
+        "application/x-moz-file-promise-dir",
+        primitive,
+        {}
+      );
       var localFile = primitive.value.QueryInterface(Ci.nsIFile).clone();
       localFile.append(leafName);
 
-      var ofStream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream);
+      var ofStream = Cc[
+        "@mozilla.org/network/file-output-stream;1"
+      ].createInstance(Ci.nsIFileOutputStream);
       ofStream.init(localFile, -1, -1, 0);
-      var converter = Cc["@mozilla.org/intl/converter-output-stream;1"].createInstance(Ci.nsIConverterOutputStream);
+      var converter = Cc[
+        "@mozilla.org/intl/converter-output-stream;1"
+      ].createInstance(Ci.nsIConverterOutputStream);
       converter.init(ofStream, null);
       converter.writeString(vCard);
       converter.close();
 
       aData.value = localFile;
     }
   },
 };
 
 var abResultsPaneObserver = {
   onDragStart(aEvent, aXferData, aDragAction) {
     var selectedRows = GetSelectedRows();
 
-    if (!selectedRows)
+    if (!selectedRows) {
       return;
+    }
 
     var selectedAddresses = GetSelectedAddresses();
 
     aXferData.data = new TransferData();
     aXferData.data.addDataForFlavour("moz/abcard", selectedRows);
     aXferData.data.addDataForFlavour("text/x-moz-address", selectedAddresses);
     aXferData.data.addDataForFlavour("text/unicode", selectedAddresses);
 
     let srcDirectory = getSelectedDirectory();
     // The default allowable actions are copy, move and link, so we need
     // to restrict them here.
-    if (!srcDirectory.readOnly)
+    if (!srcDirectory.readOnly) {
       // Only allow copy & move from read-write directories.
-      aDragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_COPY |
-                           Ci.nsIDragService.DRAGDROP_ACTION_MOVE;
-    else
-      // Only allow copy from read-only directories.
+      aDragAction.action =
+        Ci.nsIDragService.DRAGDROP_ACTION_COPY |
+        Ci.nsIDragService.DRAGDROP_ACTION_MOVE;
+    }
+    // Only allow copy from read-only directories.
+    else {
       aDragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_COPY;
+    }
 
     var card = GetSelectedCard();
     if (card && card.displayName) {
       try {
         // A card implementation may throw NS_ERROR_NOT_IMPLEMENTED.
         // Don't break drag-and-drop if that happens.
         let vCard = card.translateTo("vcard");
-        aXferData.data.addDataForFlavour("text/vcard", decodeURIComponent(vCard));
-        aXferData.data.addDataForFlavour("application/x-moz-file-promise-dest-filename", card.displayName + ".vcf");
-        aXferData.data.addDataForFlavour("application/x-moz-file-promise-url", "data:text/vcard," + vCard);
-        aXferData.data.addDataForFlavour("application/x-moz-file-promise", abFlavorDataProvider);
+        aXferData.data.addDataForFlavour(
+          "text/vcard",
+          decodeURIComponent(vCard)
+        );
+        aXferData.data.addDataForFlavour(
+          "application/x-moz-file-promise-dest-filename",
+          card.displayName + ".vcf"
+        );
+        aXferData.data.addDataForFlavour(
+          "application/x-moz-file-promise-url",
+          "data:text/vcard," + vCard
+        );
+        aXferData.data.addDataForFlavour(
+          "application/x-moz-file-promise",
+          abFlavorDataProvider
+        );
       } catch (ex) {
         Cu.reportError(ex);
       }
     }
   },
 
-  onDrop(aEvent, aXferData, aDragSession) {
-  },
+  onDrop(aEvent, aXferData, aDragSession) {},
 
-  onDragExit(aEvent, aDragSession) {
-  },
+  onDragExit(aEvent, aDragSession) {},
 
-  onDragOver(aEvent, aFlavour, aDragSession) {
-  },
+  onDragOver(aEvent, aFlavour, aDragSession) {},
 
   getSupportedFlavours() {
     return null;
   },
 };
 
-
-var dragService = Cc["@mozilla.org/widget/dragservice;1"]
-                    .getService(Ci.nsIDragService);
+var dragService = Cc["@mozilla.org/widget/dragservice;1"].getService(
+  Ci.nsIDragService
+);
 
 var abDirTreeObserver = {
   /**
    * canDrop - determine if the tree will accept the dropping of a item
    * onto it.
    *
    * Note 1: We don't allow duplicate mailing list names, therefore copy
    * is not allowed for mailing lists.
@@ -123,113 +152,130 @@ var abDirTreeObserver = {
    *   mailing list      -> different address book = MOVE only
    *   (lists currently need to have unique names)
    *   card in mailing list -> parent mailing list = Not allowed
    *   card in mailing list -> other mailing list  = MOVE or COPY
    *   card in mailing list -> other address book  = MOVE or COPY
    *   read only directory item -> anywhere        = COPY only
    */
   canDrop(index, orientation, dataTransfer) {
-    if (orientation != Ci.nsITreeView.DROP_ON)
+    if (orientation != Ci.nsITreeView.DROP_ON) {
       return false;
+    }
     if (!dataTransfer.types.includes("moz/abcard")) {
       return false;
     }
 
     let targetURI = gDirectoryTreeView.getDirectoryAtIndex(index).URI;
 
     let srcURI = getSelectedDirectoryURI();
 
     // We cannot allow copy/move to "All Address Books".
-    if (targetURI == kAllDirectoryRoot + "?")
+    if (targetURI == kAllDirectoryRoot + "?") {
       return false;
+    }
 
     // The same place case
-    if (targetURI == srcURI)
+    if (targetURI == srcURI) {
       return false;
+    }
 
     // determine if we dragging from a mailing list on a directory x to the parent (directory x).
     // if so, don't allow the drop
-    if (srcURI.startsWith(targetURI))
+    if (srcURI.startsWith(targetURI)) {
       return false;
+    }
 
     // check if we can write to the target directory
     // e.g. LDAP is readonly currently
     var targetDirectory = GetDirectoryFromURI(targetURI);
 
-    if (targetDirectory.readOnly)
+    if (targetDirectory.readOnly) {
       return false;
+    }
 
     var dragSession = dragService.getCurrentSession();
-    if (!dragSession)
+    if (!dragSession) {
       return false;
+    }
 
     // XXX Due to bug 373125/bug 349044 we can't specify a default action,
     // so we default to move and this means that the user would have to press
     // ctrl to copy which most users don't realize.
     //
     // If target directory is a mailing list, then only allow copies.
     //    if (targetDirectory.isMailList &&
     //   dragSession.dragAction != Ci.nsIDragService.DRAGDROP_ACTION_COPY)
     // return false;
 
     var srcDirectory = GetDirectoryFromURI(srcURI);
 
     // Only allow copy from read-only directories.
-    if (srcDirectory.readOnly &&
-        dragSession.dragAction != Ci.nsIDragService.DRAGDROP_ACTION_COPY) {
+    if (
+      srcDirectory.readOnly &&
+      dragSession.dragAction != Ci.nsIDragService.DRAGDROP_ACTION_COPY
+    ) {
       return false;
     }
 
     // Go through the cards checking to see if one of them is a mailing list
     // (if we are attempting a copy) - we can't copy mailing lists as
     // that would give us duplicate names which isn't allowed at the
     // moment.
     var draggingMailList = false;
 
     // The data contains the a string of "selected rows", eg.: "1,2".
-    var rows = dataTransfer.getData("moz/abcard").split(",").map(j => parseInt(j, 10));
+    var rows = dataTransfer
+      .getData("moz/abcard")
+      .split(",")
+      .map(j => parseInt(j, 10));
 
     for (var j = 0; j < rows.length; j++) {
       if (gAbView.getCardFromRow(rows[j]).isMailList) {
         draggingMailList = true;
         break;
       }
     }
 
     // The rest of the cases - allow cards for copy or move, but only allow
     // move of mailing lists if we're not going into another mailing list.
-    if (draggingMailList &&
-        (targetDirectory.isMailList ||
-         dragSession.dragAction == Ci.nsIDragService.DRAGDROP_ACTION_COPY)) {
+    if (
+      draggingMailList &&
+      (targetDirectory.isMailList ||
+        dragSession.dragAction == Ci.nsIDragService.DRAGDROP_ACTION_COPY)
+    ) {
       return false;
     }
 
     dragSession.canDrop = true;
     return true;
   },
 
   /**
    * onDrop - we don't need to check again for correctness as the
    * tree view calls canDrop just before calling onDrop.
    *
    */
   onDrop(index, orientation, dataTransfer) {
     var dragSession = dragService.getCurrentSession();
-    if (!dragSession)
+    if (!dragSession) {
       return;
+    }
     if (!dataTransfer.types.includes("moz/abcard")) {
       return;
     }
 
     let targetURI = gDirectoryTreeView.getDirectoryAtIndex(index).URI;
     let srcURI = getSelectedDirectoryURI();
 
     // The data contains the a string of "selected rows", eg.: "1,2".
-    var rows = dataTransfer.getData("moz/abcard").split(",").map(j => parseInt(j, 10));
+    var rows = dataTransfer
+      .getData("moz/abcard")
+      .split(",")
+      .map(j => parseInt(j, 10));
     var numrows = rows.length;
 
     var result;
     // needToCopyCard is used for whether or not we should be creating
     // copies of the cards in a mailing list in a different address book
     // - it's not for if we are moving or not.
     var needToCopyCard = true;
     if (srcURI.length > targetURI.length) {
@@ -246,109 +292,117 @@ var abDirTreeObserver = {
       }
     }
 
     // if we still think we have to copy the card,
     // check if srcURI and targetURI are mailing lists on same directory
     // if so, we don't have to copy the card
     if (needToCopyCard) {
       var targetParentURI = GetParentDirectoryFromMailingListURI(targetURI);
-      if (targetParentURI && (targetParentURI == GetParentDirectoryFromMailingListURI(srcURI)))
+      if (
+        targetParentURI &&
+        targetParentURI == GetParentDirectoryFromMailingListURI(srcURI)
+      ) {
         needToCopyCard = false;
+      }
     }
 
     var directory = GetDirectoryFromURI(targetURI);
 
     // Only move if we are not transferring to a mail list
-    var actionIsMoving = (dragSession.dragAction & dragSession.DRAGDROP_ACTION_MOVE) && !directory.isMailList;
+    var actionIsMoving =
+      dragSession.dragAction & dragSession.DRAGDROP_ACTION_MOVE &&
+      !directory.isMailList;
 
     let cardsToCopy = [];
     for (let j = 0; j < numrows; j++) {
       cardsToCopy.push(gAbView.getCardFromRow(rows[j]));
     }
     for (let card of cardsToCopy) {
       if (card.isMailList) {
         // This check ensures we haven't slipped through by mistake
         if (needToCopyCard && actionIsMoving) {
           directory.addMailList(GetDirectoryFromURI(card.mailListURI));
         }
       } else {
         let srcDirectory = null;
-        if (srcURI == (kAllDirectoryRoot + "?") && actionIsMoving) {
-          let dirId = card.directoryId.substring(0, card.directoryId.indexOf("&"));
+        if (srcURI == kAllDirectoryRoot + "?" && actionIsMoving) {
+          let dirId = card.directoryId.substring(
+            0,
+            card.directoryId.indexOf("&")
+          );
           srcDirectory = MailServices.ab.getDirectoryFromId(dirId);
         }
 
         directory.dropCard(card, needToCopyCard);
 
         // This is true only if srcURI is "All ABs" and action is moving.
         if (srcDirectory) {
-          let cardArray =
-            Cc["@mozilla.org/array;1"]
-              .createInstance(Ci.nsIMutableArray);
+          let cardArray = Cc["@mozilla.org/array;1"].createInstance(
+            Ci.nsIMutableArray
+          );
           cardArray.appendElement(card);
           srcDirectory.deleteCards(cardArray);
         }
       }
     }
 
     var cardsTransferredText;
 
     // If we are moving, but not moving to a directory, then delete the
     // selected cards and display the appropriate text
-    if (actionIsMoving && srcURI != (kAllDirectoryRoot + "?")) {
+    if (actionIsMoving && srcURI != kAllDirectoryRoot + "?") {
       // If we have moved the cards, then delete them as well.
       gAbView.deleteSelectedCards();
     }
 
     if (actionIsMoving) {
-      cardsTransferredText = PluralForm.get(numrows,
-        gAddressBookBundle.getFormattedString("contactsMoved", [numrows]));
+      cardsTransferredText = PluralForm.get(
+        numrows,
+        gAddressBookBundle.getFormattedString("contactsMoved", [numrows])
+      );
     } else {
-      cardsTransferredText = PluralForm.get(numrows,
-        gAddressBookBundle.getFormattedString("contactsCopied", [numrows]));
+      cardsTransferredText = PluralForm.get(
+        numrows,
+        gAddressBookBundle.getFormattedString("contactsCopied", [numrows])
+      );
     }
 
     if (srcURI == kAllDirectoryRoot + "?") {
       SetAbView(srcURI);
     }
 
     document.getElementById("statusText").label = cardsTransferredText;
   },
 
-  onToggleOpenState() {
-  },
+  onToggleOpenState() {},
 
-  onCycleHeader(colID, elt) {
-  },
+  onCycleHeader(colID, elt) {},
 
-  onCycleCell(row, colID) {
-  },
+  onCycleCell(row, colID) {},
 
-  onSelectionChanged() {
-  },
+  onSelectionChanged() {},
 
-  onPerformAction(action) {
-  },
+  onPerformAction(action) {},
 
-  onPerformActionOnRow(action, row) {
-  },
+  onPerformActionOnRow(action, row) {},
 
-  onPerformActionOnCell(action, row, colID) {
-  },
+  onPerformActionOnCell(action, row, colID) {},
 };
 
 function DragAddressOverTargetControl(event) {
   var dragSession = gDragService.getCurrentSession();
 
-  if (!dragSession.isDataFlavorSupported("text/x-moz-address"))
-     return;
+  if (!dragSession.isDataFlavorSupported("text/x-moz-address")) {
+    return;
+  }
 
-  var trans = Cc["@mozilla.org/widget/transferable;1"]
-                .createInstance(Ci.nsITransferable);
+  var trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(
+    Ci.nsITransferable
+  );
   trans.init(getLoadContext());
   trans.addDataFlavor("text/x-moz-address");
 
   var canDrop = true;
 
   for (var i = 0; i < dragSession.numDropItems; ++i) {
     dragSession.getData(trans, i);
     var dataObj = {};
@@ -362,37 +416,42 @@ function DragAddressOverTargetControl(ev
     }
   }
   dragSession.canDrop = canDrop;
 }
 
 function DropAddressOverTargetControl(event) {
   var dragSession = gDragService.getCurrentSession();
 
-  var trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
+  var trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(
+    Ci.nsITransferable
+  );
   trans.addDataFlavor("text/x-moz-address");
 
   for (var i = 0; i < dragSession.numDropItems; ++i) {
     dragSession.getData(trans, i);
     var dataObj = {};
     var bestFlavor = {};
     var len = {};
 
     // Ensure we catch any empty data that may have slipped through
     try {
       trans.getAnyTransferData(bestFlavor, dataObj, len);
     } catch (ex) {
       continue;
     }
 
-    if (dataObj)
+    if (dataObj) {
       dataObj = dataObj.value.QueryInterface(Ci.nsISupportsString);
-    if (!dataObj)
+    }
+    if (!dataObj) {
       continue;
+    }
 
     // pull the address out of the data object
     var address = dataObj.data.substring(0, len.value);
-    if (!address)
+    if (!address) {
       continue;
+    }
 
     DropRecipient(address);
   }
 }
--- a/mailnews/addrbook/content/abMailListDialog.js
+++ b/mailnews/addrbook/content/abMailListDialog.js
@@ -1,44 +1,50 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* import-globals-from ../../../mail/components/addrbook/content/abCommon.js */
 /* import-globals-from ../../../mail/components/compose/content/addressingWidgetOverlay.js */
 
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
-var {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
+var { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
 
 top.MAX_RECIPIENTS = 1;
 var inputElementType = "";
 
 var gListCard;
 var gEditList;
 var oldListName = "";
 var gLoadListeners = [];
 var gSaveListeners = [];
 
 try {
-  var gDragService = Cc["@mozilla.org/widget/dragservice;1"]
-                       .getService(Ci.nsIDragService);
-} catch (e) {
-}
+  var gDragService = Cc["@mozilla.org/widget/dragservice;1"].getService(
+    Ci.nsIDragService
+  );
+} catch (e) {}
 
 // Returns the load context for the current window
 function getLoadContext() {
   return window.docShell.QueryInterface(Ci.nsILoadContext);
 }
 
 function mailingListExists(listname) {
   if (MailServices.ab.mailListNameExists(listname)) {
-    Services.prompt.alert(window,
+    Services.prompt.alert(
+      window,
       gAddressBookBundle.getString("mailListNameExistsTitle"),
-      gAddressBookBundle.getString("mailListNameExistsMessage"));
+      gAddressBookBundle.getString("mailListNameExistsMessage")
+    );
     return true;
   }
   return false;
 }
 
 function GetListValue(mailList, doAdd) {
   var listname = document.getElementById("ListName").value.trim();
 
@@ -46,96 +52,111 @@ function GetListValue(mailList, doAdd) {
     var alertText = gAddressBookBundle.getString("emptyListName");
     alert(alertText);
     return false;
   }
 
   var canonicalNewListName = listname.toLowerCase();
   var canonicalOldListName = oldListName.toLowerCase();
   if (doAdd) {
-    if (mailingListExists(canonicalNewListName))
+    if (mailingListExists(canonicalNewListName)) {
       return false;
+    }
   } else if (canonicalOldListName != canonicalNewListName) {
-    if (mailingListExists(canonicalNewListName))
+    if (mailingListExists(canonicalNewListName)) {
       return false;
+    }
   }
 
   mailList.isMailList = true;
   mailList.dirName = listname;
   mailList.listNickName = document.getElementById("ListNickName").value;
   mailList.description = document.getElementById("ListDescription").value;
 
   var oldTotal = mailList.addressLists.length;
   var i = 1;
   var pos = 0;
   var inputField, fieldValue, cardproperty;
   while ((inputField = awGetInputElement(i))) {
     fieldValue = inputField.value;
 
-    if (doAdd || pos >= oldTotal)
-      cardproperty = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance();
-    else
+    if (doAdd || pos >= oldTotal) {
+      cardproperty = Cc[
+        "@mozilla.org/addressbook/cardproperty;1"
+      ].createInstance();
+    } else {
       cardproperty = mailList.addressLists.queryElementAt(pos, Ci.nsIAbCard);
+    }
 
     if (fieldValue == "") {
-      if (!doAdd && cardproperty)
-      try {
-        mailList.addressLists.removeElementAt(pos);
-        --oldTotal;
-      } catch (ex) {
-        // Ignore attempting to remove an item
-        // at a position greater than the number
-        // of elements in the addressLists attribute
+      if (!doAdd && cardproperty) {
+        try {
+          mailList.addressLists.removeElementAt(pos);
+          --oldTotal;
+        } catch (ex) {
+          // Ignore attempting to remove an item
+          // at a position greater than the number
+          // of elements in the addressLists attribute
+        }
       }
     } else if (cardproperty) {
       cardproperty = cardproperty.QueryInterface(Ci.nsIAbCard);
       if (cardproperty) {
-        let addrObjects = MailServices.headerParser
-                                      .makeFromDisplayAddress(fieldValue, {});
+        let addrObjects = MailServices.headerParser.makeFromDisplayAddress(
+          fieldValue,
+          {}
+        );
         for (let j = 0; j < addrObjects.length; j++) {
           if (j > 0) {
-            cardproperty = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance();
+            cardproperty = Cc[
+              "@mozilla.org/addressbook/cardproperty;1"
+            ].createInstance();
             cardproperty = cardproperty.QueryInterface(Ci.nsIAbCard);
           }
           cardproperty.primaryEmail = addrObjects[j].email;
-          cardproperty.displayName = addrObjects[j].name || addrObjects[j].email;
+          cardproperty.displayName =
+            addrObjects[j].name || addrObjects[j].email;
 
-          if (doAdd || pos >= oldTotal)
+          if (doAdd || pos >= oldTotal) {
             mailList.addressLists.appendElement(cardproperty);
+          }
         }
         pos++;
       }
     }
     i++;
   }
 
   --i;
 
   if (!doAdd && i < oldTotal) {
-    for (var j = i; j < oldTotal; j++)
+    for (var j = i; j < oldTotal; j++) {
       mailList.addressLists.removeElementAt(j);
+    }
   }
   return true;
 }
 
 function MailListOKButton(event) {
   var popup = document.getElementById("abPopup");
   if (popup) {
     var uri = popup.getAttribute("value");
 
     // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template
     // should be able to just remove this if we are not seeing blank lines in the ab popup
     if (!uri) {
       event.preventDefault();
-      return;  // don't close window
+      return; // don't close window
     }
     // -----
 
     // Add mailing list to database
-    var mailList = Cc["@mozilla.org/addressbook/directoryproperty;1"].createInstance();
+    var mailList = Cc[
+      "@mozilla.org/addressbook/directoryproperty;1"
+    ].createInstance();
     mailList = mailList.QueryInterface(Ci.nsIAbDirectory);
 
     if (GetListValue(mailList, true)) {
       var parentDirectory = GetDirectoryFromURI(uri);
       mailList = parentDirectory.addMailList(mailList);
       NotifySaveListeners(mailList);
     } else {
       event.preventDefault();
@@ -160,35 +181,43 @@ function OnLoadNewMailList() {
       } else if (directory.readOnly) {
         selectedAB = kPersonalAddressbookURI;
       } else {
         selectedAB = abURI;
       }
     }
   }
 
-  if (!selectedAB)
+  if (!selectedAB) {
     selectedAB = kPersonalAddressbookURI;
+  }
 
   // set popup with address book names
   var abPopup = document.getElementById("abPopup");
   abPopup.value = selectedAB;
 
   AppendNewRowAndSetFocus();
   awFitDummyRows(1);
 
   if (AppConstants.MOZ_APP_NAME == "seamonkey") {
     /* global awDocumentKeyPress */
     document.addEventListener("keypress", awDocumentKeyPress, true);
   }
 
   // focus on first name
   var listName = document.getElementById("ListName");
-  if (listName)
-    setTimeout(function(firstTextBox) { firstTextBox.focus(); }, 0, listName);
+  if (listName) {
+    setTimeout(
+      function(firstTextBox) {
+        firstTextBox.focus();
+      },
+      0,
+      listName
+    );
+  }
 
   NotifyLoadListeners(directory);
 }
 
 function EditListOKButton(event) {
   // edit mailing list in database
   if (GetListValue(gEditList, false)) {
     if (gListCard) {
@@ -198,62 +227,67 @@ function EditListOKButton(event) {
       gListCard.setProperty("NickName", gEditList.listNickName);
       gListCard.setProperty("Notes", gEditList.description);
     }
 
     NotifySaveListeners(gEditList);
     gEditList.editMailListToDatabase(gListCard);
 
     window.arguments[0].refresh = true;
-    return;  // close the window
+    return; // close the window
   }
 
   event.preventDefault();
 }
 
 function OnLoadEditList() {
   InitCommonJS();
 
   gListCard = window.arguments[0].abCard;
-  var listUri  = window.arguments[0].listURI;
+  var listUri = window.arguments[0].listURI;
 
   gEditList = GetDirectoryFromURI(listUri);
 
   document.getElementById("ListName").value = gEditList.dirName;
   document.getElementById("ListNickName").value = gEditList.listNickName;
   document.getElementById("ListDescription").value = gEditList.description;
   oldListName = gEditList.dirName;
 
-  document.title = gAddressBookBundle.getFormattedString("mailingListTitleEdit", [oldListName]);
+  document.title = gAddressBookBundle.getFormattedString(
+    "mailingListTitleEdit",
+    [oldListName]
+  );
 
   if (gEditList.addressLists) {
     let total = gEditList.addressLists.length;
     if (total) {
       let listbox = document.getElementById("addressingWidget");
       let newListBoxNode = listbox.cloneNode(false);
       let templateNode = listbox.querySelector("richlistitem");
 
       top.MAX_RECIPIENTS = 0;
       for (let i = 0; i < total; i++) {
         let card = gEditList.addressLists.queryElementAt(i, Ci.nsIAbCard);
-        let address = MailServices.headerParser.makeMailboxObject(
-          card.displayName, card.primaryEmail).toString();
+        let address = MailServices.headerParser
+          .makeMailboxObject(card.displayName, card.primaryEmail)
+          .toString();
         SetInputValue(address, newListBoxNode, templateNode);
       }
       listbox.parentNode.replaceChild(newListBoxNode, listbox);
     }
   }
 
   // Is this directory read-only? If so, we now need to set all the fields to
   // read-only.
   if (gEditList.readOnly) {
     const kMailListFields = ["ListName", "ListNickName", "ListDescription"];
 
-    for (let i = 0; i < kMailListFields.length; ++i)
+    for (let i = 0; i < kMailListFields.length; ++i) {
       document.getElementById(kMailListFields[i]).readOnly = true;
+    }
 
     document.documentElement.buttons = "accept";
     document.documentElement.removeAttribute("ondialogaccept");
 
     // Getting a sane read-only implementation for the addressing widget would
     // basically need a separate dialog. Given I'm not sure about the future of
     // the mailing list dialog in its current state, let's just disable it
     // completely.
@@ -273,26 +307,28 @@ function OnLoadEditList() {
 }
 
 function AppendLastRow() {
   AppendNewRowAndSetFocus();
   awFitDummyRows(1);
 
   // focus on first name
   let listName = document.getElementById("ListName");
-  if (listName)
+  if (listName) {
     listName.focus();
+  }
 }
 
 function AppendNewRowAndSetFocus() {
   let lastInput = awGetInputElement(top.MAX_RECIPIENTS);
-  if (lastInput && lastInput.value)
+  if (lastInput && lastInput.value) {
     awAppendNewRow(true);
-  else
+  } else {
     awSetFocusTo(lastInput);
+  }
 }
 
 function SetInputValue(inputValue, parentNode, templateNode) {
   top.MAX_RECIPIENTS++;
 
   var newNode = templateNode.cloneNode(true);
   parentNode.appendChild(newNode); // we need to insert the new node before we set the value of the select element!
 
@@ -305,71 +341,82 @@ function SetInputValue(inputValue, paren
     input[0].setAttribute("id", "addressCol1#" + top.MAX_RECIPIENTS);
   }
 }
 
 function awNotAnEmptyArea(event) {
   // This is temporary until i figure out how to ensure to always having an empty space after the last row
 
   var lastInput = awGetInputElement(top.MAX_RECIPIENTS);
-  if (lastInput && lastInput.value)
+  if (lastInput && lastInput.value) {
     awAppendNewRow(false);
+  }
 
   event.stopPropagation();
 }
 
 function awClickEmptySpace(target, setFocus) {
-  if (target == null || target.localName != "hbox")
+  if (target == null || target.localName != "hbox") {
     return;
+  }
 
   let lastInput = awGetInputElement(top.MAX_RECIPIENTS);
 
-  if (lastInput && lastInput.value)
+  if (lastInput && lastInput.value) {
     awAppendNewRow(setFocus);
-  else if (setFocus)
+  } else if (setFocus) {
     awSetFocusTo(lastInput);
+  }
 }
 
 function awReturnHit(inputElement) {
   let row = awGetRowByInputElement(inputElement);
   if (inputElement.value) {
     let nextInput = awGetInputElement(row + 1);
-    if (!nextInput)
+    if (!nextInput) {
       awAppendNewRow(true);
-    else
+    } else {
       awSetFocusTo(nextInput);
+    }
   }
 }
 
 function awDeleteRow(rowToDelete) {
   /* When we delete a row, we must reset the id of others row in order to not break the sequence */
   var maxRecipients = top.MAX_RECIPIENTS;
   awRemoveRow(rowToDelete);
 
   var numberOfCols = awGetNumberOfCols();
-  for (var row = rowToDelete + 1; row <= maxRecipients; row++)
-    for (var col = 1; col <= numberOfCols; col++)
-      awGetElementByCol(row, col).setAttribute("id", "addressCol" + (col) + "#" + (row - 1));
+  for (var row = rowToDelete + 1; row <= maxRecipients; row++) {
+    for (var col = 1; col <= numberOfCols; col++) {
+      awGetElementByCol(row, col).setAttribute(
+        "id",
+        "addressCol" + col + "#" + (row - 1)
+      );
+    }
+  }
 
   awTestRowSequence();
 }
 
 function awInputChanged(inputElement) {
-//  AutoCompleteAddress(inputElement);
+  //  AutoCompleteAddress(inputElement);
 
   // Do we need to add a new row?
   var lastInput = awGetInputElement(top.MAX_RECIPIENTS);
-  if (lastInput && lastInput.value && !top.doNotCreateANewRow)
+  if (lastInput && lastInput.value && !top.doNotCreateANewRow) {
     awAppendNewRow(false);
+  }
   top.doNotCreateANewRow = false;
 }
 
 function awInputElementName() {
-  if (inputElementType == "")
-      inputElementType = document.getElementById("addressCol1#1").localName;
+  if (inputElementType == "") {
+    inputElementType = document.getElementById("addressCol1#1").localName;
+  }
   return inputElementType;
 }
 
 /**
  * Append a new row.
  *
  * @param {boolean} setFocus  Whether to set the focus on the new row.
  * @return {Element?}         The input element from the new row.
@@ -377,39 +424,41 @@ function awInputElementName() {
 function awAppendNewRow(setFocus) {
   let body = document.getElementById("addressingWidget");
   let listitem1 = awGetListItem(1);
   let input;
 
   if (body && listitem1) {
     let nextDummy = awGetNextDummyRow();
     let newNode = listitem1.cloneNode(true);
-    if (nextDummy)
+    if (nextDummy) {
       body.replaceChild(newNode, nextDummy);
-    else
+    } else {
       body.appendChild(newNode);
+    }
 
     top.MAX_RECIPIENTS++;
 
     input = newNode.getElementsByTagName(awInputElementName());
     if (input && input.length == 1) {
       input[0].setAttribute("value", "");
       input[0].setAttribute("id", "addressCol1#" + top.MAX_RECIPIENTS);
 
-      if (input[0].getAttribute("focused") != "")
+      if (input[0].getAttribute("focused") != "") {
         input[0].removeAttribute("focused");
+      }
     }
     // Focus the new input widget.
-    if (setFocus && input)
+    if (setFocus && input) {
       awSetFocusTo(input[0]);
+    }
   }
   return input ? input[0] : null;
 }
 
-
 // functions for accessing the elements in the addressing widget
 
 function awGetInputElement(row) {
   return document.getElementById("addressCol1#" + row);
 }
 
 function DragOverAddressListTree(event) {
   var dragSession = gDragService.getCurrentSession();
@@ -420,54 +469,66 @@ function DragOverAddressListTree(event) 
   }
 }
 
 function DropOnAddressListTree(event) {
   let dragSession = gDragService.getCurrentSession();
   let trans;
 
   try {
-   trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
-   trans.init(getLoadContext());
-   trans.addDataFlavor("text/x-moz-address");
+    trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(
+      Ci.nsITransferable
+    );
+    trans.init(getLoadContext());
+    trans.addDataFlavor("text/x-moz-address");
   } catch (ex) {
     return;
   }
 
   for (let i = 0; i < dragSession.numDropItems; ++i) {
     dragSession.getData(trans, i);
     let dataObj = {};
     let bestFlavor = {};
     let len = {};
     trans.getAnyTransferData(bestFlavor, dataObj, len);
-    if (dataObj)
+    if (dataObj) {
       dataObj = dataObj.value.QueryInterface(Ci.nsISupportsString);
-    if (!dataObj)
+    }
+    if (!dataObj) {
       continue;
+    }
 
     // pull the URL out of the data object
     let address = dataObj.data.substring(0, len.value);
-    if (!address)
+    if (!address) {
       continue;
+    }
 
     DropListAddress(event.target, address);
   }
 }
 
 function DropListAddress(target, address) {
   // Set focus on a new available, visible row.
   awClickEmptySpace(target, true);
-  if (top.MAX_RECIPIENTS == 0)
+  if (top.MAX_RECIPIENTS == 0) {
     top.MAX_RECIPIENTS = 1;
+  }
 
   // Break apart the MIME-ready header address into individual addressees to
   // add to the dialog.
-  let addresses = {}, names = {}, fullNames = {};
-  MailServices.headerParser.parseHeadersWithArray(address, addresses, names,
-    fullNames);
+  let addresses = {},
+    names = {},
+    fullNames = {};
+  MailServices.headerParser.parseHeadersWithArray(
+    address,
+    addresses,
+    names,
+    fullNames
+  );
   for (let full of fullNames.value) {
     let lastInput = awGetInputElement(top.MAX_RECIPIENTS);
     lastInput.value = full;
     awAppendNewRow(true);
   }
 }
 
 /* Allows extensions to register a listener function for
@@ -479,44 +540,47 @@ function DropListAddress(target, address
 function RegisterLoadListener(aListener) {
   gLoadListeners.push(aListener);
 }
 
 /* Allows extensions to unload a load listener function.
  */
 function UnregisterLoadListener(aListener) {
   var fIndex = gLoadListeners.indexOf(aListener);
-  if (fIndex != -1)
+  if (fIndex != -1) {
     gLoadListeners.splice(fIndex, 1);
+  }
 }
 
 /* Allows extensions to register a listener function for
  * when a mailing list is saved.  Like a load listener,
  * the save listener should take two parameters: the first
  * being a copy of the mailing list that is being saved,
  * and the second being the current window document.
  */
 function RegisterSaveListener(aListener) {
   gSaveListeners.push(aListener);
 }
 
 /* Allows extensions to unload a save listener function.
  */
 function UnregisterSaveListener(aListener) {
   var fIndex = gSaveListeners.indexOf(aListener);
-  if (fIndex != -1)
+  if (fIndex != -1) {
     gSaveListeners.splice(fIndex, 1);
+  }
 }
 
 /* Notifies all load listeners.
  */
 function NotifyLoadListeners(aMailingList) {
-  for (let i = 0; i < gLoadListeners.length; i++)
+  for (let i = 0; i < gLoadListeners.length; i++) {
     gLoadListeners[i](aMailingList, document);
+  }
 }
 
 /* Notifies all save listeners.
  */
 function NotifySaveListeners(aMailingList) {
-  for (let i = 0; i < gSaveListeners.length; i++)
+  for (let i = 0; i < gSaveListeners.length; i++) {
     gSaveListeners[i](aMailingList, document);
+  }
 }
-
--- a/mailnews/addrbook/content/abResultsPane.js
+++ b/mailnews/addrbook/content/abResultsPane.js
@@ -59,158 +59,182 @@ function SetAbView(aURI) {
     gAbResultsTree = document.getElementById("abResultsTree");
     gAbResultsTree.controllers.appendController(ResultsPaneController);
   }
 
   if (gAbView) {
     sortColumn = gAbView.sortColumn;
     sortDirection = gAbView.sortDirection;
   } else {
-    if (gAbResultsTree.hasAttribute("sortCol"))
+    if (gAbResultsTree.hasAttribute("sortCol")) {
       sortColumn = gAbResultsTree.getAttribute("sortCol");
+    }
     var sortColumnNode = document.getElementById(sortColumn);
-    if (sortColumnNode && sortColumnNode.hasAttribute("sortDirection"))
+    if (sortColumnNode && sortColumnNode.hasAttribute("sortDirection")) {
       sortDirection = sortColumnNode.getAttribute("sortDirection");
+    }
   }
 
   var directory = GetDirectoryFromURI(aURI);
 
-  if (!gAbView)
-    gAbView = Cc["@mozilla.org/addressbook/abview;1"]
-                .createInstance(Ci.nsIAbView);
+  if (!gAbView) {
+    gAbView = Cc["@mozilla.org/addressbook/abview;1"].createInstance(
+      Ci.nsIAbView
+    );
+  }
 
-  var actualSortColumn = gAbView.setView(directory, GetAbViewListener(),
-                                         sortColumn, sortDirection);
+  var actualSortColumn = gAbView.setView(
+    directory,
+    GetAbViewListener(),
+    sortColumn,
+    sortDirection
+  );
 
-  gAbResultsTree.view =
-    gAbView.QueryInterface(Ci.nsITreeView);
+  gAbResultsTree.view = gAbView.QueryInterface(Ci.nsITreeView);
 
   UpdateSortIndicators(actualSortColumn, sortDirection);
 
   // If the selected address book is LDAP and the search box is empty,
   // inform the user of the empty results pane.
   let abResultsTree = document.getElementById("abResultsTree");
   let cardViewOuterBox = document.getElementById("CardViewOuterBox");
-  let blankResultsPaneMessageBox = document.getElementById("blankResultsPaneMessageBox");
+  let blankResultsPaneMessageBox = document.getElementById(
+    "blankResultsPaneMessageBox"
+  );
   if (aURI.startsWith("moz-abldapdirectory://") && !aURI.includes("?")) {
-    if (abResultsTree)
+    if (abResultsTree) {
       abResultsTree.hidden = true;
-    if (cardViewOuterBox)
+    }
+    if (cardViewOuterBox) {
       cardViewOuterBox.hidden = true;
-    if (blankResultsPaneMessageBox)
+    }
+    if (blankResultsPaneMessageBox) {
       blankResultsPaneMessageBox.hidden = false;
+    }
   } else {
-    if (abResultsTree)
+    if (abResultsTree) {
       abResultsTree.hidden = false;
-    if (cardViewOuterBox)
+    }
+    if (cardViewOuterBox) {
       cardViewOuterBox.hidden = false;
-    if (blankResultsPaneMessageBox)
+    }
+    if (blankResultsPaneMessageBox) {
       blankResultsPaneMessageBox.hidden = true;
+    }
   }
 }
 
 function CloseAbView() {
-  if (gAbView)
+  if (gAbView) {
     gAbView.clearView();
+  }
 }
 
 function GetOneOrMoreCardsSelected() {
-  return (gAbView && (gAbView.selection.getRangeCount() > 0));
+  return gAbView && gAbView.selection.getRangeCount() > 0;
 }
 
 function GetSelectedAddresses() {
   return GetAddressesForCards(GetSelectedAbCards());
 }
 
 function GetNumSelectedCards() {
- try {
-   return gAbView.selection.count;
- } catch (ex) {
- }
+  try {
+    return gAbView.selection.count;
+  } catch (ex) {}
 
- // if something went wrong, return 0 for the count.
- return 0;
+  // if something went wrong, return 0 for the count.
+  return 0;
 }
 
 function GetSelectedCardTypes() {
   var cards = GetSelectedAbCards();
   if (!cards) {
     Cu.reportError("ERROR: GetSelectedCardTypes: |cards| is null.");
     return kNothingSelected; // no view
   }
   var count = cards.length;
-  if (count == 0)
-    return kNothingSelected;  // nothing selected
+  if (count == 0) {
+    return kNothingSelected;
+  } // nothing selected
 
   var mailingListCnt = 0;
   var cardCnt = 0;
   for (let i = 0; i < count; i++) {
     // We can assume no values from GetSelectedAbCards will be null.
-    if (cards[i].isMailList)
+    if (cards[i].isMailList) {
       mailingListCnt++;
-    else
+    } else {
       cardCnt++;
+    }
   }
 
   if (mailingListCnt == 0) {
     return kCardsOnly;
   }
   if (cardCnt > 0) {
     return kListsAndCards;
   }
   if (mailingListCnt == 1) {
     return kSingleListOnly;
   }
   return kMultipleListsOnly;
 }
 
 // NOTE, will return -1 if more than one card selected, or no cards selected.
 function GetSelectedCardIndex() {
-  if (!gAbView)
+  if (!gAbView) {
     return -1;
+  }
 
   var treeSelection = gAbView.selection;
   if (treeSelection.getRangeCount() == 1) {
     var start = {};
     var end = {};
     treeSelection.getRangeAt(0, start, end);
-    if (start.value == end.value)
+    if (start.value == end.value) {
       return start.value;
+    }
   }
 
   return -1;
 }
 
 // NOTE, returns the card if exactly one card is selected, null otherwise
 function GetSelectedCard() {
   var index = GetSelectedCardIndex();
-  return (index == -1) ? null : gAbView.getCardFromRow(index);
+  return index == -1 ? null : gAbView.getCardFromRow(index);
 }
 
 /**
  * Return a (possibly empty) list of cards
  *
  * It pushes only non-null/empty element, if any, into the returned list.
  */
 function GetSelectedAbCards() {
   var abView = gAbView;
 
   // if sidebar is open, and addressbook panel is open and focused,
   // then use the ab view from sidebar (gCurFrame is from sidebarOverlay.js)
   if (document.getElementById("sidebar-box")) {
     const abPanelUrl =
       "chrome://messenger/content/addressbook/addressbook-panel.xul";
-    if (gCurFrame &&
-        gCurFrame.getAttribute("src") == abPanelUrl &&
-        document.commandDispatcher.focusedWindow == gCurFrame.contentDocument.defaultView)
+    if (
+      gCurFrame &&
+      gCurFrame.getAttribute("src") == abPanelUrl &&
+      document.commandDispatcher.focusedWindow ==
+        gCurFrame.contentDocument.defaultView
+    ) {
       abView = gCurFrame.contentDocument.defaultView.gAbView;
+    }
   }
 
-  if (!abView)
+  if (!abView) {
     return [];
+  }
 
   let cards = [];
   var count = abView.selection.getRangeCount();
   for (let i = 0; i < count; ++i) {
     let start = {};
     let end = {};
 
     abView.selection.getRangeAt(i, start, end);
@@ -228,99 +252,110 @@ function GetSelectedAbCards() {
 
 // XXX todo
 // an optimization might be to make this return
 // the selected ranges, which would be faster
 // when the user does large selections, but for now, let's keep it simple.
 function GetSelectedRows() {
   var selectedRows = "";
 
-  if (!gAbView)
+  if (!gAbView) {
     return selectedRows;
+  }
 
   var rangeCount = gAbView.selection.getRangeCount();
   for (let i = 0; i < rangeCount; ++i) {
     var start = {};
     var end = {};
     gAbView.selection.getRangeAt(i, start, end);
     for (let j = start.value; j <= end.value; ++j) {
-      if (selectedRows)
+      if (selectedRows) {
         selectedRows += ",";
+      }
       selectedRows += j;
     }
   }
 
   return selectedRows;
 }
 
 function AbSwapFirstNameLastName() {
-  if (gAbView)
+  if (gAbView) {
     gAbView.swapFirstNameLastName();
+  }
 }
 
 function AbEditSelectedCard() {
   AbEditCard(GetSelectedCard());
 }
 
 function AbResultsPaneOnClick(event) {
   // we only care about button 0 (left click) events
-  if (event.button != 0) return;
+  if (event.button != 0) {
+    return;
+  }
 
   // all we need to worry about here is double clicks
   // and column header clicks.
   //
   // we get in here for clicks on the "treecol" (headers)
   // and the "scrollbarbutton" (scrollbar buttons)
   // we don't want those events to cause a "double click"
 
   var t = event.originalTarget;
 
   if (t.localName == "treecol") {
     var sortDirection;
     var currentDirection = t.getAttribute("sortDirection");
 
     // Revert the sort order. If none is set, use Ascending.
-    sortDirection = currentDirection == kDefaultAscending ?
-                                        kDefaultDescending : kDefaultAscending;
+    sortDirection =
+      currentDirection == kDefaultAscending
+        ? kDefaultDescending
+        : kDefaultAscending;
 
     SortAndUpdateIndicators(t.id, sortDirection);
   } else if (t.localName == "treechildren") {
     // figure out what row the click was in
     var row = gAbResultsTree.getRowAt(event.clientX, event.clientY);
-    if (row == -1)
+    if (row == -1) {
       return;
+    }
 
-    if (event.detail == 2)
+    if (event.detail == 2) {
       AbResultsPaneDoubleClick(gAbView.getCardFromRow(row));
+    }
   }
 }
 
 function AbSortAscending() {
   var sortColumn = gAbResultsTree.getAttribute("sortCol");
   SortAndUpdateIndicators(sortColumn, kDefaultAscending);
 }
 
 function AbSortDescending() {
   var sortColumn = gAbResultsTree.getAttribute("sortCol");
   SortAndUpdateIndicators(sortColumn, kDefaultDescending);
 }
 
 function SortResultPane(sortColumn) {
   var sortDirection = kDefaultAscending;
-  if (gAbView)
-     sortDirection = gAbView.sortDirection;
+  if (gAbView) {
+    sortDirection = gAbView.sortDirection;
+  }
 
   SortAndUpdateIndicators(sortColumn, sortDirection);
 }
 
 function SortAndUpdateIndicators(sortColumn, sortDirection) {
   UpdateSortIndicators(sortColumn, sortDirection);
 
-  if (gAbView)
+  if (gAbView) {
     gAbView.sortBy(sortColumn, sortDirection);
+  }
 }
 
 function UpdateSortIndicators(colID, sortDirection) {
   var sortedColumn = null;
 
   // set the sort indicator on the column we are sorted by
   if (colID) {
     sortedColumn = document.getElementById(colID);
@@ -329,25 +364,27 @@ function UpdateSortIndicators(colID, sor
       gAbResultsTree.setAttribute("sortCol", colID);
     }
   }
 
   // remove the sort indicator from all the columns
   // except the one we are sorted by
   var currCol = gAbResultsTree.firstChild.firstChild;
   while (currCol) {
-    if (currCol != sortedColumn && currCol.localName == "treecol")
+    if (currCol != sortedColumn && currCol.localName == "treecol") {
       currCol.removeAttribute("sortDirection");
+    }
     currCol = currCol.nextSibling;
   }
 }
 
 function InvalidateResultsPane() {
-  if (gAbResultsTree)
+  if (gAbResultsTree) {
     gAbResultsTree.invalidate();
+  }
 }
 
 // Controller object for Results Pane
 var ResultsPaneController = {
   supportsCommand(command) {
     switch (command) {
       case "cmd_selectAll":
       case "cmd_delete":
@@ -367,52 +404,53 @@ var ResultsPaneController = {
     switch (command) {
       case "cmd_selectAll":
         return true;
       case "cmd_delete":
       case "button_delete": {
         let numSelected;
         let enabled = false;
         if (gAbView && gAbView.selection) {
-          if (gAbView.directory)
+          if (gAbView.directory) {
             enabled = !gAbView.directory.readOnly;
+          }
           numSelected = gAbView.selection.count;
         } else {
           numSelected = 0;
         }
-        enabled = enabled && (numSelected > 0);
+        enabled = enabled && numSelected > 0;
 
         let labelAttr = null;
         if (command == "cmd_delete") {
           switch (GetSelectedCardTypes()) {
             case kSingleListOnly:
               labelAttr = "valueList";
               break;
             case kMultipleListsOnly:
               labelAttr = "valueLists";
               break;
             case kListsAndCards:
               labelAttr = "valueItems";
               break;
             case kCardsOnly:
             default:
-              labelAttr = (numSelected < 2) ? "valueCard" : "valueCards";
+              labelAttr = numSelected < 2 ? "valueCard" : "valueCards";
           }
         }
         document.querySelectorAll(`[command=${command}]`).forEach(e => {
           e.disabled = !enabled;
           if (labelAttr && e.hasAttribute(labelAttr)) {
             e.setAttribute("label", e.getAttribute(labelAttr));
           }
         });
         return enabled;
       }
       case "cmd_printcardpreview":
       case "cmd_printcard":
-        return (GetNumSelectedCards() > 0);
+        return GetNumSelectedCards() > 0;
       case "cmd_properties": {
         let attrs = {
           label: "valueGeneric",
           accesskey: "valueGenericAccessKey",
           tooltiptext: "valueGenericTooltipText",
         };
         switch (GetSelectedCardTypes()) {
           // Set cmd_properties UI according to the type of the selected item(s),
@@ -430,17 +468,17 @@ var ResultsPaneController = {
             attrs.tooltiptext = "valueContactTooltipText";
             break;
           case kListsAndCards:
           default:
             // use generic set of attributes declared above
             break;
         }
 
-        let enabled = (GetNumSelectedCards() == 1);
+        let enabled = GetNumSelectedCards() == 1;
         document.querySelectorAll("[command=cmd_properties]").forEach(e => {
           e.disabled = !enabled;
           for (let [attr, name] of Object.entries(attrs)) {
             if (e.hasAttribute(attr) && e.getAttribute(name)) {
               e.setAttribute(attr, e.getAttribute(name));
             }
           }
         });
@@ -452,18 +490,19 @@ var ResultsPaneController = {
       default:
         return false;
     }
   },
 
   doCommand(command) {
     switch (command) {
       case "cmd_selectAll":
-        if (gAbView)
+        if (gAbView) {
           gAbView.selectAll();
+        }
         break;
       case "cmd_delete":
       case "button_delete":
         AbDelete();
         break;
       case "cmd_properties":
         AbEditSelectedCard();
         break;
@@ -473,17 +512,19 @@ var ResultsPaneController = {
       case "cmd_newCard":
         AbNewCard();
         break;
     }
   },
 
   onEvent(event) {
     // on blur events set the menu item texts back to the normal values
-    if (event == "blur")
+    if (event == "blur") {
       goSetMenuValue("cmd_delete", "valueDefault");
+    }
   },
 };
 
 function SelectFirstCard() {
-  if (gAbView && gAbView.selection && (gAbView.selection.count > 0))
+  if (gAbView && gAbView.selection && gAbView.selection.count > 0) {
     gAbView.selection.select(0);
+  }
 }
--- a/mailnews/addrbook/content/map-list.js
+++ b/mailnews/addrbook/content/map-list.js
@@ -1,39 +1,41 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
-  * License, v. 2.0. If a copy of the MPL was not distributed with this
-  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* global MozElements */
 
 // Wrap in a block to prevent leaking to window scope.
 {
-  const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+  const { Services } = ChromeUtils.import(
+    "resource://gre/modules/Services.jsm"
+  );
 
   /**
    * The MozMapList widget behaves as a popup menu showing available map options
    * for an address. It is a part of the card view in the addressbook.
    *
    * @extends {MozElements.MozMenuPopup}
    */
   class MozMapList extends MozElements.MozMenuPopup {
     connectedCallback() {
       if (this.delayConnectedCallback() || this.hasConnected) {
         return;
       }
       this.setAttribute("is", "map-list");
 
-      this.addEventListener("command", (event) => {
+      this.addEventListener("command", event => {
         this._chooseMapService(event.target);
         event.stopPropagation();
       });
 
-      this.addEventListener("popupshowing", (event) => {
+      this.addEventListener("popupshowing", event => {
         this._listMapServices();
       });
 
       this._setWidgetDisabled(true);
     }
 
     get mapURL() {
       return this._createMapItURL();
@@ -72,23 +74,27 @@
     /**
      * Returns the Map service URL from localized pref. Returns null if there
      * is none at the given index.
      * @param integer [index=0] - the index of the service to return. 0 is the default service.
      */
     _getMapURLPref(index = 0) {
       let url = null;
       if (!index) {
-        url = Services.prefs.getComplexValue("mail.addr_book.mapit_url.format",
-          Ci.nsIPrefLocalizedString).data;
+        url = Services.prefs.getComplexValue(
+          "mail.addr_book.mapit_url.format",
+          Ci.nsIPrefLocalizedString
+        ).data;
       } else {
         try {
-          url = Services.prefs.getComplexValue("mail.addr_book.mapit_url." + index + ".format",
-            Ci.nsIPrefLocalizedString).data;
-        } catch (e) { }
+          url = Services.prefs.getComplexValue(
+            "mail.addr_book.mapit_url." + index + ".format",
+            Ci.nsIPrefLocalizedString
+          ).data;
+        } catch (e) {}
       }
 
       return url;
     }
 
     /**
      * Builds menuitem elements representing map services defined in prefs
      * and attaches them to the specified button.
@@ -127,57 +133,68 @@
       while (itemFound) {
         let urlName;
         let urlTemplate = this._getMapURLPref(index);
         if (!urlTemplate) {
           itemFound = false;
         } else {
           // Name is not mandatory, generate one if not found.
           try {
-            urlName = Services.prefs.getComplexValue("mail.addr_book.mapit_url." + index + ".name",
-              Ci.nsIPrefLocalizedString).data;
+            urlName = Services.prefs.getComplexValue(
+              "mail.addr_book.mapit_url." + index + ".name",
+              Ci.nsIPrefLocalizedString
+            ).data;
           } catch (e) {
             urlName = generateName(urlTemplate);
           }
         }
         if (itemFound) {
           addMapService(urlTemplate, urlName);
           index++;
-          if (urlTemplate == defaultUrl)
+          if (urlTemplate == defaultUrl) {
             defaultFound = true;
+          }
         } else if (index < kUserIndex) {
           // After iterating the base region provided urls, check for user defined ones.
           index = kUserIndex;
           itemFound = true;
         }
       }
       if (!defaultFound) {
         // If user had put a customized map URL into mail.addr_book.mapit_url.format
         // preserve it as a new map service named with the URL.
         // 'index' now points to the first unused entry in prefs.
         let defaultName = generateName(defaultUrl);
         addMapService(defaultUrl, defaultName);
-        Services.prefs.setCharPref("mail.addr_book.mapit_url." + index + ".format",
-          defaultUrl);
-        Services.prefs.setCharPref("mail.addr_book.mapit_url." + index + ".name",
-          defaultName);
+        Services.prefs.setCharPref(
+          "mail.addr_book.mapit_url." + index + ".format",
+          defaultUrl
+        );
+        Services.prefs.setCharPref(
+          "mail.addr_book.mapit_url." + index + ".name",
+          defaultName
+        );
       }
     }
 
     /**
      * Save user selected mapping service.
      * @param item  The chosen menuitem with map service.
      */
     _chooseMapService(item) {
       // Save selected URL as the default.
-      let defaultUrl = Cc["@mozilla.org/pref-localizedstring;1"]
-        .createInstance(Ci.nsIPrefLocalizedString);
+      let defaultUrl = Cc["@mozilla.org/pref-localizedstring;1"].createInstance(
+        Ci.nsIPrefLocalizedString
+      );
       defaultUrl.data = item.getAttribute("url");
-      Services.prefs.setComplexValue("mail.addr_book.mapit_url.format",
-        Ci.nsIPrefLocalizedString, defaultUrl);
+      Services.prefs.setComplexValue(
+        "mail.addr_book.mapit_url.format",
+        Ci.nsIPrefLocalizedString,
+        defaultUrl
+      );
     }
 
     /**
      * Generate the map URL used to open the link on clicking the menulist button.
      * @returns {urlFormat} - the map url generated from the address.
      */
     _createMapItURL() {
       let urlFormat = this._getMapURLPref();
@@ -191,10 +208,10 @@
       urlFormat = urlFormat.replace("@ST", encodeURIComponent(this._state));
       urlFormat = urlFormat.replace("@ZI", encodeURIComponent(this.zip));
       urlFormat = urlFormat.replace("@CO", encodeURIComponent(this.country));
 
       return urlFormat;
     }
   }
 
-  customElements.define("map-list", MozMapList, { "extends": "menupopup" });
+  customElements.define("map-list", MozMapList, { extends: "menupopup" });
 }
--- a/mailnews/addrbook/jsaddrbook/AddrBookCard.jsm
+++ b/mailnews/addrbook/jsaddrbook/AddrBookCard.jsm
@@ -1,16 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, you can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["AddrBookCard"];
 
-ChromeUtils.defineModuleGetter(this, "MailServices", "resource:///modules/MailServices.jsm");
-ChromeUtils.defineModuleGetter(this, "newUID", "resource:///modules/AddrBookUtils.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "MailServices",
+  "resource:///modules/MailServices.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "newUID",
+  "resource:///modules/AddrBookUtils.jsm"
+);
 
 /**
  * Prototype for nsIAbCard objects that are not mailing lists.
  *
  * @implements {nsIAbItem}
  * @implements {nsIAbCard}
  */
 function AddrBookCard() {
@@ -28,39 +36,45 @@ AddrBookCard.prototype = {
     return MailServices.ab.generateUUID(this._directoryId, this._localId);
   },
   generateName(generateFormat, bundle) {
     let format;
     switch (generateFormat) {
       case Ci.nsIAbItem.GENERATE_DISPLAY_NAME:
         return this.displayName;
       case Ci.nsIAbItem.GENERATE_LAST_FIRST_ORDER:
-        format = bundle ? bundle.GetStringFromName("lastFirstFormat") : "%S, %S";
-        return format.replace("%S", this.lastName).replace("%S", this.firstName);
+        format = bundle
+          ? bundle.GetStringFromName("lastFirstFormat")
+          : "%S, %S";
+        return format
+          .replace("%S", this.lastName)
+          .replace("%S", this.firstName);
       case Ci.nsIAbItem.GENERATE_FIRST_LAST_ORDER:
         format = bundle ? bundle.GetStringFromName("firstLastFormat") : "%S %S";
-        return format.replace("%S", this.firstName).replace("%S", this.lastName);
+        return format
+          .replace("%S", this.firstName)
+          .replace("%S", this.lastName);
     }
 
     return "";
   },
 
   /* nsIAbCard */
 
   get directoryId() {
     return this._directoryId;
   },
   set directoryId(value) {
-    return this._directoryId = value;
+    return (this._directoryId = value);
   },
   get localId() {
     return this._localId;
   },
   set localId(value) {
-    return this._localId = value;
+    return (this._localId = value);
   },
   get UID() {
     if (!this._uid) {
       this._uid = newUID();
     }
     return this._uid;
   },
   set UID(value) {
@@ -85,17 +99,17 @@ AddrBookCard.prototype = {
             return name;
           },
           get value() {
             return value;
           },
           QueryInterface: ChromeUtils.generateQI([Ci.nsIProperty]),
         };
       },
-      * [Symbol.iterator]() {
+      *[Symbol.iterator]() {
         while (this.hasMoreElements()) {
           yield this.getNext();
         }
       },
       QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
     };
     return enumerator;
   },
--- a/mailnews/addrbook/jsaddrbook/AddrBookDirectory.jsm
+++ b/mailnews/addrbook/jsaddrbook/AddrBookDirectory.jsm
@@ -1,66 +1,109 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, you can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["AddrBookDirectory", "closeConnectionTo"];
 
-ChromeUtils.defineModuleGetter(this, "FileUtils", "resource://gre/modules/FileUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "MailServices", "resource:///modules/MailServices.jsm");
-ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
-ChromeUtils.defineModuleGetter(this, "SimpleEnumerator", "resource:///modules/AddrBookUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "fixIterator", "resource:///modules/iteratorUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "AddrBookCard", "resource:///modules/AddrBookCard.jsm");
-ChromeUtils.defineModuleGetter(this, "AddrBookMailingList", "resource:///modules/AddrBookMailingList.jsm");
-ChromeUtils.defineModuleGetter(this, "newUID", "resource:///modules/AddrBookUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "toXPCOMArray", "resource:///modules/iteratorUtils.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "FileUtils",
+  "resource://gre/modules/FileUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "MailServices",
+  "resource:///modules/MailServices.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Services",
+  "resource://gre/modules/Services.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "SimpleEnumerator",
+  "resource:///modules/AddrBookUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "fixIterator",
+  "resource:///modules/iteratorUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "AddrBookCard",
+  "resource:///modules/AddrBookCard.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "AddrBookMailingList",
+  "resource:///modules/AddrBookMailingList.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "newUID",
+  "resource:///modules/AddrBookUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "toXPCOMArray",
+  "resource:///modules/iteratorUtils.jsm"
+);
 
 /* This is where the address book manager creates an nsIAbDirectory. We want
  * to do things differently depending on whether or not the directory is a
  * mailing list, so we do this by abusing javascript prototypes.
  * A non-list directory has bookPrototype, a list directory has a
  * AddrBookMailingList prototype, ultimately created by getting the owner
  * directory and calling addressLists on it. This will make more sense and be
  * a lot neater once we stop using one XPCOM interface for two jobs. */
 
-function AddrBookDirectory() {
-}
+function AddrBookDirectory() {}
 AddrBookDirectory.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsIAbDirectory]),
   classID: Components.ID("{e96ee804-0bd3-472f-81a6-8a9d65277ad3}"),
 
   _query: null,
 
   init(uri) {
     let index = uri.indexOf("?");
     if (index >= 0) {
       this._query = uri.substring(index + 1);
       uri = uri.substring(0, index);
     }
     if (/\/MailList\d+$/.test(uri)) {
-      let parent = MailServices.ab.getDirectory(uri.substring(0, uri.lastIndexOf("/")));
+      let parent = MailServices.ab.getDirectory(
+        uri.substring(0, uri.lastIndexOf("/"))
+      );
       for (let list of parent.addressLists.enumerate()) {
         list.QueryInterface(Ci.nsIAbDirectory);
         if (list.URI == uri) {
           this.__proto__ = list;
           return;
         }
       }
       throw Cr.NS_ERROR_UNEXPECTED;
     }
 
     this.__proto__ = bookPrototype;
     this._uri = uri;
 
     if (!this.dirPrefId) {
       let filename = uri.substring("jsaddrbook://".length);
       for (let child of Services.prefs.getChildList("ldap_2.servers.")) {
-        if (child.endsWith(".filename") && Services.prefs.getStringPref(child) == filename) {
-          this.dirPrefId = child.substring(0, child.length - ".filename".length);
+        if (
+          child.endsWith(".filename") &&
+          Services.prefs.getStringPref(child) == filename
+        ) {
+          this.dirPrefId = child.substring(
+            0,
+            child.length - ".filename".length
+          );
           break;
         }
       }
       if (!this.dirPrefId) {
         throw Cr.NS_ERROR_UNEXPECTED;
       }
       this.UID;
     }
@@ -108,84 +151,92 @@ var bookPrototype = {
   get _dbConnection() {
     let file = FileUtils.getFile("ProfD", [this.fileName]);
     let connection = connections.get(file.path);
     if (!connection) {
       connection = Services.storage.openDatabase(file);
       if (connection.schemaVersion == 0) {
         connection.executeSimpleSQL("PRAGMA journal_mode=WAL");
         connection.executeSimpleSQL(
-          "CREATE TABLE cards (uid TEXT PRIMARY KEY, localId INTEGER)");
+          "CREATE TABLE cards (uid TEXT PRIMARY KEY, localId INTEGER)"
+        );
         connection.executeSimpleSQL(
-          "CREATE TABLE properties (card TEXT, name TEXT, value TEXT)");
+          "CREATE TABLE properties (card TEXT, name TEXT, value TEXT)"
+        );
         connection.executeSimpleSQL(
-          "CREATE TABLE lists (uid TEXT PRIMARY KEY, localId INTEGER, name TEXT, nickName TEXT, description TEXT)");
+          "CREATE TABLE lists (uid TEXT PRIMARY KEY, localId INTEGER, name TEXT, nickName TEXT, description TEXT)"
+        );
         connection.executeSimpleSQL(
-          "CREATE TABLE list_cards (list TEXT, card TEXT, PRIMARY KEY(list, card))");
+          "CREATE TABLE list_cards (list TEXT, card TEXT, PRIMARY KEY(list, card))"
+        );
         connection.schemaVersion = 1;
       }
       connections.set(file.path, connection);
     }
 
     delete this._dbConnection;
     Object.defineProperty(this, "_dbConnection", {
       enumerable: true,
       value: connection,
       writable: false,
     });
     return connection;
   },
   get _lists() {
     let selectStatement = this._dbConnection.createStatement(
-      "SELECT uid, localId, name, nickName, description FROM lists");
+      "SELECT uid, localId, name, nickName, description FROM lists"
+    );
     let results = new Map();
     while (selectStatement.executeStep()) {
       results.set(selectStatement.row.uid, {
         uid: selectStatement.row.uid,
         localId: selectStatement.row.localId,
         name: selectStatement.row.name,
         nickName: selectStatement.row.nickName,
         description: selectStatement.row.description,
       });
     }
     selectStatement.finalize();
     return results;
   },
   get _cards() {
     let cardStatement = this._dbConnection.createStatement(
-      "SELECT uid, localId FROM cards");
+      "SELECT uid, localId FROM cards"
+    );
     let results = new Map();
     while (cardStatement.executeStep()) {
       results.set(cardStatement.row.uid, {
         uid: cardStatement.row.uid,
         localId: cardStatement.row.localId,
       });
     }
     cardStatement.finalize();
     return results;
   },
 
   _getNextCardId() {
     if (this._nextCardId === null) {
       let value = 1;
       let selectStatement = this._dbConnection.createStatement(
-        "SELECT MAX(localId) AS localId FROM cards");
+        "SELECT MAX(localId) AS localId FROM cards"
+      );
       if (selectStatement.executeStep()) {
         value = selectStatement.row.localId + 1;
       }
       this._nextCardId = value;
       selectStatement.finalize();
     }
     return this._nextCardId.toString();
   },
   _getNextListId() {
     if (this._nextListId === null) {
       let value = 1;
       let selectStatement = this._dbConnection.createStatement(
-        "SELECT MAX(localId) AS localId FROM lists");
+        "SELECT MAX(localId) AS localId FROM lists"
+      );
       if (selectStatement.executeStep()) {
         value = selectStatement.row.localId + 1;
       }
       this._nextListId = value;
       selectStatement.finalize();
     }
     return this._nextListId.toString();
   },
@@ -195,49 +246,53 @@ var bookPrototype = {
     card._uid = uid;
     card.localId = localId;
     card._properties = this._loadCardProperties(uid);
     return card.QueryInterface(Ci.nsIAbCard);
   },
   _loadCardProperties(uid) {
     let properties = new Map();
     let propertyStatement = this._dbConnection.createStatement(
-      "SELECT name, value FROM properties WHERE card = :card");
+      "SELECT name, value FROM properties WHERE card = :card"
+    );
     propertyStatement.params.card = uid;
     while (propertyStatement.executeStep()) {
       properties.set(propertyStatement.row.name, propertyStatement.row.value);
     }
     propertyStatement.finalize();
     return properties;
   },
   _saveCardProperties(card) {
     this._dbConnection.beginTransaction();
     let deleteStatement = this._dbConnection.createStatement(
-      "DELETE FROM properties WHERE card = :card");
+      "DELETE FROM properties WHERE card = :card"
+    );
     deleteStatement.params.card = card.UID;
     deleteStatement.execute();
     let insertStatement = this._dbConnection.createStatement(
-      "INSERT INTO properties VALUES (:card, :name, :value)");
+      "INSERT INTO properties VALUES (:card, :name, :value)"
+    );
     for (let { name, value } of fixIterator(card.properties, Ci.nsIProperty)) {
       if (value !== null && value !== undefined && value !== "") {
         insertStatement.params.card = card.UID;
         insertStatement.params.name = name;
         insertStatement.params.value = value;
         insertStatement.execute();
         insertStatement.reset();
       }
     }
     this._dbConnection.commitTransaction();
     deleteStatement.finalize();
     insertStatement.finalize();
   },
   _saveList(list) {
     let replaceStatement = this._dbConnection.createStatement(
       "REPLACE INTO lists (uid, localId, name, nickName, description) " +
-      "VALUES (:uid, :localId, :name, :nickName, :description)");
+        "VALUES (:uid, :localId, :name, :nickName, :description)"
+    );
     replaceStatement.params.uid = list._uid;
     replaceStatement.params.localId = list._localId;
     replaceStatement.params.name = list._name;
     replaceStatement.params.nickName = list._nickName;
     replaceStatement.params.description = list._description;
     replaceStatement.execute();
     replaceStatement.finalize();
   },
@@ -249,36 +304,38 @@ var bookPrototype = {
   },
   get isRemote() {
     return false;
   },
   get isSecure() {
     return false;
   },
   cardForEmailAddress(emailAddress) {
-    return this.getCardFromProperty("PrimaryEmail", emailAddress, false) ||
-      this.getCardFromProperty("SecondEmail", emailAddress, false);
+    return (
+      this.getCardFromProperty("PrimaryEmail", emailAddress, false) ||
+      this.getCardFromProperty("SecondEmail", emailAddress, false)
+    );
   },
   getCardFromProperty(property, value, caseSensitive) {
-    let sql = caseSensitive ?
-      "SELECT card FROM properties WHERE name = :name AND value = :value LIMIT 1" :
-      "SELECT card FROM properties WHERE name = :name AND LOWER(value) = LOWER(:value) LIMIT 1";
+    let sql = caseSensitive
+      ? "SELECT card FROM properties WHERE name = :name AND value = :value LIMIT 1"
+      : "SELECT card FROM properties WHERE name = :name AND LOWER(value) = LOWER(:value) LIMIT 1";
     let selectStatement = this._dbConnection.createStatement(sql);
     selectStatement.params.name = property;
     selectStatement.params.value = value;
     if (selectStatement.executeStep()) {
       return this._getCard({ uid: selectStatement.row.card });
     }
     selectStatement.finalize();
     return null;
   },
   getCardsFromProperty(property, value, caseSensitive) {
-    let sql = caseSensitive ?
-      "SELECT card FROM properties WHERE name = :name AND value = :value" :
-      "SELECT card FROM properties WHERE name = :name AND LOWER(value) = LOWER(:value)";
+    let sql = caseSensitive
+      ? "SELECT card FROM properties WHERE name = :name AND value = :value"
+      : "SELECT card FROM properties WHERE name = :name AND LOWER(value) = LOWER(:value)";
     let selectStatement = this._dbConnection.createStatement(sql);
     selectStatement.params.name = property;
     selectStatement.params.value = value;
     let results = [];
     while (selectStatement.executeStep()) {
       results.push(this._getCard({ uid: selectStatement.row.card }));
     }
     selectStatement.finalize();
@@ -325,38 +382,41 @@ var bookPrototype = {
     return this._prefBranch.getIntPref("position", 1);
   },
   get uuid() {
     return `${this.dirPrefId}&${this.dirName}`;
   },
   get childNodes() {
     let lists = Array.from(
       this._lists.values(),
-      list => new AddrBookMailingList(list.uid,
-                                      this,
-                                      list.localId,
-                                      list.name,
-                                      list.nickName,
-                                      list.description).asDirectory
+      list =>
+        new AddrBookMailingList(
+          list.uid,
+          this,
+          list.localId,
+          list.name,
+          list.nickName,
+          list.description
+        ).asDirectory
     );
     return new SimpleEnumerator(lists);
   },
   get childCards() {
     let results = Array.from(
       this._lists.values(),
-      list => new AddrBookMailingList(list.uid,
-                                      this,
-                                      list.localId,
-                                      list.name,
-                                      list.nickName,
-                                      list.description).asCard
-    ).concat(Array.from(
-      this._cards.values(),
-      card => this._getCard(card))
-    );
+      list =>
+        new AddrBookMailingList(
+          list.uid,
+          this,
+          list.localId,
+          list.name,
+          list.nickName,
+          list.description
+        ).asCard
+    ).concat(Array.from(this._cards.values(), card => this._getCard(card)));
 
     if (this._query) {
       if (!this._processedQuery) {
         // Process the query string into a tree of conditions to match.
         let lispRegexp = /^\((and|or|not|([^\)]*)(\)+))/;
         let index = 0;
         let rootQuery = { children: [], op: "or" };
         let currentQuery = rootQuery;
@@ -395,17 +455,17 @@ var bookPrototype = {
           properties = new Map([
             ["DisplayName", card.displayName],
             ["NickName", card.getProperty("NickName")],
             ["Notes", card.getProperty("Notes")],
           ]);
         } else {
           properties = this._loadCardProperties(card.UID);
         }
-        let matches = (b) => {
+        let matches = b => {
           if (typeof b == "string") {
             let [name, condition, value] = b.split(",");
             if (name == "IsMailList" && condition == "=") {
               return card.isMailList == (value == "TRUE");
             }
 
             if (!properties.has(name)) {
               return condition == "!ex";
@@ -427,17 +487,17 @@ var bookPrototype = {
                 return cardValue > value;
               case "bw":
                 return cardValue.startsWith(value);
               case "ew":
                 return cardValue.endsWith(value);
               case "c":
                 return cardValue.includes(value);
               case "!c":
-                return !(cardValue.includes(value));
+                return !cardValue.includes(value);
               case "~=":
               case "regex":
               default:
                 return false;
             }
           }
           if (b.op == "or") {
             return b.children.some(bb => matches(bb));
@@ -460,46 +520,53 @@ var bookPrototype = {
     return !!this._query;
   },
   get supportsMailingLists() {
     return true;
   },
   get addressLists() {
     let lists = Array.from(
       this._lists.values(),
-      list => new AddrBookMailingList(list.uid,
-                                      this,
-                                      list.localId,
-                                      list.name,
-                                      list.nickName,
-                                      list.description).asDirectory
+      list =>
+        new AddrBookMailingList(
+          list.uid,
+          this,
+          list.localId,
+          list.name,
+          list.nickName,
+          list.description
+        ).asDirectory
     );
     return toXPCOMArray(lists, Ci.nsIMutableArray);
   },
 
   generateName(generateFormat, bundle) {
     return this.dirName;
   },
   deleteDirectory(directory) {
     let list = this._lists.get(directory.UID);
-    list = new AddrBookMailingList(list.uid,
-                                   this,
-                                   list.localId,
-                                   list.name,
-                                   list.nickName,
-                                   list.description);
+    list = new AddrBookMailingList(
+      list.uid,
+      this,
+      list.localId,
+      list.name,
+      list.nickName,
+      list.description
+    );
 
     let deleteListStatement = this._dbConnection.createStatement(
-      "DELETE FROM lists WHERE uid = :uid");
+      "DELETE FROM lists WHERE uid = :uid"
+    );
     deleteListStatement.params.uid = directory.UID;
     deleteListStatement.execute();
     deleteListStatement.finalize();
 
     this._dbConnection.executeSimpleSQL(
-      "DELETE FROM list_cards WHERE list NOT IN (SELECT DISTINCT uid FROM lists)");
+      "DELETE FROM list_cards WHERE list NOT IN (SELECT DISTINCT uid FROM lists)"
+    );
     MailServices.ab.notifyDirectoryItemDeleted(this, list.asCard);
     MailServices.ab.notifyDirectoryItemDeleted(list.asDirectory, list.asCard);
     MailServices.ab.notifyDirectoryDeleted(this, directory);
   },
   hasCard(card) {
     return this._lists.has(card.UID) || this._cards.has(card.UID);
   },
   hasDirectory(dir) {
@@ -538,46 +605,53 @@ var bookPrototype = {
     Services.obs.notifyObservers(card, "addrbook-contact-updated", this.UID);
   },
   deleteCards(cards) {
     if (cards === null) {
       throw Cr.NS_ERROR_INVALID_POINTER;
     }
 
     let deleteCardStatement = this._dbConnection.createStatement(
-      "DELETE FROM cards WHERE uid = :uid");
+      "DELETE FROM cards WHERE uid = :uid"
+    );
     let selectListCardStatement = this._dbConnection.createStatement(
-      "SELECT list FROM list_cards WHERE card = :card");
+      "SELECT list FROM list_cards WHERE card = :card"
+    );
     for (let card of cards.enumerate(Ci.nsIAbCard)) {
       deleteCardStatement.params.uid = card.UID;
       deleteCardStatement.execute();
       deleteCardStatement.reset();
       MailServices.ab.notifyDirectoryItemDeleted(this, card);
 
       selectListCardStatement.params.card = card.UID;
       while (selectListCardStatement.executeStep()) {
-        let list = new AddrBookMailingList(selectListCardStatement.row.list, this);
+        let list = new AddrBookMailingList(
+          selectListCardStatement.row.list,
+          this
+        );
         list.asDirectory.deleteCards(toXPCOMArray([card], Ci.nsIMutableArray));
       }
     }
 
     this._dbConnection.executeSimpleSQL(
-      "DELETE FROM properties WHERE card NOT IN (SELECT DISTINCT uid FROM cards)");
+      "DELETE FROM properties WHERE card NOT IN (SELECT DISTINCT uid FROM cards)"
+    );
 
     deleteCardStatement.finalize();
     selectListCardStatement.finalize();
   },
   dropCard(card, needToCopyCard) {
     let newCard = new AddrBookCard();
     newCard.directoryId = this.uuid;
     newCard.localId = this._getNextCardId().toString();
-    newCard._uid = (needToCopyCard || !card.UID) ? newUID() : card.UID;
+    newCard._uid = needToCopyCard || !card.UID ? newUID() : card.UID;
 
     let insertStatement = this._dbConnection.createStatement(
-      "INSERT INTO cards (uid, localId) VALUES (:uid, :localId)");
+      "INSERT INTO cards (uid, localId) VALUES (:uid, :localId)"
+    );
     insertStatement.params.uid = newCard.UID;
     insertStatement.params.localId = newCard.localId;
     insertStatement.execute();
     insertStatement.finalize();
 
     for (let { name, value } of fixIterator(card.properties, Ci.nsIProperty)) {
       newCard.setProperty(name, value);
     }
@@ -591,22 +665,24 @@ var bookPrototype = {
   useForAutocomplete(identityKey) {
     return Services.prefs.getBoolPref("mail.enable_autocomplete");
   },
   addMailList(list) {
     if (!list.isMailList) {
       throw Cr.NS_ERROR_UNEXPECTED;
     }
 
-    let newList = new AddrBookMailingList(newUID(),
-                                          this,
-                                          this._getNextListId(),
-                                          list.dirName || "",
-                                          list.listNickName || "",
-                                          list.description || "");
+    let newList = new AddrBookMailingList(
+      newUID(),
+      this,
+      this._getNextListId(),
+      list.dirName || "",
+      list.listNickName || "",
+      list.description || ""
+    );
     this._saveList(newList);
 
     let newListDirectory = newList.asDirectory;
     MailServices.ab.notifyDirectoryItemAdded(this, newList.asCard);
     MailServices.ab.notifyDirectoryItemAdded(this, newListDirectory);
     return newListDirectory;
   },
   editMailListToDatabase(listCard) {
@@ -632,17 +708,18 @@ var bookPrototype = {
   },
   getStringValue(name, defaultValue) {
     return this._prefBranch.getStringPref(name, defaultValue);
   },
   getLocalizedStringValue(name, defaultValue) {
     if (this._prefBranch.getPrefType(name) == Ci.nsIPrefBranch.PREF_INVALID) {
       return defaultValue;
     }
-    return this._prefBranch.getComplexValue(name, Ci.nsIPrefLocalizedString).value;
+    return this._prefBranch.getComplexValue(name, Ci.nsIPrefLocalizedString)
+      .value;
   },
   setIntValue(name, value) {
     this._prefBranch.setIntPref(name, value);
   },
   setBoolValue(name, value) {
     this._prefBranch.setBoolPref(name, value);
   },
   setStringValue(name, value) {
--- a/mailnews/addrbook/jsaddrbook/AddrBookFactory.jsm
+++ b/mailnews/addrbook/jsaddrbook/AddrBookFactory.jsm
@@ -1,27 +1,38 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, you can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["AddrBookFactory"];
 
-ChromeUtils.defineModuleGetter(this, "FileUtils", "resource://gre/modules/FileUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "MailServices", "resource:///modules/MailServices.jsm");
-ChromeUtils.defineModuleGetter(this, "closeConnectionTo", "resource:///modules/AddrBookDirectory.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "FileUtils",
+  "resource://gre/modules/FileUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "MailServices",
+  "resource:///modules/MailServices.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "closeConnectionTo",
+  "resource:///modules/AddrBookDirectory.jsm"
+);
 
 /**
  * Address book factory. This looks like it should be a useful for keeping
  * reference to all JS directories, but in reality it's not used for most
  * methods of accessing a directory, and nsAbManager has a cache anyway.
  *
  * @implements {nsIAbDirFactory}
  */
-function AddrBookFactory() {
-}
+function AddrBookFactory() {}
 AddrBookFactory.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsIAbDirFactory]),
   classID: Components.ID("{567c1f22-bae5-4bc9-9951-885678dc14a5}"),
 
   /* nsIAbDirFactory */
 
   getDirectories(dirName, uri, prefName) {
     let directory = MailServices.ab.getDirectory(uri);
@@ -35,17 +46,17 @@ AddrBookFactory.prototype = {
       getNext() {
         if (this.hasMoreElements()) {
           this._position++;
           return directory;
         }
         throw Cr.NS_ERROR_NOT_AVAILABLE;
       },
       QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
-      * [Symbol.iterator]() {
+      *[Symbol.iterator]() {
         while (this.hasMoreElements()) {
           yield this.getNext();
         }
       },
     };
   },
   deleteDirectory(directory) {
     let file = FileUtils.getFile("ProfD", [directory.fileName]);
--- a/mailnews/addrbook/jsaddrbook/AddrBookMailingList.jsm
+++ b/mailnews/addrbook/jsaddrbook/AddrBookMailingList.jsm
@@ -1,25 +1,48 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, you can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["AddrBookMailingList"];
 
-ChromeUtils.defineModuleGetter(this, "MailServices", "resource:///modules/MailServices.jsm");
-ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
-ChromeUtils.defineModuleGetter(this, "SimpleEnumerator", "resource:///modules/AddrBookUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "toXPCOMArray", "resource:///modules/iteratorUtils.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "MailServices",
+  "resource:///modules/MailServices.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Services",
+  "resource://gre/modules/Services.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "SimpleEnumerator",
+  "resource:///modules/AddrBookUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "toXPCOMArray",
+  "resource:///modules/iteratorUtils.jsm"
+);
 
 /* Prototype for mailing lists. A mailing list can appear as nsIAbDirectory
  * or as nsIAbCard. Here we keep all relevant information in the class itself
  * and fulfill each interface on demand. This will make more sense and be
  * a lot neater once we stop using two XPCOM interfaces for one job. */
 
-function AddrBookMailingList(uid, parent, localId, name, nickName, description) {
+function AddrBookMailingList(
+  uid,
+  parent,
+  localId,
+  name,
+  nickName,
+  description
+) {
   this._uid = uid;
   this._parent = parent;
   this._localId = localId;
   this._name = name;
   this._nickName = nickName;
   this._description = description;
 }
 AddrBookMailingList.prototype = {
@@ -42,19 +65,29 @@ AddrBookMailingList.prototype = {
         return `&${self._name}`;
       },
       get dirName() {
         return self._name;
       },
       set dirName(value) {
         let oldValue = self._name;
         self._name = value;
-        MailServices.ab.notifyItemPropertyChanged(this, "DirName", oldValue, value);
+        MailServices.ab.notifyItemPropertyChanged(
+          this,
+          "DirName",
+          oldValue,
+          value
+        );
         // Fired twice for compatibility.
-        MailServices.ab.notifyItemPropertyChanged(this, "DirName", oldValue, value);
+        MailServices.ab.notifyItemPropertyChanged(
+          this,
+          "DirName",
+          oldValue,
+          value
+        );
       },
       get listNickName() {
         return self._nickName;
       },
       set listNickName(value) {
         self._nickName = value;
       },
       get description() {
@@ -66,76 +99,92 @@ AddrBookMailingList.prototype = {
       get isMailList() {
         return true;
       },
       get childNodes() {
         return new SimpleEnumerator([]);
       },
       get childCards() {
         let selectStatement = self._parent._dbConnection.createStatement(
-          "SELECT card FROM list_cards WHERE list = :list ORDER BY oid");
+          "SELECT card FROM list_cards WHERE list = :list ORDER BY oid"
+        );
         selectStatement.params.list = self._uid;
         let results = [];
         while (selectStatement.executeStep()) {
-          results.push(self._parent._getCard({ uid: selectStatement.row.card }));
+          results.push(
+            self._parent._getCard({ uid: selectStatement.row.card })
+          );
         }
         selectStatement.finalize();
         return new SimpleEnumerator(results);
       },
       get supportsMailingLists() {
         return false;
       },
       get addressLists() {
         let selectStatement = self._parent._dbConnection.createStatement(
-          "SELECT card FROM list_cards WHERE list = :list ORDER BY oid");
+          "SELECT card FROM list_cards WHERE list = :list ORDER BY oid"
+        );
         selectStatement.params.list = self._uid;
         let results = [];
         while (selectStatement.executeStep()) {
-          results.push(self._parent._getCard({ uid: selectStatement.row.card }));
+          results.push(
+            self._parent._getCard({ uid: selectStatement.row.card })
+          );
         }
         selectStatement.finalize();
         return toXPCOMArray(results, Ci.nsIMutableArray);
       },
 
       addCard(card) {
         if (!card.primaryEmail) {
           return card;
         }
         let insertStatement = self._parent._dbConnection.createStatement(
-          "REPLACE INTO list_cards (list, card) VALUES (:list, :card)");
+          "REPLACE INTO list_cards (list, card) VALUES (:list, :card)"
+        );
         insertStatement.params.list = self._uid;
         insertStatement.params.card = card.UID;
         insertStatement.execute();
         MailServices.ab.notifyItemPropertyChanged(card, null, null, null);
         MailServices.ab.notifyItemPropertyChanged(card, null, null, null);
         MailServices.ab.notifyDirectoryItemAdded(self._parent, card);
         MailServices.ab.notifyDirectoryItemAdded(this, card);
         // Services.obs.notifyObservers(card, "addrbook-list-member-added", self._uid);
         insertStatement.finalize();
         return card;
       },
       deleteCards(cards) {
         let deleteCardStatement = self._parent._dbConnection.createStatement(
-          "DELETE FROM list_cards WHERE list = :list AND card = :card");
+          "DELETE FROM list_cards WHERE list = :list AND card = :card"
+        );
         for (let card of cards.enumerate()) {
           deleteCardStatement.params.list = self._uid;
           deleteCardStatement.params.card = card.UID;
           deleteCardStatement.execute();
           deleteCardStatement.reset();
           MailServices.ab.notifyDirectoryItemDeleted(this, card);
-          Services.obs.notifyObservers(card, "addrbook-list-member-removed", self._uid);
+          Services.obs.notifyObservers(
+            card,
+            "addrbook-list-member-removed",
+            self._uid
+          );
         }
         deleteCardStatement.finalize();
       },
       dropCard(card, needToCopyCard) {
         if (needToCopyCard) {
           card = this._parent.dropCard(card, true);
         }
         this.addCard(card);
-        Services.obs.notifyObservers(card, "addrbook-list-member-added", self._uid);
+        Services.obs.notifyObservers(
+          card,
+          "addrbook-list-member-added",
+          self._uid
+        );
       },
       editMailListToDatabase(listCard) {
         self._parent._saveList(self);
         Services.obs.notifyObservers(this, "addrbook-list-updated");
       },
     };
   },
   get asCard() {
--- a/mailnews/addrbook/jsaddrbook/AddrBookUtils.jsm
+++ b/mailnews/addrbook/jsaddrbook/AddrBookUtils.jsm
@@ -1,18 +1,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, you can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["newUID", "SimpleEnumerator"];
 
-ChromeUtils.defineModuleGetter(this, "XPCOMUtils", "resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "XPCOMUtils",
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 XPCOMUtils.defineLazyServiceGetter(
-  this, "uuidGenerator", "@mozilla.org/uuid-generator;1", "nsIUUIDGenerator"
+  this,
+  "uuidGenerator",
+  "@mozilla.org/uuid-generator;1",
+  "nsIUUIDGenerator"
 );
 
 function SimpleEnumerator(elements) {
   this._elements = elements;
   this._position = 0;
 }
 SimpleEnumerator.prototype = {
   hasMoreElements() {
@@ -20,18 +27,21 @@ SimpleEnumerator.prototype = {
   },
   getNext() {
     if (this.hasMoreElements()) {
       return this._elements[this._position++];
     }
     throw Cr.NS_ERROR_NOT_AVAILABLE;
   },
   QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
-  * [Symbol.iterator]() {
+  *[Symbol.iterator]() {
     while (this.hasMoreElements()) {
       yield this.getNext();
     }
   },
 };
 
 function newUID() {
-  return uuidGenerator.generateUUID().toString().substring(1, 37);
+  return uuidGenerator
+    .generateUUID()
+    .toString()
+    .substring(1, 37);
 }
--- a/mailnews/addrbook/prefs/content/pref-directory-add.js
+++ b/mailnews/addrbook/prefs/content/pref-directory-add.js
@@ -1,168 +1,204 @@
 /* -*- Mode: Java; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
-var {
-  isLegalHostNameOrIP,
-  cleanUpHostName,
-} = ChromeUtils.import("resource:///modules/hostnameUtils.jsm");
-var {
-  fixIterator,
-} = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
+var { isLegalHostNameOrIP, cleanUpHostName } = ChromeUtils.import(
+  "resource:///modules/hostnameUtils.jsm"
+);
+var { fixIterator } = ChromeUtils.import(
+  "resource:///modules/iteratorUtils.jsm"
+);
 
 var gCurrentDirectory = null;
 var gReplicationBundle = null;
-var gReplicationService =
-  Cc["@mozilla.org/addressbook/ldap-replication-service;1"].
-             getService(Ci.nsIAbLDAPReplicationService);
+var gReplicationService = Cc[
+  "@mozilla.org/addressbook/ldap-replication-service;1"
+].getService(Ci.nsIAbLDAPReplicationService);
 var gReplicationCancelled = false;
 var gProgressText;
 var gProgressMeter;
 var gDownloadInProgress = false;
 
 var kDefaultLDAPPort = 389;
 var kDefaultSecureLDAPPort = 636;
-var kLDAPDirectory = 0;  // defined in nsDirPrefs.h
+var kLDAPDirectory = 0; // defined in nsDirPrefs.h
 
 document.addEventListener("dialogaccept", onAccept);
 document.addEventListener("dialogcancel", onCancel);
 
 var ldapOfflineObserver = {
   observe(subject, topic, state) {
     // sanity checks
-    if (topic != "network:offline-status-changed") return;
+    if (topic != "network:offline-status-changed") {
+      return;
+    }
     setDownloadOfflineOnlineState(state == "offline");
   },
 };
 
 function Startup() {
   gReplicationBundle = document.getElementById("bundle_replication");
 
-  document.getElementById("download").label =
-    gReplicationBundle.getString("downloadButton");
-  document.getElementById("download").accessKey =
-    gReplicationBundle.getString("downloadButton.accesskey");
+  document.getElementById("download").label = gReplicationBundle.getString(
+    "downloadButton"
+  );
+  document.getElementById("download").accessKey = gReplicationBundle.getString(
+    "downloadButton.accesskey"
+  );
 
   if ("arguments" in window && window.arguments[0]) {
     gCurrentDirectory = window.arguments[0].selectedDirectory;
     try {
       fillSettings();
     } catch (ex) {
-      dump("pref-directory-add.js:Startup(): fillSettings() exception: "
-           + ex + "\n");
+      dump(
+        "pref-directory-add.js:Startup(): fillSettings() exception: " +
+          ex +
+          "\n"
+      );
     }
 
     let oldListName = gCurrentDirectory.dirName;
-    document.title = gReplicationBundle.getFormattedString("directoryTitleEdit", [oldListName]);
+    document.title = gReplicationBundle.getFormattedString(
+      "directoryTitleEdit",
+      [oldListName]
+    );
 
     // Only set up the download button for online/offline status toggling
     // if the pref isn't locked to disable the button.
-    if (!Services.prefs.prefIsLocked(gCurrentDirectory.dirPrefId +
-                                     ".disable_button_download")) {
+    if (
+      !Services.prefs.prefIsLocked(
+        gCurrentDirectory.dirPrefId + ".disable_button_download"
+      )
+    ) {
       // Now connect to the offline/online observer
-      Services.obs.addObserver(ldapOfflineObserver,
-                               "network:offline-status-changed");
+      Services.obs.addObserver(
+        ldapOfflineObserver,
+        "network:offline-status-changed"
+      );
 
       // Now set the initial offline/online state and update the state
       setDownloadOfflineOnlineState(Services.io.offline);
     }
   } else {
     document.title = gReplicationBundle.getString("directoryTitleNew");
     fillDefaultSettings();
     // Don't add observer here as it doesn't make any sense.
   }
 }
 
 function onUnload() {
-  if ("arguments" in window &&
-      window.arguments[0] &&
-      !Services.prefs.prefIsLocked(gCurrentDirectory.dirPrefId +
-                                   ".disable_button_download")) {
+  if (
+    "arguments" in window &&
+    window.arguments[0] &&
+    !Services.prefs.prefIsLocked(
+      gCurrentDirectory.dirPrefId + ".disable_button_download"
+    )
+  ) {
     // Remove the observer that we put in on dialog startup
-    Services.obs.removeObserver(ldapOfflineObserver,
-                                "network:offline-status-changed");
+    Services.obs.removeObserver(
+      ldapOfflineObserver,
+      "network:offline-status-changed"
+    );
   }
 }
 
 var progressListener = {
   onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
       // start the spinning
       gProgressMeter.removeAttribute("value");
-      gProgressText.value = gReplicationBundle.getString(aStatus ?
-                                                         "replicationStarted" :
-                                                         "changesStarted");
+      gProgressText.value = gReplicationBundle.getString(
+        aStatus ? "replicationStarted" : "changesStarted"
+      );
       gDownloadInProgress = true;
-      document.getElementById("download").label =
-        gReplicationBundle.getString("cancelDownloadButton");
-      document.getElementById("download").accessKey =
-        gReplicationBundle.getString("cancelDownloadButton.accesskey");
+      document.getElementById("download").label = gReplicationBundle.getString(
+        "cancelDownloadButton"
+      );
+      document.getElementById(
+        "download"
+      ).accessKey = gReplicationBundle.getString(
+        "cancelDownloadButton.accesskey"
+      );
     }
 
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
       EndDownload(aStatus);
     }
   },
-  onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {
-    gProgressText.value = gReplicationBundle.getFormattedString("currentCount",
-                                                                [aCurSelfProgress]);
-  },
-  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
+  onProgressChange(
+    aWebProgress,
+    aRequest,
+    aCurSelfProgress,
+    aMaxSelfProgress,
+    aCurTotalProgress,
+    aMaxTotalProgress
+  ) {
+    gProgressText.value = gReplicationBundle.getFormattedString(
+      "currentCount",
+      [aCurSelfProgress]
+    );
   },
-  onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
-  },
-  onSecurityChange(aWebProgress, aRequest, state) {
-  },
-  onContentBlockingEvent(aWebProgress, aRequest, aEvent) {
-  },
-  QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
-                                          "nsISupportsWeakReference"]),
+  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {},
+  onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {},
+  onSecurityChange(aWebProgress, aRequest, state) {},
+  onContentBlockingEvent(aWebProgress, aRequest, aEvent) {},
+  QueryInterface: ChromeUtils.generateQI([
+    "nsIWebProgressListener",
+    "nsISupportsWeakReference",
+  ]),
 };
 
 function DownloadNow() {
   if (!gDownloadInProgress) {
     gProgressText = document.getElementById("replicationProgressText");
     gProgressMeter = document.getElementById("replicationProgressMeter");
 
     gProgressText.hidden = false;
     gProgressMeter.hidden = false;
     gReplicationCancelled = false;
 
     try {
-      if (gCurrentDirectory instanceof Ci.nsIAbLDAPDirectory)
-        gReplicationService.startReplication(gCurrentDirectory,
-                                             progressListener);
-      else
+      if (gCurrentDirectory instanceof Ci.nsIAbLDAPDirectory) {
+        gReplicationService.startReplication(
+          gCurrentDirectory,
+          progressListener
+        );
+      } else {
         EndDownload(false);
+      }
     } catch (ex) {
       EndDownload(false);
     }
   } else {
     gReplicationCancelled = true;
     try {
       gReplicationService.cancelReplication(gCurrentDirectory.dirPrefId);
     } catch (ex) {
       // XXX todo
       // perhaps replication hasn't started yet?  This can happen if you hit cancel after attempting to replication when offline
       dump("unexpected failure while cancelling.  ex=" + ex + "\n");
     }
   }
 }
 
 function EndDownload(aStatus) {
-  document.getElementById("download").label =
-    gReplicationBundle.getString("downloadButton");
-  document.getElementById("download").accessKey =
-    gReplicationBundle.getString("downloadButton.accesskey");
+  document.getElementById("download").label = gReplicationBundle.getString(
+    "downloadButton"
+  );
+  document.getElementById("download").accessKey = gReplicationBundle.getString(
+    "downloadButton.accesskey"
+  );
 
   // stop the spinning
   gProgressMeter.value = 100;
   gProgressMeter.hidden = true;
 
   gDownloadInProgress = false;
   if (aStatus) {
     gProgressText.value = gReplicationBundle.getString("replicationSucceeded");
@@ -184,112 +220,137 @@ function fillSettings() {
     document.getElementById("results").value = gCurrentDirectory.maxHits;
     document.getElementById("login").value = gCurrentDirectory.authDn;
     document.getElementById("hostname").value = ldapUrl.host;
     document.getElementById("basedn").value = ldapUrl.dn;
     document.getElementById("search").value = ldapUrl.filter;
 
     var sub = document.getElementById("sub");
     switch (ldapUrl.scope) {
-    case Ci.nsILDAPURL.SCOPE_ONELEVEL:
-      sub.radioGroup.selectedItem = document.getElementById("one");
-      break;
-    default:
-      sub.radioGroup.selectedItem = sub;
-      break;
+      case Ci.nsILDAPURL.SCOPE_ONELEVEL:
+        sub.radioGroup.selectedItem = document.getElementById("one");
+        break;
+      default:
+        sub.radioGroup.selectedItem = sub;
+        break;
     }
 
     var sasl = document.getElementById("saslMechanism");
     switch (gCurrentDirectory.saslMechanism) {
-    case "GSSAPI":
-      sasl.selectedItem = document.getElementById("GSSAPI");
-      break;
-    default:
-      sasl.selectedItem = document.getElementById("Simple");
-      break;
+      case "GSSAPI":
+        sasl.selectedItem = document.getElementById("GSSAPI");
+        break;
+      default:
+        sasl.selectedItem = document.getElementById("Simple");
+        break;
     }
 
     var secure = ldapUrl.options & ldapUrl.OPT_SECURE;
-    if (secure)
+    if (secure) {
       document.getElementById("secure").setAttribute("checked", "true");
+    }
 
-    if (ldapUrl.port == -1)
-      document.getElementById("port").value =
-        (secure ? kDefaultSecureLDAPPort : kDefaultLDAPPort);
-    else
+    if (ldapUrl.port == -1) {
+      document.getElementById("port").value = secure
+        ? kDefaultSecureLDAPPort
+        : kDefaultLDAPPort;
+    } else {
       document.getElementById("port").value = ldapUrl.port;
+    }
   }
 
   // check if any of the preferences for this server are locked.
   // If they are locked disable them
   DisableUriFields(gCurrentDirectory.dirPrefId + ".uri");
-  DisableElementIfPrefIsLocked(gCurrentDirectory.dirPrefId + ".description", "description");
-  DisableElementIfPrefIsLocked(gCurrentDirectory.dirPrefId + ".disable_button_download", "download");
-  DisableElementIfPrefIsLocked(gCurrentDirectory.dirPrefId + ".maxHits", "results");
-  DisableElementIfPrefIsLocked(gCurrentDirectory.dirPrefId + ".auth.dn", "login");
+  DisableElementIfPrefIsLocked(
+    gCurrentDirectory.dirPrefId + ".description",
+    "description"
+  );
+  DisableElementIfPrefIsLocked(
+    gCurrentDirectory.dirPrefId + ".disable_button_download",
+    "download"
+  );
+  DisableElementIfPrefIsLocked(
+    gCurrentDirectory.dirPrefId + ".maxHits",
+    "results"
+  );
+  DisableElementIfPrefIsLocked(
+    gCurrentDirectory.dirPrefId + ".auth.dn",
+    "login"
+  );
 }
 
 function DisableElementIfPrefIsLocked(aPrefName, aElementId) {
-  if (Services.prefs.prefIsLocked(aPrefName))
+  if (Services.prefs.prefIsLocked(aPrefName)) {
     document.getElementById(aElementId).setAttribute("disabled", true);
+  }
 }
 
 // disables all the text fields corresponding to the .uri pref.
 function DisableUriFields(aPrefName) {
   if (Services.prefs.prefIsLocked(aPrefName)) {
     let lockedElements = document.querySelectorAll('[disableiflocked="true"]');
-    for (let i = 0; i < lockedElements.length; i++)
+    for (let i = 0; i < lockedElements.length; i++) {
       lockedElements[i].setAttribute("disabled", "true");
+    }
   }
 }
 
 function onSecure() {
-  document.getElementById("port").value =
-    document.getElementById("secure").checked ? kDefaultSecureLDAPPort :
-                                                kDefaultLDAPPort;
+  document.getElementById("port").value = document.getElementById("secure")
+    .checked
+    ? kDefaultSecureLDAPPort
+    : kDefaultLDAPPort;
 }
 
 function fillDefaultSettings() {
   document.getElementById("port").value = kDefaultLDAPPort;
   var sub = document.getElementById("sub");
   sub.radioGroup.selectedItem = sub;
 
   // Disable the download button and add some text indicating why.
   document.getElementById("download").disabled = true;
   document.getElementById("downloadWarningMsg").hidden = false;
-  document.getElementById("downloadWarningMsg").textContent = document.
-                                      getElementById("bundle_addressBook").
-                                      getString("abReplicationSaveSettings");
+  document.getElementById(
+    "downloadWarningMsg"
+  ).textContent = document
+    .getElementById("bundle_addressBook")
+    .getString("abReplicationSaveSettings");
 }
 
 function hasCharacters(number) {
   var re = /[0-9]/g;
   var num = number.match(re);
-  if (num && (num.length == number.length))
+  if (num && num.length == number.length) {
     return false;
+  }
   return true;
 }
 
 function onAccept(event) {
   try {
     let description = document.getElementById("description").value.trim();
     let hostname = cleanUpHostName(document.getElementById("hostname").value);
     let port = document.getElementById("port").value;
     let secure = document.getElementById("secure");
     let results = document.getElementById("results").value;
     let errorValue = null;
     let errorArg = null;
     let saslMechanism = "";
 
     let findDupeName = function(newName) {
       // Do not allow an already existing name.
-      for (let ab of fixIterator(MailServices.ab.directories,
-                                 Ci.nsIAbDirectory)) {
-        if ((ab.dirName.toLowerCase() == newName.toLowerCase()) &&
-            (!gCurrentDirectory || (ab.URI != gCurrentDirectory.URI))) {
+      for (let ab of fixIterator(
+        MailServices.ab.directories,
+        Ci.nsIAbDirectory
+      )) {
+        if (
+          ab.dirName.toLowerCase() == newName.toLowerCase() &&
+          (!gCurrentDirectory || ab.URI != gCurrentDirectory.URI)
+        ) {
           return ab.dirName;
         }
       }
       return null;
     };
 
     if (!description) {
       errorValue = "invalidName";
@@ -302,92 +363,104 @@ function onAccept(event) {
       errorValue = "invalidPortNumber";
     } else if (results && hasCharacters(results)) {
       errorValue = "invalidResults";
     }
 
     if (!errorValue) {
       // XXX Due to the LDAP c-sdk pass a dummy url to the IO service, then
       // update the parts (bug 473351).
-      let ldapUrl = Services.io.newURI(
-        (secure.checked ? "ldaps://" : "ldap://") + "localhost/dc=???")
+      let ldapUrl = Services.io
+        .newURI((secure.checked ? "ldaps://" : "ldap://") + "localhost/dc=???")
         .QueryInterface(Ci.nsILDAPURL);
 
       let newPort = port;
       if (!port) {
         port = secure.checked ? kDefaultSecureLDAPPort : kDefaultLDAPPort;
       }
-      ldapUrl = ldapUrl.mutate()
-                       .setHost(hostname)
-                       .setPort(newPort)
-                       .finalize()
-                       .QueryInterface(Ci.nsILDAPURL);
+      ldapUrl = ldapUrl
+        .mutate()
+        .setHost(hostname)
+        .setPort(newPort)
+        .finalize()
+        .QueryInterface(Ci.nsILDAPURL);
 
       ldapUrl.dn = document.getElementById("basedn").value;
-      ldapUrl.scope = document.getElementById("one").selected ?
-                      Ci.nsILDAPURL.SCOPE_ONELEVEL :
-                      Ci.nsILDAPURL.SCOPE_SUBTREE;
+      ldapUrl.scope = document.getElementById("one").selected
+        ? Ci.nsILDAPURL.SCOPE_ONELEVEL
+        : Ci.nsILDAPURL.SCOPE_SUBTREE;
 
       ldapUrl.filter = document.getElementById("search").value;
       if (document.getElementById("GSSAPI").selected) {
         saslMechanism = "GSSAPI";
       }
 
       // check if we are modifying an existing directory or adding a new directory
       if (gCurrentDirectory) {
         gCurrentDirectory.dirName = description;
         gCurrentDirectory.lDAPURL = ldapUrl.QueryInterface(Ci.nsILDAPURL);
         window.opener.gNewServerString = gCurrentDirectory.dirPrefId;
-      } else { // adding a new directory
-        window.opener.gNewServerString =
-          MailServices.ab.newAddressBook(description, ldapUrl.spec, kLDAPDirectory);
+      } else {
+        // adding a new directory
+        window.opener.gNewServerString = MailServices.ab.newAddressBook(
+          description,
+          ldapUrl.spec,
+          kLDAPDirectory
+        );
       }
 
       // XXX This is really annoying - both new/modify Address Book don't
       // give us back the new directory we just created - so go find it from
       // rdf so we can set a few final things up on it.
       var targetURI = "moz-abldapdirectory://" + window.opener.gNewServerString;
-      var theDirectory =
-          MailServices.ab.getDirectory(targetURI)
-          .QueryInterface(Ci.nsIAbLDAPDirectory);
+      var theDirectory = MailServices.ab
+        .getDirectory(targetURI)
+        .QueryInterface(Ci.nsIAbLDAPDirectory);
 
       theDirectory.maxHits = results;
       theDirectory.authDn = document.getElementById("login").value;
       theDirectory.saslMechanism = saslMechanism;
 
       window.opener.gNewServer = description;
       // set window.opener.gUpdate to true so that LDAP Directory Servers
       // dialog gets updated
       window.opener.gUpdate = true;
     } else {
       let addressBookBundle = document.getElementById("bundle_addressBook");
 
       let errorText;
-      if (errorArg)
-        errorText = addressBookBundle.getFormattedString(errorValue, [errorArg]);
-      else
+      if (errorArg) {
+        errorText = addressBookBundle.getFormattedString(errorValue, [
+          errorArg,
+        ]);
+      } else {
         errorText = addressBookBundle.getString(errorValue);
+      }
 
       Services.prompt.alert(window, document.title, errorText);
       event.preventDefault();
       return;
     }
   } catch (outer) {
-    Cu.reportError("Internal error in pref-directory-add.js:onAccept() " + outer);
+    Cu.reportError(
+      "Internal error in pref-directory-add.js:onAccept() " + outer
+    );
   }
 }
 
 function onCancel() {
   window.opener.gUpdate = false;
 }
 
 // Sets the download button state for offline or online.
 // This function should only be called for ldap edit dialogs.
 function setDownloadOfflineOnlineState(isOffline) {
   if (isOffline) {
     // Disable the download button and add some text indicating why.
-    document.getElementById("downloadWarningMsg").textContent = document.
-      getElementById("bundle_addressBook").
-      getString("abReplicationOfflineWarning");
+    document.getElementById(
+      "downloadWarningMsg"
+    ).textContent = document
+      .getElementById("bundle_addressBook")
+      .getString("abReplicationOfflineWarning");
   }
   document.getElementById("downloadWarningMsg").hidden = !isOffline;
   document.getElementById("download").disabled = isOffline;
 }
--- a/mailnews/addrbook/prefs/content/pref-editdirectories.js
+++ b/mailnews/addrbook/prefs/content/pref-editdirectories.js
@@ -1,17 +1,19 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* import-globals-from ../../../../mail/components/addrbook/content/abCommon.js */
 
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
 
 // Listener to refresh the list items if something changes. In all these
 // cases we just rebuild the list as it is easier than searching/adding in the
 // correct places an would be an infrequent operation.
 var gAddressBookAbListener = {
   onItemAdded(parentDir, item) {
     if (item instanceof Ci.nsIAbDirectory) {
       fillDirectoryList();
@@ -29,51 +31,58 @@ var gAddressBookAbListener = {
   },
 };
 
 function onInitEditDirectories() {
   // For AbDeleteDirectory in abCommon.js
   gAddressBookBundle = document.getElementById("bundle_addressBook");
 
   // If the pref is locked disable the "Add" button
-  if (Services.prefs.prefIsLocked("ldap_2.disable_button_add"))
+  if (Services.prefs.prefIsLocked("ldap_2.disable_button_add")) {
     document.getElementById("addButton").setAttribute("disabled", true);
+  }
 
   // Fill out the directory list
   fillDirectoryList();
 
   const nsIAbListener = Ci.nsIAbListener;
   // Add a listener so we can update correctly if the list should change
-  MailServices.ab.addAddressBookListener(gAddressBookAbListener,
-                                         nsIAbListener.itemAdded |
-                                         nsIAbListener.directoryRemoved |
-                                         nsIAbListener.itemChanged);
+  MailServices.ab.addAddressBookListener(
+    gAddressBookAbListener,
+    nsIAbListener.itemAdded |
+      nsIAbListener.directoryRemoved |
+      nsIAbListener.itemChanged
+  );
 }
 
 function onUninitEditDirectories() {
   MailServices.ab.removeAddressBookListener(gAddressBookAbListener);
 }
 
 function fillDirectoryList() {
   var abList = document.getElementById("directoriesList");
 
   // Empty out anything in the list
-  while (abList.hasChildNodes())
+  while (abList.hasChildNodes()) {
     abList.lastChild.remove();
+  }
 
   // Init the address book list
   let directories = MailServices.ab.directories;
   let holdingArray = [];
   while (directories && directories.hasMoreElements()) {
     let ab = directories.getNext();
-    if (ab instanceof Ci.nsIAbDirectory && ab.isRemote)
+    if (ab instanceof Ci.nsIAbDirectory && ab.isRemote) {
       holdingArray.push(ab);
+    }
   }
 
-  holdingArray.sort(function(a, b) { return a.dirName.localeCompare(b.dirName); });
+  holdingArray.sort(function(a, b) {
+    return a.dirName.localeCompare(b.dirName);
+  });
 
   holdingArray.forEach(function(ab) {
     let item = document.createXULElement("richlistitem");
     let label = document.createXULElement("label");
     label.setAttribute("value", ab.dirName);
     item.appendChild(label);
     item.setAttribute("value", ab.URI);
 
@@ -87,46 +96,55 @@ function selectDirectory() {
   var removeButton = document.getElementById("removeButton");
 
   if (abList && abList.selectedItem) {
     editButton.removeAttribute("disabled");
 
     // If the disable delete button pref for the selected directory is set,
     // disable the delete button for that directory.
     let ab = MailServices.ab.getDirectory(abList.value);
-    let disable = Services.prefs.getBoolPref(ab.dirPrefId + ".disable_delete", false);
-    if (disable)
+    let disable = Services.prefs.getBoolPref(
+      ab.dirPrefId + ".disable_delete",
+      false
+    );
+    if (disable) {
       removeButton.setAttribute("disabled", true);
-    else
+    } else {
       removeButton.removeAttribute("disabled");
+    }
   } else {
     editButton.setAttribute("disabled", true);
     removeButton.setAttribute("disabled", true);
   }
 }
 
 function dblClickDirectory(event) {
   // We only care about left click events.
-  if (event.button != 0)
+  if (event.button != 0) {
     return;
+  }
 
   editDirectory();
 }
 
 function editDirectory() {
   var abList = document.getElementById("directoriesList");
 
   if (abList && abList.selectedItem) {
     let abURI = abList.value;
     let ab = MailServices.ab.getDirectory(abURI);
 
-    window.openDialog(ab.propertiesChromeURI, "editDirectory",
-                      "chrome,modal=yes,resizable=no",
-                      { selectedDirectory: ab });
+    window.openDialog(
+      ab.propertiesChromeURI,
+      "editDirectory",
+      "chrome,modal=yes,resizable=no",
+      { selectedDirectory: ab }
+    );
   }
 }
 
 function removeDirectory() {
   var abList = document.getElementById("directoriesList");
 
-  if (abList && abList.selectedItem)
+  if (abList && abList.selectedItem) {
     AbDeleteDirectory(abList.value);
+  }
 }
--- a/mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
+++ b/mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
@@ -1,53 +1,69 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
-var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
+var { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 function nsAbAutoCompleteMyDomain() {}
 
 nsAbAutoCompleteMyDomain.prototype = {
   classID: Components.ID("{5b259db2-e451-4de9-8a6f-cfba91402973}"),
-  QueryInterface: ChromeUtils.generateQI([
-      Ci.nsIAutoCompleteSearch]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch]),
 
   cachedIdKey: "",
   cachedIdentity: null,
 
   applicableHeaders: new Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
 
   startSearch(aString, aSearchParam, aResult, aListener) {
     let params = aSearchParam ? JSON.parse(aSearchParam) : {};
-    let applicable = ("type" in params) && this.applicableHeaders.has(params.type);
+    let applicable =
+      "type" in params && this.applicableHeaders.has(params.type);
     const ACR = Ci.nsIAutoCompleteResult;
     var address = null;
     if (applicable && aString && !aString.includes(",")) {
-      if (("idKey" in params) && (params.idKey != this.cachedIdKey)) {
+      if ("idKey" in params && params.idKey != this.cachedIdKey) {
         this.cachedIdentity = MailServices.accounts.getIdentity(params.idKey);
         this.cachedIdKey = params.idKey;
       }
-      if (this.cachedIdentity.autocompleteToMyDomain)
-        address = aString.includes("@") ? aString :
-                  this.cachedIdentity.email.replace(/[^@]*/, aString);
+      if (this.cachedIdentity.autocompleteToMyDomain) {
+        address = aString.includes("@")
+          ? aString
+          : this.cachedIdentity.email.replace(/[^@]*/, aString);
+      }
     }
 
     var result = {
       searchString: aString,
       searchResult: address ? ACR.RESULT_SUCCESS : ACR.RESULT_FAILURE,
       defaultIndex: -1,
       errorDescription: null,
       matchCount: address ? 1 : 0,
-      getValueAt() { return address; },
-      getLabelAt() { return this.getValueAt(); },
-      getCommentAt() { return null; },
-      getStyleAt() { return "default-match"; },
-      getImageAt() { return null; },
+      getValueAt() {
+        return address;
+      },
+      getLabelAt() {
+        return this.getValueAt();
+      },
+      getCommentAt() {
+        return null;
+      },
+      getStyleAt() {
+        return "default-match";
+      },
+      getImageAt() {
+        return null;
+      },
       getFinalCompleteValueAt(aIndex) {
         return this.getValueAt(aIndex);
       },
       removeValueAt() {},
     };
     aListener.onSearchResult(this, result);
   },
 
--- a/mailnews/addrbook/src/nsAbAutoCompleteSearch.js
+++ b/mailnews/addrbook/src/nsAbAutoCompleteSearch.js
@@ -1,36 +1,42 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
 var {
   getSearchTokens,
   getModelQuery,
   modelQueryHasUserValue,
   generateQueryURI,
 } = ChromeUtils.import("resource:///modules/ABQueryUtils.jsm");
-var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 var ACR = Ci.nsIAutoCompleteResult;
 var nsIAbAutoCompleteResult = Ci.nsIAbAutoCompleteResult;
 
 function nsAbAutoCompleteResult(aSearchString) {
   // Can't create this in the prototype as we'd get the same array for
   // all instances
   this._searchResults = []; // final results
   this.searchString = aSearchString;
-  this._collectedValues = new Map();  // temporary unsorted results
+  this._collectedValues = new Map(); // temporary unsorted results
   // Get model query from pref; this will return mail.addr_book.autocompletequery.format.phonetic
   // if mail.addr_book.show_phonetic_fields == true
   this.modelQuery = getModelQuery("mail.addr_book.autocompletequery.format");
   // check if the currently active model query has been modified by user
-  this._modelQueryHasUserValue = modelQueryHasUserValue("mail.addr_book.autocompletequery.format");
+  this._modelQueryHasUserValue = modelQueryHasUserValue(
+    "mail.addr_book.autocompletequery.format"
+  );
 }
 
 nsAbAutoCompleteResult.prototype = {
   _searchResults: null,
 
   // nsIAutoCompleteResult
 
   modelQuery: null,
@@ -62,18 +68,17 @@ nsAbAutoCompleteResult.prototype = {
   getImageAt(aIndex) {
     return "";
   },
 
   getFinalCompleteValueAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  removeValueAt(aRowIndex, aRemoveFromDB) {
-  },
+  removeValueAt(aRowIndex, aRemoveFromDB) {},
 
   // nsIAbAutoCompleteResult
 
   getCardAt(aIndex) {
     return this._searchResults[aIndex].card;
   },
 
   getEmailToUse(aIndex) {
@@ -114,18 +119,19 @@ nsAbAutoCompleteSearch.prototype = {
     let popularityIndex = parseInt(popularityValue);
 
     // If we haven't parsed it the first time round, parse it as hexadecimal
     // and repair so that we don't have to keep repairing.
     if (isNaN(popularityIndex)) {
       popularityIndex = parseInt(popularityValue, 16);
 
       // If its still NaN, just give up, we shouldn't ever get here.
-      if (isNaN(popularityIndex))
+      if (isNaN(popularityIndex)) {
         popularityIndex = 0;
+      }
 
       // Now store this change so that we're not changing it each time around.
       if (!aDirectory.readOnly) {
         aCard.setProperty("PopularityIndex", popularityIndex);
         try {
           aDirectory.modifyCard(aCard);
         } catch (ex) {
           Cu.reportError(ex);
@@ -147,38 +153,45 @@ nsAbAutoCompleteSearch.prototype = {
    */
   _getScore(aCard, aAddress, aSearchString) {
     const BEST = 100;
 
     // We will firstly check if the search term provided by the user
     // is the nick name for the card or at least in the beginning of it.
     let nick = aCard.getProperty("NickName", "").toLocaleLowerCase();
     aSearchString = aSearchString.toLocaleLowerCase();
-    if (nick == aSearchString)
+    if (nick == aSearchString) {
       return BEST + 1;
-    if (nick.indexOf(aSearchString) == 0)
+    }
+    if (nick.indexOf(aSearchString) == 0) {
       return BEST;
+    }
 
     // We'll do this case-insensitively and ignore the domain.
     let atIdx = aAddress.lastIndexOf("@");
-    if (atIdx != -1) // mail lists don't have an @
+    if (atIdx != -1) {
+      // mail lists don't have an @
       aAddress = aAddress.substr(0, atIdx);
+    }
     let idx = aAddress.indexOf(aSearchString);
-    if (idx == 0)
+    if (idx == 0) {
       return BEST;
-    if (idx == -1)
+    }
+    if (idx == -1) {
       return 0;
+    }
 
     // We want to treat firstname, lastname and word boundary(ish) parts of
     // the email address the same. E.g. for "John Doe (:xx) <jd.who@example.com>"
     // all of these should score the same: "John", "Doe", "xx",
     // ":xx", "jd", "who".
     let prevCh = aAddress.charAt(idx - 1);
-    if (/[ :."'(\-_<&]/.test(prevCh))
+    if (/[ :."'(\-_<&]/.test(prevCh)) {
       return BEST;
+    }
 
     // The match was inside a word -> we don't care about the position.
     return 0;
   },
 
   /**
    * Searches cards in the given directory. If a card is matched (and isn't
    * a mailing list) then the function will add a result for each email address
@@ -186,40 +199,59 @@ nsAbAutoCompleteSearch.prototype = {
    *
    * @param searchQuery  The boolean search query to use.
    * @param directory    An nsIAbDirectory to search.
    * @param result       The result element to append results to.
    */
   _searchCards(searchQuery, directory, result) {
     let childCards;
     try {
-      childCards = this._abManager.getDirectory(directory.URI + searchQuery).childCards;
+      childCards = this._abManager.getDirectory(directory.URI + searchQuery)
+        .childCards;
     } catch (e) {
-      Cu.reportError("Error running addressbook query '" + searchQuery + "': " + e);
+      Cu.reportError(
+        "Error running addressbook query '" + searchQuery + "': " + e
+      );
       return;
     }
 
     // Cache this values to save going through xpconnect each time
     var commentColumn = this._commentColumn == 1 ? directory.dirName : "";
 
     // Now iterate through all the cards.
     while (childCards.hasMoreElements()) {
       var card = childCards.getNext();
 
       if (card instanceof Ci.nsIAbCard) {
         if (card.isMailList) {
           this._addToResult(commentColumn, directory, card, "", true, result);
         } else {
           let email = card.primaryEmail;
-          if (email)
-            this._addToResult(commentColumn, directory, card, email, true, result);
+          if (email) {
+            this._addToResult(
+              commentColumn,
+              directory,
+              card,
+              email,
+              true,
+              result
+            );
+          }
 
           email = card.getProperty("SecondEmail", "");
-          if (email)
-            this._addToResult(commentColumn, directory, card, email, false, result);
+          if (email) {
+            this._addToResult(
+              commentColumn,
+              directory,
+              card,
+              email,
+              false,
+              result
+            );
+          }
         }
       }
     }
   },
 
   /**
    * Checks the parent card and email address of an autocomplete results entry
    * from a previous result against the search parameters to see if that entry
@@ -236,45 +268,51 @@ nsAbAutoCompleteSearch.prototype = {
     // search query can be fired on all of them at once. Separating them
     // using spaces so that field1=> "abc" and field2=> "def" on joining
     // shouldn't return true on search for "bcd".
     // Note: This should be constructed from model query pref using
     // getModelQuery("mail.addr_book.autocompletequery.format")
     // but for now we hard-code the default value equivalent of the pref here
     // or else bail out before and reconstruct the full c++ query if the pref
     // has been customized (modelQueryHasUserValue), so that we won't get here.
-    let cumulativeFieldText = aCard.displayName + " " +
-                              aCard.firstName + " " +
-                              aCard.lastName + " " +
-                              aEmailToUse + " " +
-                              aCard.getProperty("NickName", "");
-    if (aCard.isMailList)
+    let cumulativeFieldText =
+      aCard.displayName +
+      " " +
+      aCard.firstName +
+      " " +
+      aCard.lastName +
+      " " +
+      aEmailToUse +
+      " " +
+      aCard.getProperty("NickName", "");
+    if (aCard.isMailList) {
       cumulativeFieldText += " " + aCard.getProperty("Notes", "");
+    }
     cumulativeFieldText = cumulativeFieldText.toLocaleLowerCase();
 
-    return aSearchWords.every(String.prototype.includes,
-                              cumulativeFieldText);
+    return aSearchWords.every(String.prototype.includes, cumulativeFieldText);
   },
 
   /**
    * Checks to see if an emailAddress (name/address) is a duplicate of an
    * existing entry already in the results. If the emailAddress is found, it
    * will remove the existing element if the popularity of the new card is
    * higher than the previous card.
    *
    * @param directory       The directory that the card is in.
    * @param card            The card that could be a duplicate.
    * @param lcEmailAddress  The emailAddress (name/address combination) to check
    *                        for duplicates against. Lowercased.
    * @param currentResults  The current results list.
    */
   _checkDuplicate(directory, card, lcEmailAddress, currentResults) {
     let existingResult = currentResults._collectedValues.get(lcEmailAddress);
-    if (!existingResult)
+    if (!existingResult) {
       return false;
+    }
 
     let popIndex = this._getPopularityIndex(directory, card);
     // It's a duplicate, is the new one more popular?
     if (popIndex > existingResult.popularity) {
       // Yes it is, so delete this element, return false and allow
       // _addToResult to sort the new element into the correct place.
       currentResults._collectedValues.delete(lcEmailAddress);
       return false;
@@ -293,30 +331,42 @@ nsAbAutoCompleteSearch.prototype = {
    * @param directory      The directory that the card is in.
    * @param card           The card being added to the results.
    * @param emailToUse     The email address from the card that should be used
    *                       for this result.
    * @param isPrimaryEmail Is the emailToUse the primary email? Set to true if
    *                       it is the case. For mailing lists set it to true.
    * @param result         The result to add the new entry to.
    */
-  _addToResult(commentColumn, directory, card, emailToUse, isPrimaryEmail, result) {
-    let mbox = this._parser.makeMailboxObject(card.displayName,
-      card.isMailList ? card.getProperty("Notes", "") || card.displayName :
-                        emailToUse);
-    if (!mbox.email)
+  _addToResult(
+    commentColumn,
+    directory,
+    card,
+    emailToUse,
+    isPrimaryEmail,
+    result
+  ) {
+    let mbox = this._parser.makeMailboxObject(
+      card.displayName,
+      card.isMailList
+        ? card.getProperty("Notes", "") || card.displayName
+        : emailToUse
+    );
+    if (!mbox.email) {
       return;
+    }
 
     let emailAddress = mbox.toString();
     let lcEmailAddress = emailAddress.toLocaleLowerCase();
 
     // If it is a duplicate, then just return and don't add it. The
     // _checkDuplicate function deals with it all for us.
-    if (this._checkDuplicate(directory, card, lcEmailAddress, result))
+    if (this._checkDuplicate(directory, card, lcEmailAddress, result)) {
       return;
+    }
 
     result._collectedValues.set(lcEmailAddress, {
       value: emailAddress,
       comment: commentColumn,
       card,
       isPrimaryEmail,
       emailToUse,
       popularity: this._getPopularityIndex(directory, card),
@@ -332,17 +382,17 @@ nsAbAutoCompleteSearch.prototype = {
    * @see nsIAutoCompleteSearch for parameter details.
    *
    * It is expected that aSearchParam contains the identity (if any) to use
    * for determining if an address book should be autocompleted against.
    */
   startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) {
     let params = aSearchParam ? JSON.parse(aSearchParam) : {};
     var result = new nsAbAutoCompleteResult(aSearchString);
-    if (("type" in params) && !this.applicableHeaders.has(params.type)) {
+    if ("type" in params && !this.applicableHeaders.has(params.type)) {
       result.searchResult = ACR.RESULT_IGNORED;
       aListener.onSearchResult(this, result);
       return;
     }
 
     let fullString = aSearchString && aSearchString.trim().toLocaleLowerCase();
 
     // If the search string is empty, or contains a comma, or the user
@@ -357,23 +407,28 @@ nsAbAutoCompleteSearch.prototype = {
     }
 
     // Array of all the terms from the fullString search query
     // (separated on the basis of spaces or exact terms on the
     // basis of quotes).
     let searchWords = getSearchTokens(fullString);
 
     // Find out about the comment column
-    this._commentColumn = Services.prefs.getIntPref("mail.autoComplete.commentColumn", 0);
+    this._commentColumn = Services.prefs.getIntPref(
+      "mail.autoComplete.commentColumn",
+      0
+    );
 
-    if (aPreviousResult instanceof nsIAbAutoCompleteResult &&
-        aSearchString.startsWith(aPreviousResult.searchString) &&
-        aPreviousResult.searchResult == ACR.RESULT_SUCCESS &&
-        !result._modelQueryHasUserValue &&
-        result.modelQuery == aPreviousResult.modelQuery) {
+    if (
+      aPreviousResult instanceof nsIAbAutoCompleteResult &&
+      aSearchString.startsWith(aPreviousResult.searchString) &&
+      aPreviousResult.searchResult == ACR.RESULT_SUCCESS &&
+      !result._modelQueryHasUserValue &&
+      result.modelQuery == aPreviousResult.modelQuery
+    ) {
       // We have successful previous matches, and model query has not changed since
       // previous search, therefore just iterate through the list of previous result
       // entries and reduce as appropriate (via _checkEntry function).
       // Test for model query change is required: when reverting back from custom to
       // default query, result._modelQueryHasUserValue==false, but we must bail out.
       // Todo: However, if autocomplete model query has been customized, we fall
       // back to using the full query again instead of reducing result list in js;
       // The full query might be less performant as it's fired against entire AB,
@@ -384,22 +439,24 @@ nsAbAutoCompleteSearch.prototype = {
         let card = aPreviousResult.getCardAt(i);
         let email = aPreviousResult.getEmailToUse(i);
         if (this._checkEntry(card, email, searchWords)) {
           // Add matches into the results array. We re-sort as needed later.
           result._searchResults.push({
             value: aPreviousResult.getValueAt(i),
             comment: aPreviousResult.getCommentAt(i),
             card,
-            isPrimaryEmail: (card.primaryEmail == email),
+            isPrimaryEmail: card.primaryEmail == email,
             emailToUse: email,
             popularity: parseInt(card.getProperty("PopularityIndex", "0")),
-            score: this._getScore(card,
+            score: this._getScore(
+              card,
               aPreviousResult.getValueAt(i).toLocaleLowerCase(),
-              fullString),
+              fullString
+            ),
           });
         }
       }
     } else {
       // Construct the search query from pref; using a query means we can
       // optimise on running the search through c++ which is better for string
       // comparisons (_checkEntry is relatively slow).
       // When user's fullstring search expression is a multiword query, search
@@ -415,47 +472,50 @@ nsAbAutoCompleteSearch.prototype = {
       let allABs = this._abManager.directories;
 
       // We're not going to bother searching sub-directories, currently the
       // architecture forces all cards that are in mailing lists to be in ABs as
       // well, therefore by searching sub-directories (aka mailing lists) we're
       // just going to find duplicates.
       while (allABs.hasMoreElements()) {
         let dir = allABs.getNext();
-        if (dir instanceof Ci.nsIAbDirectory &&
-            dir.useForAutocomplete(("idKey" in params) ? params.idKey : null)) {
+        if (
+          dir instanceof Ci.nsIAbDirectory &&
+          dir.useForAutocomplete("idKey" in params ? params.idKey : null)
+        ) {
           this._searchCards(searchQuery, dir, result);
         }
       }
 
       result._searchResults = [...result._collectedValues.values()];
     }
 
     // Sort the results. Scoring may have changed so do it even if this is
     // just filtered previous results.
     result._searchResults.sort(function(a, b) {
       // Order by 1) descending score, then 2) descending popularity,
       // then 3) primary email before secondary for the same card, then
       // 4) by emails sorted alphabetically.
-      return (b.score - a.score) ||
-             (b.popularity - a.popularity) ||
-             ((a.card == b.card && a.isPrimaryEmail) ? -1 : 0) ||
-             a.value.localeCompare(b.value);
+      return (
+        b.score - a.score ||
+        b.popularity - a.popularity ||
+        (a.card == b.card && a.isPrimaryEmail ? -1 : 0) ||
+        a.value.localeCompare(b.value)
+      );
     });
 
     if (result.matchCount) {
       result.searchResult = ACR.RESULT_SUCCESS;
       result.defaultIndex = 0;
     }
 
     aListener.onSearchResult(this, result);
   },
 
-  stopSearch() {
-  },
+  stopSearch() {},
 
   // nsISupports
 
   QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch]),
 };
 
 // Module
 
--- a/mailnews/addrbook/src/nsAbLDAPAttributeMap.js
+++ b/mailnews/addrbook/src/nsAbLDAPAttributeMap.js
@@ -1,19 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 var NS_ABLDAPATTRIBUTEMAP_CID = Components.ID(
-  "{127b341a-bdda-4270-85e1-edff569a9b85}");
+  "{127b341a-bdda-4270-85e1-edff569a9b85}"
+);
 var NS_ABLDAPATTRIBUTEMAPSERVICE_CID = Components.ID(
-  "{4ed7d5e1-8800-40da-9e78-c4f509d7ac5e}");
+  "{4ed7d5e1-8800-40da-9e78-c4f509d7ac5e}"
+);
 
 function nsAbLDAPAttributeMap() {
   this.mPropertyMap = {};
   this.mAttrMap = {};
 }
 
 nsAbLDAPAttributeMap.prototype = {
   classID: NS_ABLDAPATTRIBUTEMAP_CID,
@@ -126,34 +130,37 @@ nsAbLDAPAttributeMap.prototype = {
 
   setCardPropertiesFromLDAPMessage(aMessage, aCard) {
     var cardValueWasSet = false;
 
     var msgAttrCount = {};
     var msgAttrs = aMessage.getAttributes(msgAttrCount);
 
     // downcase the array for comparison
-    function toLower(a) { return a.toLowerCase(); }
+    function toLower(a) {
+      return a.toLowerCase();
+    }
     msgAttrs = msgAttrs.map(toLower);
 
     // deal with each addressbook property
     for (var prop in this.mPropertyMap) {
       // go through the list of possible attrs in precedence order
       for (var attr of this.mPropertyMap[prop]) {
         attr = attr.toLowerCase();
 
         // find the first attr that exists in this message
         if (msgAttrs.includes(attr)) {
           try {
             var values = aMessage.getValues(attr, {});
             // strip out the optional label from the labeledURI
             if (attr == "labeleduri" && values[0]) {
               var index = values[0].indexOf(" ");
-              if (index != -1)
+              if (index != -1) {
                 values[0] = values[0].substring(0, index);
+              }
             }
             aCard.setProperty(prop, values[0]);
 
             cardValueWasSet = true;
             break;
           } catch (ex) {
             // ignore any errors getting message values or setting card values
           }
@@ -186,21 +193,19 @@ nsAbLDAPAttributeMap.prototype = {
         attrsSeen.push(attr);
       }
     }
   },
 
   QueryInterface: ChromeUtils.generateQI([Ci.nsIAbLDAPAttributeMap]),
 };
 
-function nsAbLDAPAttributeMapService() {
-}
+function nsAbLDAPAttributeMapService() {}
 
 nsAbLDAPAttributeMapService.prototype = {
-
   classID: NS_ABLDAPATTRIBUTEMAPSERVICE_CID,
 
   mAttrMaps: {},
 
   getMapForPrefBranch(aPrefBranchName) {
     // if we've already got this map, return it
     if (aPrefBranchName in this.mAttrMaps) {
       return this.mAttrMaps[aPrefBranchName];
@@ -216,10 +221,12 @@ nsAbLDAPAttributeMapService.prototype = 
 
     // and return
     return attrMap;
   },
 
   QueryInterface: ChromeUtils.generateQI([Ci.nsIAbLDAPAttributeMapService]),
 };
 
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsAbLDAPAttributeMap, nsAbLDAPAttributeMapService]);
-
+var NSGetFactory = XPCOMUtils.generateNSGetFactory([
+  nsAbLDAPAttributeMap,
+  nsAbLDAPAttributeMapService,
+]);
--- a/mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
+++ b/mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
@@ -1,21 +1,24 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
-var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
+var { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 var ACR = Ci.nsIAutoCompleteResult;
 var nsIAbAutoCompleteResult = Ci.nsIAbAutoCompleteResult;
-var nsIAbDirectoryQueryResultListener =
-  Ci.nsIAbDirectoryQueryResultListener;
+var nsIAbDirectoryQueryResultListener = Ci.nsIAbDirectoryQueryResultListener;
 
 // nsAbLDAPAutoCompleteResult
 // Derived from nsIAbAutoCompleteResult, provides a LDAP specific result
 // implementation.
 
 function nsAbLDAPAutoCompleteResult(aSearchString) {
   // Can't create this in the prototype as we'd get the same array for
   // all instances
@@ -46,46 +49,45 @@ nsAbLDAPAutoCompleteResult.prototype = {
     return this._searchResults[aIndex].value;
   },
 
   getCommentAt(aIndex) {
     return this._commentColumn;
   },
 
   getStyleAt(aIndex) {
-    return this.searchResult == ACR.RESULT_FAILURE ? "remote-err" :
-                                                     "remote-abook";
+    return this.searchResult == ACR.RESULT_FAILURE
+      ? "remote-err"
+      : "remote-abook";
   },
 
   getImageAt(aIndex) {
     return "";
   },
 
   getFinalCompleteValueAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  removeValueAt(aRowIndex, aRemoveFromDB) {
-  },
+  removeValueAt(aRowIndex, aRemoveFromDB) {},
 
   // nsIAbAutoCompleteResult
 
   getCardAt(aIndex) {
     return this._searchResults[aIndex].card;
   },
 
   // nsISupports
 
   QueryInterface: ChromeUtils.generateQI([ACR, nsIAbAutoCompleteResult]),
 };
 
 function nsAbLDAPAutoCompleteSearch() {
   Services.obs.addObserver(this, "quit-application");
-  this._timer = Cc["@mozilla.org/timer;1"]
-                  .createInstance(Ci.nsITimer);
+  this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
 }
 
 nsAbLDAPAutoCompleteSearch.prototype = {
   // For component registration
   classID: Components.ID("227e6482-fe9f-441f-9b7d-7b60375e7449"),
 
   // A short-lived LDAP directory cache.
   // To avoid recreating components as the user completes, we maintain the most
@@ -113,36 +115,44 @@ nsAbLDAPAutoCompleteSearch.prototype = {
     var lcEmailAddress = emailAddress.toLocaleLowerCase();
 
     return this._result._searchResults.some(function(result) {
       return result.value.toLocaleLowerCase() == lcEmailAddress;
     });
   },
 
   _addToResult(card) {
-    let mbox = this._parser.makeMailboxObject(card.displayName,
-      card.isMailList ? card.getProperty("Notes", "") || card.displayName :
-                        card.primaryEmail);
-    if (!mbox.email)
+    let mbox = this._parser.makeMailboxObject(
+      card.displayName,
+      card.isMailList
+        ? card.getProperty("Notes", "") || card.displayName
+        : card.primaryEmail
+    );
+    if (!mbox.email) {
       return;
+    }
 
     let emailAddress = mbox.toString();
 
     // If it is a duplicate, then just return and don't add it. The
     // _checkDuplicate function deals with it all for us.
-    if (this._checkDuplicate(card, emailAddress))
+    if (this._checkDuplicate(card, emailAddress)) {
       return;
+    }
 
     // Find out where to insert the card.
     var insertPosition = 0;
 
     // Next sort on full address
-    while (insertPosition < this._result._searchResults.length &&
-           emailAddress > this._result._searchResults[insertPosition].value)
+    while (
+      insertPosition < this._result._searchResults.length &&
+      emailAddress > this._result._searchResults[insertPosition].value
+    ) {
       ++insertPosition;
+    }
 
     this._result._searchResults.splice(insertPosition, 0, {
       value: emailAddress,
       card,
     });
   },
 
   // nsIObserver
@@ -162,17 +172,18 @@ nsAbLDAPAutoCompleteSearch.prototype = {
     this._query = null;
     this._attributes = null;
   },
 
   // nsIAutoCompleteSearch
 
   startSearch(aSearchString, aParam, aPreviousResult, aListener) {
     let params = JSON.parse(aParam) || {};
-    let applicable = !("type" in params) || this.applicableHeaders.has(params.type);
+    let applicable =
+      !("type" in params) || this.applicableHeaders.has(params.type);
 
     this._result = new nsAbLDAPAutoCompleteResult(aSearchString);
     aSearchString = aSearchString.toLocaleLowerCase();
 
     // If the search string isn't value, or contains a comma, or the user
     // hasn't enabled autocomplete, then just return no matches / or the
     // result ignored.
     // The comma check is so that we don't autocomplete against the user
@@ -187,97 +198,129 @@ nsAbLDAPAutoCompleteSearch.prototype = {
     // use that, otherwise, try the global preference instead.
     var acDirURI = null;
     var identity;
 
     if ("idKey" in params) {
       try {
         identity = MailServices.accounts.getIdentity(params.idKey);
       } catch (ex) {
-        Cu.reportError("Couldn't get specified identity, " +
-                       "falling back to global settings");
+        Cu.reportError(
+          "Couldn't get specified identity, " +
+            "falling back to global settings"
+        );
       }
     }
 
     // Does the current identity override the global preference?
     if (identity && identity.overrideGlobalPref) {
       acDirURI = identity.directoryServer;
     } else if (Services.prefs.getBoolPref("ldap_2.autoComplete.useDirectory")) {
       // Try the global one
-      acDirURI = Services.prefs.getCharPref("ldap_2.autoComplete.directoryServer");
+      acDirURI = Services.prefs.getCharPref(
+        "ldap_2.autoComplete.directoryServer"
+      );
     }
 
     if (!acDirURI || Services.io.offline) {
       // No directory to search or we are offline, send a no match and return.
       aListener.onSearchResult(this, this._result);
       return;
     }
 
     this.stopSearch();
 
     // If we don't already have a cached query for this URI, build a new one.
     acDirURI = "moz-abldapdirectory://" + acDirURI;
     if (!this._book || this._book.URI != acDirURI) {
-      this._query =
-        Cc["@mozilla.org/addressbook/ldap-directory-query;1"]
-          .createInstance(Ci.nsIAbDirectoryQuery);
-      this._book = MailServices.ab.getDirectory(acDirURI)
-                                  .QueryInterface(Ci.nsIAbLDAPDirectory);
+      this._query = Cc[
+        "@mozilla.org/addressbook/ldap-directory-query;1"
+      ].createInstance(Ci.nsIAbDirectoryQuery);
+      this._book = MailServices.ab
+        .getDirectory(acDirURI)
+        .QueryInterface(Ci.nsIAbLDAPDirectory);
 
       // Create a minimal map just for the display name and primary email.
-      this._attributes =
-        Cc["@mozilla.org/addressbook/ldap-attribute-map;1"]
-          .createInstance(Ci.nsIAbLDAPAttributeMap);
-      this._attributes.setAttributeList("DisplayName",
-        this._book.attributeMap.getAttributeList("DisplayName", {}), true);
-      this._attributes.setAttributeList("PrimaryEmail",
-        this._book.attributeMap.getAttributeList("PrimaryEmail", {}), true);
+      this._attributes = Cc[
+        "@mozilla.org/addressbook/ldap-attribute-map;1"
+      ].createInstance(Ci.nsIAbLDAPAttributeMap);
+      this._attributes.setAttributeList(
+        "DisplayName",
+        this._book.attributeMap.getAttributeList("DisplayName", {}),
+        true
+      );
+      this._attributes.setAttributeList(
+        "PrimaryEmail",
+        this._book.attributeMap.getAttributeList("PrimaryEmail", {}),
+        true
+      );
     }
 
     this._result._commentColumn = this._book.dirName;
     this._listener = aListener;
     this._timer.init(this, 60000, Ci.nsITimer.TYPE_ONE_SHOT);
 
-    var args =
-      Cc["@mozilla.org/addressbook/directory/query-arguments;1"]
-        .createInstance(Ci.nsIAbDirectoryQueryArguments);
+    var args = Cc[
+      "@mozilla.org/addressbook/directory/query-arguments;1"
+    ].createInstance(Ci.nsIAbDirectoryQueryArguments);
 
-    var filterTemplate = this._book.getStringValue("autoComplete.filterTemplate", "");
+    var filterTemplate = this._book.getStringValue(
+      "autoComplete.filterTemplate",
+      ""
+    );
 
     // Use default value when preference is not set or it contains empty string
-    if (!filterTemplate)
+    if (!filterTemplate) {
       filterTemplate = "(|(cn=%v1*%v2-*)(mail=%v1*%v2-*)(sn=%v1*%v2-*))";
+    }
 
     // Create filter from filter template and search string
-    var ldapSvc = Cc["@mozilla.org/network/ldap-service;1"]
-                    .getService(Ci.nsILDAPService);
-    var filter = ldapSvc.createFilter(1024, filterTemplate, "", "", "", aSearchString);
-    if (!filter)
-      throw new Error("Filter string is empty, check if filterTemplate variable is valid in prefs.js.");
+    var ldapSvc = Cc["@mozilla.org/network/ldap-service;1"].getService(
+      Ci.nsILDAPService
+    );
+    var filter = ldapSvc.createFilter(
+      1024,
+      filterTemplate,
+      "",
+      "",
+      "",
+      aSearchString
+    );
+    if (!filter) {
+      throw new Error(
+        "Filter string is empty, check if filterTemplate variable is valid in prefs.js."
+      );
+    }
     args.typeSpecificArg = this._attributes;
     args.querySubDirectories = true;
     args.filter = filter;
 
     // Start the actual search
-    this._context =
-      this._query.doQuery(this._book, args, this, this._book.maxHits, 0);
+    this._context = this._query.doQuery(
+      this._book,
+      args,
+      this,
+      this._book.maxHits,
+      0
+    );
   },
 
   stopSearch() {
     if (this._listener) {
       this._query.stopQuery(this._context);
       this._listener = null;
     }
   },
 
   // nsIAbDirSearchListener
 
   onSearchFinished(aResult, aErrorMsg) {
-    if (!this._listener)
+    if (!this._listener) {
       return;
+    }
 
     if (aResult == nsIAbDirectoryQueryResultListener.queryResultComplete) {
       if (this._result.matchCount) {
         this._result.searchResult = ACR.RESULT_SUCCESS;
         this._result.defaultIndex = 0;
       } else {
         this._result.searchResult = ACR.RESULT_NOMATCH;
       }
@@ -287,33 +330,38 @@ nsAbLDAPAutoCompleteSearch.prototype = {
     }
     //    const long queryResultStopped  = 2;
     //    const long queryResultError    = 3;
     this._listener.onSearchResult(this, this._result);
     this._listener = null;
   },
 
   onSearchFoundCard(aCard) {
-    if (!this._listener)
+    if (!this._listener) {
       return;
+    }
 
     this._addToResult(aCard);
 
     /* XXX autocomplete doesn't expect you to rearrange while searching
     if (this._result.matchCount)
       this._result.searchResult = ACR.RESULT_SUCCESS_ONGOING;
     else
       this._result.searchResult = ACR.RESULT_NOMATCH_ONGOING;
 
     this._listener.onSearchResult(this, this._result);
     */
   },
 
   // nsISupports
 
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
-                                          Ci.nsIAutoCompleteSearch,
-                                          Ci.nsIAbDirSearchListener]),
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsIObserver,
+    Ci.nsIAutoCompleteSearch,
+    Ci.nsIAbDirSearchListener,
+  ]),
 };
 
 // Module
 
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsAbLDAPAutoCompleteSearch]);
+var NSGetFactory = XPCOMUtils.generateNSGetFactory([
+  nsAbLDAPAutoCompleteSearch,
+]);
--- a/mailnews/addrbook/test/unit/head_addrbook.js
+++ b/mailnews/addrbook/test/unit/head_addrbook.js
@@ -1,11 +1,15 @@
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
-var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
+var { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 var CC = Components.Constructor;
 
 // Ensure the profile directory is set up
 do_get_profile();
 
 // Import the required setup scripts.
 /* import-globals-from ../../../test/resources/abSetup.js */
--- a/mailnews/addrbook/test/unit/head_jsaddrbook.js
+++ b/mailnews/addrbook/test/unit/head_jsaddrbook.js
@@ -1,11 +1,15 @@
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
-var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { MailServices } = ChromeUtils.import(
+  "resource:///modules/MailServices.jsm"
+);
+var { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 // Ensure the profile directory is set up
 do_get_profile();
 
 // What follows is a copy of abSetup.js modified for tests with the
 // JS directory provider. We don't yet make the personal address book
 // and collected addresses book with this provider, so add two new
 // directories and pretend they are the original ones.
@@ -46,20 +50,22 @@ Services.prefs.deleteBranch("ldap_2.serv
 var kNormalPropertiesURI =
   "chrome://messenger/content/addressbook/abAddressBookNameDialog.xul";
 
 function loadABFile(source, dest) {
   let sourceFile = do_get_file(`${source}.sql`);
   let destFile = do_get_profile();
   destFile.append(kPABData.fileName);
 
-  let fstream = Cc["@mozilla.org/network/file-input-stream;1"]
-                  .createInstance(Ci.nsIFileInputStream);
-  let cstream = Cc["@mozilla.org/intl/converter-input-stream;1"]
-                  .createInstance(Ci.nsIConverterInputStream);
+  let fstream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(
+    Ci.nsIFileInputStream
+  );
+  let cstream = Cc["@mozilla.org/intl/converter-input-stream;1"].createInstance(
+    Ci.nsIConverterInputStream
+  );
   fstream.init(sourceFile, -1, 0, 0);
   cstream.init(fstream, "UTF-8", 0, 0);
 
   let data = "";
   let read = 0;
   do {
     let str = {};
     read = cstream.readString(0xffffffff, str);
--- a/mailnews/addrbook/test/unit/test_basic_nsIAbCard.js
+++ b/mailnews/addrbook/test/unit/test_basic_nsIAbCard.js
@@ -11,18 +11,19 @@ var kEmailValue = "testEmail\u00D2@foo.i
 var kEmailValueLC = "testemail\u00D2@foo.invalid";
 var kEmailValue2 = "test@test.foo.invalid";
 // Email without the @ or anything after it.
 var kEmailReducedValue = "testEmail\u00D2";
 var kCompanyValue = "Test\u00D0 Company";
 
 function run_test() {
   // Create a new card
-  var card = Cc["@mozilla.org/addressbook/cardproperty;1"]
-               .createInstance(Ci.nsIAbCard);
+  var card = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance(
+    Ci.nsIAbCard
+  );
 
   // Test - Set First, Last and Display Names and Email Address
   // via setProperty, and check correctly saved via their
   // attributes. We're using firstName to check UTF-8 values.
   card.setProperty("FirstName", kFNValue);
   card.setProperty("LastName", kLNValue);
   card.setProperty("DisplayName", kDNValue);
   card.setProperty("PrimaryEmail", kEmailValue);
@@ -86,17 +87,19 @@ function run_test() {
   Assert.equal(card.generateName(2), "");
 
   // Test - generateNameWithBundle, most of this will have
   // been tested above.
 
   card.firstName = kFNValue;
   card.lastName = kLNValue;
 
-  let bundle = Services.strings.createBundle("chrome://messenger/locale/addressbook/addressBook.properties");
+  let bundle = Services.strings.createBundle(
+    "chrome://messenger/locale/addressbook/addressBook.properties"
+  );
 
   Assert.equal(card.generateName(1, bundle), kLNValue + ", " + kFNValue);
 
   // Test - generatePhoneticName
 
   card.setProperty("PhoneticFirstName", kFNValue);
   card.setProperty("PhoneticLastName", kLNValue);
   Assert.equal(card.generatePhoneticName(false), kFNValue + kLNValue);
--- a/mailnews/addrbook/test/unit/test_basic_nsIAbDirectory.js
+++ b/mailnews/addrbook/test/unit/test_basic_nsIAbDirectory.js
@@ -28,18 +28,19 @@
 // collected books work correctly in an easy manner.
 function check_ab(abConfig) {
   // Test - Get the directory
 
   let AB = MailServices.ab.getDirectory(abConfig.URI);
 
   // Test - Is it the right type?
 
-  if (abConfig.dirType == 2)
+  if (abConfig.dirType == 2) {
     Assert.ok(AB instanceof Ci.nsIAbMDBDirectory);
+  }
 
   // Test - Check attributes
 
   Assert.equal(AB.generateName(0), abConfig.dirName);
   Assert.equal(AB.propertiesChromeURI, kNormalPropertiesURI);
   Assert.equal(AB.readOnly, abConfig.readOnly);
   Assert.equal(AB.dirName, abConfig.dirName);
   Assert.equal(AB.dirType, abConfig.dirType);
@@ -67,42 +68,55 @@ function check_ab(abConfig) {
 
   // Test - check getting default preferences
 
   Assert.equal(AB.getIntValue("random", 54321), 54321);
   Assert.equal(AB.getBoolValue("random", false), false);
   Assert.equal(AB.getStringValue("random", "abc"), "abc");
   Assert.equal(AB.getLocalizedStringValue("random", "xyz"), "xyz");
 
-
   // Test - check get/set int preferences on nsIAbDirectory
 
   AB.setIntValue("inttest", 12345);
-  Assert.equal(Services.prefs.getIntPref(abConfig.dirPrefID + ".inttest"), 12345);
+  Assert.equal(
+    Services.prefs.getIntPref(abConfig.dirPrefID + ".inttest"),
+    12345
+  );
   Assert.equal(AB.getIntValue("inttest", -1), 12345);
 
   AB.setIntValue("inttest", 123456);
-  Assert.equal(Services.prefs.getIntPref(abConfig.dirPrefID + ".inttest"), 123456);
+  Assert.equal(
+    Services.prefs.getIntPref(abConfig.dirPrefID + ".inttest"),
+    123456
+  );
   Assert.equal(AB.getIntValue("inttest", -2), 123456);
 
   // Test - check get/set bool preferences on nsIAbDirectory
 
   AB.setBoolValue("booltest", true);
-  Assert.equal(Services.prefs.getBoolPref(abConfig.dirPrefID + ".booltest"), true);
+  Assert.equal(
+    Services.prefs.getBoolPref(abConfig.dirPrefID + ".booltest"),
+    true
+  );
   Assert.equal(AB.getBoolValue("booltest", false), true);
 
   AB.setBoolValue("booltest", false);
-  Assert.equal(Services.prefs.getBoolPref(abConfig.dirPrefID + ".booltest"), false);
+  Assert.equal(
+    Services.prefs.getBoolPref(abConfig.dirPrefID + ".booltest"),
+    false
+  );
   Assert.equal(AB.getBoolValue("booltest", true), false);
 
-
   // Test - check get/set string preferences on nsIAbDirectory
 
   AB.setStringValue("stringtest", "tyu");
-  Assert.equal(Services.prefs.getCharPref(abConfig.dirPrefID + ".stringtest"), "tyu");
+  Assert.equal(
+    Services.prefs.getCharPref(abConfig.dirPrefID + ".stringtest"),
+    "tyu"
+  );
   Assert.equal(AB.getStringValue("stringtest", ""), "tyu");
 }
 
 function run_test() {
   // Check the default personal address book
   check_ab(kPABData);
 
   // Check the default collected address book
--- a/mailnews/addrbook/test/unit/test_bug1522453.js
+++ b/mailnews/addrbook/test/unit/test_bug1522453.js
@@ -1,33 +1,41 @@
 function run_test() {
   do_get_profile();
   MailServices.ab.directories;
   let book = MailServices.ab.getDirectory(kPABData.URI);
 
-  let list = Cc["@mozilla.org/addressbook/directoryproperty;1"].createInstance(Ci.nsIAbDirectory);
+  let list = Cc["@mozilla.org/addressbook/directoryproperty;1"].createInstance(
+    Ci.nsIAbDirectory
+  );
   list.isMailList = true;
   list.dirName = "list";
   list = book.addMailList(list);
 
-  let contact1 = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance(Ci.nsIAbCard);
+  let contact1 = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance(
+    Ci.nsIAbCard
+  );
   contact1.firstName = "contact";
   contact1.lastName = "1";
   contact1.primaryEmail = "contact1@invalid";
   contact1 = book.addCard(contact1);
   list.addCard(contact1);
 
-  let contact2 = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance(Ci.nsIAbCard);
+  let contact2 = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance(
+    Ci.nsIAbCard
+  );
   contact2.firstName = "contact";
   contact2.lastName = "2";
   // No email address!
   contact2 = book.addCard(contact2);
   list.addCard(contact2);
 
-  let contact3 = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance(Ci.nsIAbCard);
+  let contact3 = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance(
+    Ci.nsIAbCard
+  );
   contact3.firstName = "contact";
   contact3.lastName = "3";
   contact3.primaryEmail = "contact3@invalid";
   contact3 = book.addCard(contact3);
   list.addCard(contact3);
 
   // book.childCards should contain the list and all three contacts.
   let bookCards = book.childCards;
@@ -60,17 +68,19 @@ function run_test() {
   // Reload the address book manager.
   Services.obs.notifyObservers(null, "addrbook-reload");
 
   MailServices.ab.directories;
   book = MailServices.ab.getDirectory(kPABData.URI);
 
   // For some unknown reason this is necessary for book.addressLists to be populated.
   if (kPABData.dirType == 2) {
-    book.QueryInterface(Ci.nsIAbMDBDirectory).database.getMailingListsFromDB(book);
+    book
+      .QueryInterface(Ci.nsIAbMDBDirectory)
+      .database.getMailingListsFromDB(book);
     equal(1, book.addressLists.Count());
   }
   list = book.addressLists.GetElementAt(0).QueryInterface(Ci.nsIAbDirectory);
 
   // list.childCards should contain contacts 1 and 3.
   listCards = list.childCards;
   ok(listCards.hasMoreElements());
   equal(contact1.UID, listCards.getNext().QueryInterface(Ci.nsIAbCard).UID);
--- a/mailnews/addrbook/test/unit/test_bug387403.js
+++ b/mailnews/addrbook/test/unit/test_bug387403.js
@@ -1,10 +1,12 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /**
  * Test for bug 387403 crash when opening e-mail with broken vcard.
  */
 
 function run_test() {
   // Before bug 387403 this would hang, eating up all the memory until it
   // crashed.
-  MailServices.ab.escapedVCardToAbCard("begin:vcard\nfn;quoted-printable:Xxxx=C5=82xx  Xxx\nn;quoted-printable:Xxx;Xxxx=C5=82xx \nadr;quoted-printable;quoted-printable;dom:;;xx. Xxxxxxxxxxxx X;Xxxxxx=C3=3");
+  MailServices.ab.escapedVCardToAbCard(
+    "begin:vcard\nfn;quoted-printable:Xxxx=C5=82xx  Xxx\nn;quoted-printable:Xxx;Xxxx=C5=82xx \nadr;quoted-printable;quoted-printable;dom:;;xx. Xxxxxxxxxxxx X;Xxxxxx=C3=3"
+  );
 }
--- a/mailnews/addrbook/test/unit/test_bug448165.js
+++ b/mailnews/addrbook/test/unit/test_bug448165.js
@@ -3,14 +3,16 @@
  * nsAbMDBDirectory::DeleteCards if aCards is null
  */
 function run_test() {
   // get the Personal Address Book
   let pab = MailServices.ab.getDirectory(kPABData.URI);
   Assert.ok(pab instanceof Ci.nsIAbDirectory);
   try {
     pab.deleteCards(null); // this should throw an error
-    do_throw("Error, deleteCards should throw an error when null is passed to it");
+    do_throw(
+      "Error, deleteCards should throw an error when null is passed to it"
+    );
   } catch (e) {
     // make sure the correct error message was thrown
     Assert.equal(e.result, Cr.NS_ERROR_INVALID_POINTER);
   }
 }
--- a/mailnews/addrbook/test/unit/test_bug534822.js
+++ b/mailnews/addrbook/test/unit/test_bug534822.js
@@ -31,10 +31,12 @@ function run_test() {
     for (let i = 0; i < results.length; ++i) {
       if (results[i].name == dir.dirName) {
         Assert.ok(!results[i].result);
         results[i].result = true;
       }
     }
   }
 
-  results.forEach(function(result) { Assert.ok(result.result); });
+  results.forEach(function(result) {
+    Assert.ok(result.result);
+  });
 }
--- a/mailnews/addrbook/test/unit/test_cardForEmail.js
+++ b/mailnews/addrbook/test/unit/test_cardForEmail.js
@@ -10,17 +10,20 @@
 
 function check_correct_card(card) {
   Assert.notEqual(card, null);
 
   Assert.equal(card.firstName, "FirstName1");
   Assert.equal(card.lastName, "LastName1");
   Assert.equal(card.displayName, "DisplayName1");
   Assert.equal(card.primaryEmail, "PrimaryEmail1@test.invalid");
-  Assert.equal(card.getProperty("SecondEmail", "BAD"), "SecondEmail1\u00D0@test.invalid");
+  Assert.equal(
+    card.getProperty("SecondEmail", "BAD"),
+    "SecondEmail1\u00D0@test.invalid"
+  );
 }
 
 function run_test() {
   loadABFile("data/cardForEmail", kPABData.fileName);
 
   // Test - Get the directory
   let AB = MailServices.ab.getDirectory(kPABData.URI);
 
@@ -71,17 +74,17 @@ function run_test() {
   card = AB.getCardFromProperty("JobTitle", "jobtitle1", false);
   check_correct_card(card);
 
   var cards = AB.getCardsFromProperty("LastName", "DOE", true);
   Assert.ok(!cards.hasMoreElements());
 
   cards = AB.getCardsFromProperty("LastName", "Doe", true);
   var i = 0;
-  var data = [ "John", "Jane" ];
+  var data = ["John", "Jane"];
 
   while (cards.hasMoreElements()) {
     i++;
     card = cards.getNext().QueryInterface(Ci.nsIAbCard);
     Assert.equal(card.lastName, "Doe");
     var index = data.indexOf(card.firstName);
     Assert.notEqual(index, -1);
     delete data[index];
--- a/mailnews/addrbook/test/unit/test_collection.js
+++ b/mailnews/addrbook/test/unit/test_collection.js
@@ -14,318 +14,402 @@ var nsIAbPMF = Ci.nsIAbPreferMailFormat;
 
 // Source fields (emailHeader/mailFormat) and expected results for use for
 // testing the addition of new addresses to the database.
 //
 // Note: these email addresses should be different to allow collecting an
 // address to add a different card each time.
 var addEmailChecks =
   // First 3 items aimed at basic collection and mail format.
-  [ { emailHeader: "test0@foo.invalid",
+  [
+    {
+      emailHeader: "test0@foo.invalid",
       primaryEmail: "test0@foo.invalid",
       mailFormat: nsIAbPMF.unknown,
       displayName: "",
       firstName: "",
       lastName: "",
-      screenName: "" },
-    { emailHeader: "test1@foo.invalid",
+      screenName: "",
+    },
+    {
+      emailHeader: "test1@foo.invalid",
       primaryEmail: "test1@foo.invalid",
       mailFormat: nsIAbPMF.plaintext,
       displayName: "",
       firstName: "",
       lastName: "",
-      screenName: "" },
-    { emailHeader: "test2@foo.invalid",
+      screenName: "",
+    },
+    {
+      emailHeader: "test2@foo.invalid",
       primaryEmail: "test2@foo.invalid",
       mailFormat: nsIAbPMF.html,
       displayName: "",
       firstName: "",
       lastName: "",
-      screenName: "" },
+      screenName: "",
+    },
     // UTF-8 based addresses (bug 407564)
-    { emailHeader: "test0@\u00D0.invalid",
+    {
+      emailHeader: "test0@\u00D0.invalid",
       primaryEmail: "test0@\u00D0.invalid",
       mailFormat: nsIAbPMF.unknown,
       displayName: "",
       firstName: "",
       lastName: "",
-      screenName: "" },
-    { emailHeader: "test0\u00D0@foo.invalid",
+      screenName: "",
+    },
+    {
+      emailHeader: "test0\u00D0@foo.invalid",
       primaryEmail: "test0\u00D0@foo.invalid",
       mailFormat: nsIAbPMF.unknown,
       displayName: "",
       firstName: "",
       lastName: "",
-      screenName: "" },
+      screenName: "",
+    },
     // Screen names
-    { emailHeader: "invalid\u00D00@aol.com",
+    {
+      emailHeader: "invalid\u00D00@aol.com",
       primaryEmail: "invalid\u00D00@aol.com",
       mailFormat: nsIAbPMF.unknown,
       displayName: "",
       firstName: "",
       lastName: "",
-      screenName: "invalid\u00D00" },
-    { emailHeader: "invalid1\u00D00@cs.com",
+      screenName: "invalid\u00D00",
+    },
+    {
+      emailHeader: "invalid1\u00D00@cs.com",
       primaryEmail: "invalid1\u00D00@cs.com",
       mailFormat: nsIAbPMF.unknown,
       displayName: "",
       firstName: "",
       lastName: "",
-      screenName: "invalid1\u00D00" },
-    { emailHeader: "invalid2\u00D00@netscape.net",
+      screenName: "invalid1\u00D00",
+    },
+    {
+      emailHeader: "invalid2\u00D00@netscape.net",
       primaryEmail: "invalid2\u00D00@netscape.net",
       mailFormat: nsIAbPMF.unknown,
       displayName: "",
       firstName: "",
       lastName: "",
-      screenName: "invalid2\u00D00" },
+      screenName: "invalid2\u00D00",
+    },
     // Collection of names
-    { emailHeader: "Test User <test3@foo.invalid>",
+    {
+      emailHeader: "Test User <test3@foo.invalid>",
       primaryEmail: "test3@foo.invalid",
       mailFormat: nsIAbPMF.unknown,
       displayName: "Test User",
       firstName: "Test",
       lastName: "User",
-      screenName: "" },
-    { emailHeader: "Test <test4@foo.invalid>",
+      screenName: "",
+    },
+    {
+      emailHeader: "Test <test4@foo.invalid>",
       primaryEmail: "test4@foo.invalid",
       mailFormat: nsIAbPMF.unknown,
       displayName: "Test",
       firstName: "",
       lastName: "",
-      screenName: "" },
+      screenName: "",
+    },
     // Collection of names with UTF-8 specific items
-    { emailHeader: "Test\u00D0 User <test5@foo.invalid>",
+    {
+      emailHeader: "Test\u00D0 User <test5@foo.invalid>",
       primaryEmail: "test5@foo.invalid",
       mailFormat: nsIAbPMF.unknown,
       displayName: "Test\u00D0 User",
       firstName: "Test\u00D0",
       lastName: "User",
-      screenName: "" },
-    { emailHeader: "Test\u00D0 <test6@foo.invalid>",
+      screenName: "",
+    },
+    {
+      emailHeader: "Test\u00D0 <test6@foo.invalid>",
       primaryEmail: "test6@foo.invalid",
       mailFormat: nsIAbPMF.unknown,
       displayName: "Test\u00D0",
       firstName: "",
       lastName: "",
-      screenName: "" },
-    ];
+      screenName: "",
+    },
+  ];
 
 // Source fields (emailHeader/mailFormat) and expected results for use for
 // testing the modification of cards in the database.
 //
 // Note: these sets re-use some of the ones for ease of definition.
 var modifyEmailChecks =
   // No display name/other details. Add details and modify mail format.
-  [ { emailHeader: "Modify User\u00D0 <test0@\u00D0.invalid>",
+  [
+    {
+      emailHeader: "Modify User\u00D0 <test0@\u00D0.invalid>",
       primaryEmail: "test0@\u00D0.invalid",
       mailFormat: nsIAbPMF.html,
       displayName: "Modify User\u00D0",
       firstName: "Modify",
       lastName: "User\u00D0",
-      screenName: "" },
-    { emailHeader: "Modify <test0\u00D0@foo.invalid>",
+      screenName: "",
+    },
+    {
+      emailHeader: "Modify <test0\u00D0@foo.invalid>",
       primaryEmail: "test0\u00D0@foo.invalid",
       mailFormat: nsIAbPMF.plaintext,
       displayName: "Modify",
       firstName: "",
       lastName: "",
-      screenName: "" },
+      screenName: "",
+    },
     // No modification of existing cards with display names
-    { emailHeader: "Modify2 User\u00D02 <test0@\u00D0.invalid>",
+    {
+      emailHeader: "Modify2 User\u00D02 <test0@\u00D0.invalid>",
       primaryEmail: "test0@\u00D0.invalid",
       mailFormat: nsIAbPMF.html,
       displayName: "Modify User\u00D0",
       firstName: "Modify",
       lastName: "User\u00D0",
-      screenName: "" },
-    { emailHeader: "Modify3 <test0\u00D0@foo.invalid>",
+      screenName: "",
+    },
+    {
+      emailHeader: "Modify3 <test0\u00D0@foo.invalid>",
       primaryEmail: "test0\u00D0@foo.invalid",
       mailFormat: nsIAbPMF.plaintext,
       displayName: "Modify",
       firstName: "",
       lastName: "",
-      screenName: "" },
+      screenName: "",
+    },
     // Check no modification of cards for mail format where format is not
     // "unknown".
-    { emailHeader: "Modify User\