Skip to content
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

Fix lint #5

Merged
merged 16 commits into from
Feb 10, 2021
Merged

Fix lint #5

merged 16 commits into from
Feb 10, 2021

Conversation

Roxanne718
Copy link
Collaborator

#4

Copy link
Member

@huan huan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your fixes look great.

Please follow my reviews and change the logging messages to align to our standard message format, and then we will be able to merge it and move on.

Thank you very much!

@@ -242,22 262,26 @@ class PuppetLark extends Puppet {
contactAlias(contactId: string): Promise<string>
contactAlias(contactId: string, alias: string): Promise<void>
async contactAlias (contactId: any, alias?: any): Promise<string | void> {
console.info(contactId)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use log.verbose() and follow the format of other log messages to log debug info.

console.info('ERROR: There is no alias in lark.')
}

contactAvatar(contactId: string): Promise<FileBox>
contactAvatar(contactId: string, file: FileBox): Promise<void>
async contactAvatar (contactId: any, file?: any): Promise<FileBox | void> {
console.info(contactId)
console.info(file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use log.verbose() & log.silly().

verbose for the first message in your method, normally it will log the function basic information.

other log messages should use log.silly()

@@ -272,22 296,28 @@ class PuppetLark extends Puppet {
}

protected contactRawPayload (contactId: string): Promise<any> {
console.info(contactId)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to:

log.verbose('PuppetLark', 'contactRawPayload(%s)', contactId)

@Roxanne718
Copy link
Collaborator Author

Your fixes look great.

Please follow my reviews and change the logging messages to align to our standard message format, and then we will be able to merge it and move on.

Thank you very much!

I've modified the code, please check it again. Thanks!

Copy link
Member

@huan huan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@huan huan merged commit 150857a into master Feb 10, 2021
@huan
Copy link
Member

huan commented Feb 10, 2021

This is a huge PR and it fixed most of the problems from the code base earlier.

Now all linting have been passed and it's ready for us to move forward.

Thank you @Roxanne718 for your effort to improve the quality of our code base, appreciate it!

@Roxanne718 Roxanne718 deleted the fix_lint branch February 10, 2021 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants