-
Notifications
You must be signed in to change notification settings - Fork 63
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
port validation and configOptions to TS #1309
Conversation
{ | ||
type: 'list', | ||
look: false, |
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.
look
does not exist as a supported field (search in repo)
@@ -91,25 +102,24 @@ const setDefaultCmsPublishMode = async ({ | |||
newDefault = defaultCmsPublishMode; | |||
} else { | |||
logger.error( | |||
i18n(`${i18nKey}.defaultMode.errors`, { | |||
mode: newDefault, | |||
i18n(`${i18nKey}.defaultMode.error`, { |
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.
We were using the wrong lang key, and newDefault
is undefined here
@@ -134,13 +150,7 @@ const setHttpTimeout = async ({ accountId, httpTimeout }) => { | |||
|
|||
updateHttpTimeout(newHttpTimeout); | |||
|
|||
return logger.success( | |||
logger.success( |
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.
There's no need for any of these to return
validModes: commaSeparatedValues(ALL_CMS_PUBLISH_MODES), | ||
}) | ||
); | ||
newDefault = await selectCMsPublishMode(); | ||
newDefault = await selectCmsPublishMode(); |
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.
We had a casing issue here that TS picked up 🎉
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.
One minor comment but overall LGTM
Description and Context
This is dependent on HubSpot/hubspot-local-dev-lib#223
This ports lib/validation.ts and lib/configOptions.ts to Typescript. I found some bugs while doing this that I'll call out inline.
Screenshots
TODO
Who to Notify