chore: eslint no-var, vars-on-top

This commit is contained in:
Peter Jaszkowiak
2021-02-04 00:06:15 -07:00
committed by Julian Lam
parent b56d9e12b5
commit dab3b23575
255 changed files with 1988 additions and 1995 deletions

View File

@@ -384,12 +384,12 @@ Notifications.merge = async function (notifications) {
case 'notifications:user_started_following_you':
case 'notifications:user_posted_to':
case 'notifications:user_flagged_post_in':
case 'notifications:user_flagged_user':
var usernames = _.uniq(set.map(notifObj => notifObj && notifObj.user && notifObj.user.username));
var numUsers = usernames.length;
case 'notifications:user_flagged_user': {
const usernames = _.uniq(set.map(notifObj => notifObj && notifObj.user && notifObj.user.username));
const numUsers = usernames.length;
var title = utils.decodeHTMLEntities(notifications[modifyIndex].topicTitle || '');
var titleEscaped = title.replace(/%/g, '%').replace(/,/g, ',');
const title = utils.decodeHTMLEntities(notifications[modifyIndex].topicTitle || '');
let titleEscaped = title.replace(/%/g, '%').replace(/,/g, ',');
titleEscaped = titleEscaped ? (`, ${titleEscaped}`) : '';
if (numUsers === 2) {
@@ -399,7 +399,7 @@ Notifications.merge = async function (notifications) {
}
notifications[modifyIndex].path = set[set.length - 1].path;
break;
} break;
case 'new_register':
notifications[modifyIndex].bodyShort = `[[notifications:${mergeId}_multiple, ${set.length}]]`;