mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-06 14:46:47 +08:00
fix: lint issues
!nuf
This commit is contained in:
parent
0b05b3c2fd
commit
bf0ce6607d
2 changed files with 3 additions and 3 deletions
|
@ -450,7 +450,7 @@ export function getFunbox(
|
|||
if (Array.isArray(nameOrNames)) {
|
||||
const out = nameOrNames.map((name) => getObject()[name]);
|
||||
|
||||
//@ts-expect-error
|
||||
//@ts-expect-error sanity check
|
||||
if (out.includes(undefined)) {
|
||||
throw new Error("One of the funboxes is invalid: " + nameOrNames);
|
||||
}
|
||||
|
|
|
@ -110,13 +110,13 @@ const getCurrentVersion = () => {
|
|||
const incrementVersion = (currentVersion) => {
|
||||
console.log("Incrementing version...");
|
||||
const now = new Date();
|
||||
const year = now.getFullYear().toString().slice(-2);
|
||||
const year = Number(now.getFullYear().toString().slice(-2));
|
||||
const start = new Date(now.getFullYear(), 0, 1);
|
||||
const week = Math.ceil(((now - start) / 86400000 + start.getDay() + 1) / 7);
|
||||
const [prevYear, prevWeek, minor] = currentVersion.split(".").map(Number);
|
||||
|
||||
let newMinor = minor + 1;
|
||||
if (year != prevYear || week != prevWeek) {
|
||||
if (year !== prevYear || week !== prevWeek) {
|
||||
newMinor = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue