start upgrading eslint

This commit is contained in:
Matteo Pagliazzi
2019-10-08 16:57:10 +02:00
parent 90c917f69e
commit 621787915c
304 changed files with 5992 additions and 6394 deletions
+5 -5
View File
@@ -7,14 +7,14 @@ export default function reset (user, tasks = []) {
user.stats.gp = 0;
user.stats.exp = 0;
let tasksToRemove = [];
const tasksToRemove = [];
tasks.forEach(task => {
let isNotChallengeTask = !task.challenge || !task.challenge.id || task.challenge.broken;
let isNotGroupTask = !task.group || !task.group.id || task.group.broken;
const isNotChallengeTask = !task.challenge || !task.challenge.id || task.challenge.broken;
const isNotGroupTask = !task.group || !task.group.id || task.group.broken;
if (isNotChallengeTask && isNotGroupTask) {
tasksToRemove.push(task._id);
let i = user.tasksOrder[`${task.type}s`].indexOf(task._id);
const i = user.tasksOrder[`${task.type}s`].indexOf(task._id);
if (i !== -1) user.tasksOrder[`${task.type}s`].splice(i, 1);
}
});
@@ -24,7 +24,7 @@ export default function reset (user, tasks = []) {
user.preferences.automaticAllocation = false;
return [
{user, tasksToRemove},
{ user, tasksToRemove },
i18n.t('resetComplete'),
];
}