-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MWPW-147512 Markdown Downloader #40
Conversation
ebc6f6d
to
4b81064
Compare
// eslint-disable-next-line arrow-body-style | ||
const stagedUrls = list.map((entry) => { | ||
const entryPath = entryToPath(entry); | ||
return [entryPath, localizeStageUrl(siteURL, entryPath, stagePath, locales)]; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why eslint would flag this. Do we need to take a look at the eslint rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove this eslint comment since I have the const.
It's two rules that that sometimes conflict, an arrow function with just a return should be on one like but a line can't be longer than 100 characters.
const stagedUrls = list.map((entry) => { | ||
const entryPath = entryToPath(entry); | ||
return [entryPath, localizeStageUrl(siteURL, entryPath, stagePath, locales)]; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const stagedUrls = list.map((entry) => { | |
const entryPath = entryToPath(entry); | |
return [entryPath, localizeStageUrl(siteURL, entryPath, stagePath, locales)]; | |
}); | |
const stagedUrls = list.map((entry) => [entryToPath(entry), localizeStageUrl(siteURL, entryPath, stagePath, locales)]); |
I imagine this may set off the linter via length though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and entryToPath(entry)
would be used twice.
const stagedUrls = list.map((entry) => { | |
const entryPath = entryToPath(entry); | |
return [entryPath, localizeStageUrl(siteURL, entryPath, stagePath, locales)]; | |
}); | |
const stagedUrls = list.map((entry) =>[entryToPath(entry), localizeStageUrl(siteURL, entryToPath(entry), stagePath, locales)]); |
return text; | ||
} catch (e) { | ||
if (e instanceof AbortError) { | ||
console.warn('Fetch timed out after 1s'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should update to Fetch timed out after 5s
? due to signal length?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 5s or 5000ms, I'll set the timeout to a constant and use that here and the above console log.
8e8e2d6
to
e8a3b0c
Compare
Resolves: MWPW-147512