Bug 1577835 - Fix eslint "no-useless-concat" errors in mailnews/. r=mkmelin
authorPaul Morris <paul@thunderbird.net>
Fri, 30 Aug 2019 22:28:12 -0400
changeset 35713 77773ecb02ca0f76310211a3d5acc5317cd60083
parent 35712 b53bee47da4e80abed1aaee62358fbeaeed5ee97
child 35714 90b92315e8a506149834eea1835a7faedd80d298
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 - Fix eslint "no-useless-concat" errors in mailnews/. r=mkmelin
mailnews/base/prefs/content/AccountManager.js
mailnews/base/test/unit/test_nsMsgDBView.js
mailnews/base/util/mailstoreConverter.jsm
mailnews/compose/test/unit/test_messageHeaders.js
mailnews/db/gloda/modules/datastore.js
mailnews/db/gloda/test/unit/resources/glodaTestHelper.js
mailnews/extensions/newsblog/content/FeedUtils.jsm
mailnews/extensions/newsblog/content/feed-parser.js
mailnews/mime/test/unit/test_mimeContentType.js
--- a/mailnews/base/prefs/content/AccountManager.js
+++ b/mailnews/base/prefs/content/AccountManager.js
@@ -1829,17 +1829,17 @@ var gAccountTree = {
       let treecell = document.createXULElement("treecell");
       treerow.appendChild(treecell);
       treecell.setAttribute("label", accountName);
       treeitem.setAttribute("PageTag", amChrome);
       // Add icons based on account type.
       if (server) {
         treecell.setAttribute(
           "properties",
-          "folderNameCol isServer-true" + " serverType-" + server.type
+          "folderNameCol isServer-true serverType-" + server.type
         );
         // For IM accounts, we can try to fetch a protocol specific icon.
         if (server.type == "im") {
           treecell.setAttribute(
             "src",
             server.wrappedJSObject.imAccount.protocol.iconBaseURI + "icon.png"
           );
         }
--- a/mailnews/base/test/unit/test_nsMsgDBView.js
+++ b/mailnews/base/test/unit/test_nsMsgDBView.js
@@ -478,19 +478,17 @@ function ensure_view_ordering(
       comparisonValuesByLevel.splice(level);
     }
 
     // get the value for comparison
     let curValue = valueGetter(msgHdr);
     if (inGroup) {
       let groupValue = groupValueGetter(msgHdr);
       if (groupValue in previouslySeenGroupValues) {
-        do_throw(
-          "Group value " + groupValue + " observed in more than one " + "group!"
-        );
+        do_throw(`Group value ${groupValue} observed in more than one group!`);
       }
       if (curGroupValue == null) {
         curGroupValue = groupValue;
       } else if (curGroupValue != groupValue) {
         do_throw(
           "Inconsistent grouping! " + groupValue + " != " + curGroupValue
         );
       }
--- a/mailnews/base/util/mailstoreConverter.jsm
+++ b/mailnews/base/util/mailstoreConverter.jsm
@@ -206,17 +206,17 @@ function createTmpConverterFolder(aFolde
 function installNewRoot(server, dir, newStoreTypeID) {
   let accountRootFolder = server.rootFolder.filePath;
 
   // Migration is complete, get path of parent of account root
   // folder into "parentPath" check if Converter folder already
   // exists in "parentPath". If yes, remove it.
   let lastSlash = accountRootFolder.path.lastIndexOf("/");
   let parentPath = accountRootFolder.parent.path;
-  log.info("Path to parent folder of account root" + " folder: " + parentPath);
+  log.info("Path to parent folder of account root folder: " + parentPath);
 
   let parent = new FileUtils.File(parentPath);
   log.info("Path to parent folder of account root folder: " + parent.path);
 
   let converterFolder = new FileUtils.File(
     OS.Path.join(parent.path, dir.leafName)
   );
   if (converterFolder.exists()) {
--- a/mailnews/compose/test/unit/test_messageHeaders.js
+++ b/mailnews/compose/test/unit/test_messageHeaders.js
@@ -625,17 +625,17 @@ async function testSentMessage() {
     await sendMessage({ to: "test@tinderbox.invalid" }, identity, {}, [
       cloudAttachment,
     ]);
     checkMessageHeaders(
       daemon.post,
       {
         "Content-Type": "application/octet-stream",
         "X-Mozilla-Cloud-Part":
-          "cloudFile; url=http://localhost.invalid/; " + "name=attachment.html",
+          "cloudFile; url=http://localhost.invalid/; name=attachment.html",
       },
       "2"
     );
   } finally {
     server.stop();
   }
 }
 
--- a/mailnews/db/gloda/modules/datastore.js
+++ b/mailnews/db/gloda/modules/datastore.js
@@ -1313,17 +1313,17 @@ var GlodaDatastore = {
       //  For simplicity we don't currently do this, and I expect this should
       //  not pose a major problem, but those are famous last words.
       // Note: asyncClose does not spin a nested event loop, but the thread
       //  manager shutdown code will spin the async thread's event loop, so it
       //  nets out to be the same.
       this.asyncConnection.asyncClose();
     } catch (ex) {
       this._log.debug(
-        "Potentially expected exception during connection " + "closure: " + ex
+        "Potentially expected exception during connection closure: " + ex
       );
     }
 
     this.asyncConnection = null;
     this.syncConnection = null;
   },
 
   /**
--- a/mailnews/db/gloda/test/unit/resources/glodaTestHelper.js
+++ b/mailnews/db/gloda/test/unit/resources/glodaTestHelper.js
@@ -616,17 +616,17 @@ var _indexMessageState = {
         this._workerRecoveredCount,
       ]);
     }
     if (
       this.expectedFailedToRecoverCount != null &&
       this.expectedFailedToRecoverCount != this._workerFailedToRecoverCount
     ) {
       mark_failure([
-        "Expected worker-failed-to-recover count did not match " + "actual!",
+        "Expected worker-failed-to-recover count did not match actual!",
         "Expected",
         this.expectedFailedToRecoverCount,
         "actual",
         this._workerFailedToRecoverCount,
       ]);
     }
     if (
       this.expectedCleanedUpCount != null &&
--- a/mailnews/extensions/newsblog/content/FeedUtils.jsm
+++ b/mailnews/extensions/newsblog/content/FeedUtils.jsm
@@ -1656,17 +1656,17 @@ var FeedUtils = {
       .QueryInterface(Ci.nsIFileProtocolHandler)
       .getURLSpecFromFile(file);
 
     // GetDataSourceBlocking has a cache, so it's cheap to do this again
     // once we've already done it once.
     let ds = this.rdf.GetDataSourceBlocking(url);
     if (!ds) {
       throw new Error(
-        "FeedUtils.getItemsDS: can't get feed items " + "data source - " + url
+        "FeedUtils.getItemsDS: can't get feed items data source - " + url
       );
     }
     // Note that it this point the datasource may not be loaded yet.
     // You have to QueryInterface it to nsIRDFRemoteDataSource and check
     // its "loaded" property to be sure.  You can also attach an observer
     // which will get notified when the load is complete.
     if (!this[aServer.serverURI]) {
       this[aServer.serverURI] = {};
--- a/mailnews/extensions/newsblog/content/feed-parser.js
+++ b/mailnews/extensions/newsblog/content/feed-parser.js
@@ -517,17 +517,17 @@ FeedParser.prototype = {
       aFeed.title || this.stripTags(this.getNodeValue(tags ? tags[0] : null));
     tags = this.childrenByTagNameNS(channel, FeedUtils.ATOM_03_NS, "tagline");
     aFeed.description = this.getNodeValueFormatted(tags ? tags[0] : null);
     tags = this.childrenByTagNameNS(channel, FeedUtils.ATOM_03_NS, "link");
     aFeed.link = this.validLink(this.findAtomLink("alternate", tags));
 
     if (!aFeed.title) {
       FeedUtils.log.error(
-        "FeedParser.parseAsAtom: missing mandatory element " + "<title>"
+        "FeedParser.parseAsAtom: missing mandatory element <title>"
       );
       aFeed.onParseError(aFeed);
       return [];
     }
 
     if (!aFeed.parseItems) {
       return [];
     }
@@ -721,17 +721,17 @@ FeedParser.prototype = {
       this.findAtomLink("alternate", tags, contentBase);
     aFeed.link = this.validLink(aFeed.link);
     if (!contentBase) {
       contentBase = aFeed.link;
     }
 
     if (!aFeed.title) {
       FeedUtils.log.error(
-        "FeedParser.parseAsAtomIETF: missing mandatory element " + "<title>"
+        "FeedParser.parseAsAtomIETF: missing mandatory element <title>"
       );
       aFeed.onParseError(aFeed);
       return [];
     }
 
     if (!aFeed.parseItems) {
       return [];
     }
--- a/mailnews/mime/test/unit/test_mimeContentType.js
+++ b/mailnews/mime/test/unit/test_mimeContentType.js
@@ -36,17 +36,17 @@ function run_test() {
         "Content-Type:\r\n" +
         "text/plain; charset=utf-8\r\n" +
         "Content-Transfer-Encoding: quoted-printable\r\n" +
         "Content-Disposition: inline\r\n" +
         "\r\n",
       result: "",
     },
     {
-      header: "Content-Type:\r\n" + "\r\n",
+      header: "Content-Type:\r\n\r\n",
       result: "",
     },
     {
       /* possible crash case for Bug 574961 */
       header:
         "Content-Type: \r\n" +
         "                                " +
         "                                " +