Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CuriousMagpie committed Mar 25, 2024
1 parent e00ad9d commit 395dc46
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion migrations/users/habit_birthday.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ export default async function processUsers () {

await Promise.all(users.map(updateUser)); // eslint-disable-line no-await-in-loop
}
};
}
8 changes: 4 additions & 4 deletions migrations/users/nye.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console */
import { model as User } from '../../../website/server/models/user';
import { v4 as uuid } from 'uuid';

Check failure on line 2 in migrations/users/nye.js

View workflow job for this annotation

GitHub Actions / lint (21.x)

'uuid' is defined but never used
import { model as User } from '../../../website/server/models/user';

Check failure on line 3 in migrations/users/nye.js

View workflow job for this annotation

GitHub Actions / lint (21.x)

Unable to resolve path to module '../../../website/server/models/user'

Check failure on line 3 in migrations/users/nye.js

View workflow job for this annotation

GitHub Actions / lint (21.x)

Missing file extension for "../../../website/server/models/user"

const MIGRATION_NAME = '20231228_nye';

Expand All @@ -11,7 +11,7 @@ async function updateUser (user) {
count++;

Check failure on line 11 in migrations/users/nye.js

View workflow job for this annotation

GitHub Actions / lint (21.x)

Unary operator '++' used

const set = { migration: MIGRATION_NAME };
let push = {};
const push = {};

if (typeof user.items.gear.owned.head_special_nye2022 !== 'undefined') {
set['items.gear.owned.head_special_nye2023'] = true;
Expand Down Expand Up @@ -55,7 +55,7 @@ async function updateUser (user) {
}

export default async function processUsers () {
let query = {
const query = {
'auth.timestamps.loggedin': { $gt: new Date('2023-12-01') },
migration: { $ne: MIGRATION_NAME },
};
Expand Down Expand Up @@ -86,4 +86,4 @@ export default async function processUsers () {

await Promise.all(users.map(updateUser)); // eslint-disable-line no-await-in-loop
}
};
}
4 changes: 2 additions & 2 deletions migrations/users/summer_splash_orcas.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function updateUser (user) {
}

export default async function processUsers () {
let query = {
const query = {
migration: { $ne: MIGRATION_NAME },
'auth.timestamps.loggedin': { $gt: new Date('2023-06-18') },
};
Expand Down Expand Up @@ -78,4 +78,4 @@ export default async function processUsers () {

await Promise.all(users.map(updateUser)); // eslint-disable-line no-await-in-loop
}
}
}
6 changes: 3 additions & 3 deletions migrations/users/veteran_pet_ladder.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function updateUser (user) {
count++;

const set = {};
let push = { notifications: { $each: [] } };
const push = { notifications: { $each: [] } };

set.migration = MIGRATION_NAME;
if (user.items.pets['Fox-Veteran']) {
Expand Down Expand Up @@ -110,7 +110,7 @@ async function updateUser (user) {
}

export default async function processUsers () {
let query = {
const query = {
migration: { $ne: MIGRATION_NAME },
'auth.timestamps.loggedin': { $gt: new Date('2023-07-08') },
};
Expand Down Expand Up @@ -143,4 +143,4 @@ export default async function processUsers () {

await Promise.all(users.map(updateUser)); // eslint-disable-line no-await-in-loop
}
};
}

0 comments on commit 395dc46

Please sign in to comment.