REFACTOR: removes various assignments and superfluous params (#9699)

REFACTOR: removes various assignments and superfluous params (#9699)

diff --git a/app/assets/javascripts/discourse/app/models/topic-tracking-state.js b/app/assets/javascripts/discourse/app/models/topic-tracking-state.js
index 7cb74d8..be49ad4 100644
--- a/app/assets/javascripts/discourse/app/models/topic-tracking-state.js
+++ b/app/assets/javascripts/discourse/app/models/topic-tracking-state.js
@@ -452,14 +452,13 @@ const TopicTrackingState = EmberObject.extend({
     }
 
     let categoryId = category ? get(category, "id") : null;
-    let categoryName = category ? get(category, "name") : null;
 
     if (name === "new") {
       return this.countNew(categoryId);
     } else if (name === "unread") {
       return this.countUnread(categoryId);
     } else {
-      categoryName = name.split("/")[1];
+      const categoryName = name.split("/")[1];
       if (categoryName) {
         return this.countCategory(categoryId);
       }
diff --git a/app/assets/javascripts/locales/i18n.js b/app/assets/javascripts/locales/i18n.js
index e0f7019..4802877 100644
--- a/app/assets/javascripts/locales/i18n.js
+++ b/app/assets/javascripts/locales/i18n.js
@@ -197,7 +197,6 @@ I18n.toNumber = function(number, options) {
       .toFixed(options.precision)
       .toString(),
     parts = string.split(this.SEPARATOR),
-    precision,
     buffer = [],
     formattedNumber;
 
diff --git a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/bbcode-inline.js b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/bbcode-inline.js
index 98788ae..ab57fcb 100644
--- a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/bbcode-inline.js
+++ b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/bbcode-inline.js
@@ -225,7 +225,7 @@ export function setup(helper) {
         token = state.push("text", "", 0);
         token.content = content;
 
-        token = state.push("link_close", "a", -1);
+        state.push("link_close", "a", -1);
         return true;
       }
     });
diff --git a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/html-img.js b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/html-img.js
index bdc6178..800d520 100644
--- a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/html-img.js
+++ b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/html-img.js
@@ -66,7 +66,7 @@ function rule(state, startLine, endLine) {
   token.map = [startLine, state.line];
   token.children = [];
 
-  token = state.push("paragraph_close", "p", -1);
+  state.push("paragraph_close", "p", -1);
   state.parentType = oldParentType;
 
   return true;
diff --git a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/paragraph.js b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/paragraph.js
index 2673175..879faf9 100644
--- a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/paragraph.js
+++ b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown/paragraph.js
@@ -78,7 +78,7 @@ function paragraph(state, startLine /*, endLine*/) {
   // CUSTOM
   token.leading_space = hasLeadingSpace;
 
-  token = state.push("paragraph_close", "p", -1);
+  state.push("paragraph_close", "p", -1);
 
   state.parentType = oldParentType;
   return true;
diff --git a/app/assets/javascripts/pretty-text/addon/oneboxer.js b/app/assets/javascripts/pretty-text/addon/oneboxer.js
index f5faf56..e0720c3 100644
--- a/app/assets/javascripts/pretty-text/addon/oneboxer.js
+++ b/app/assets/javascripts/pretty-text/addon/oneboxer.js
@@ -78,7 +78,7 @@ function loadNext(ajax) {
         let $html = $(html);
         setLocalCache(normalize(url), $html);
         $elem.replaceWith($html);
-        applySquareGenericOnebox($html, normalize(url));
+        applySquareGenericOnebox($html);
       },
       result => {
         if (result && result.jqXHR && result.jqXHR.status === 429) {

GitHub sha: 00a038d6

This commit appears in #9699 which was merged by jjaffeux.