Skip to content

Conversation

@vas3a
Copy link
Collaborator

@vas3a vas3a commented Nov 11, 2022

  • fixes lint errors for src-ts/utils
  • fixes part of the lint errors in src-ts/tools/learn

@vas3a vas3a self-assigned this Nov 11, 2022
Copy link
Contributor

@brooketopcoder brooketopcoder left a comment

Choose a reason for hiding this comment

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

Thank you so much for doing this!

It's already so much easier to read.

ready: false,
}))
return
return noop
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious why use noop instead of undefined?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh. sorry. The error confused me and I didn't look it up. I didn't realize I can just return undefined. Here's the error:
Arrow function expected no return value.eslint[consistent-return](https://eslint.org/docs/rules/consistent-return)

By consistent-return I immediately was thinking of "you need to return a function here as well"


const certProgressPath: string = 'certification-progresses'

type GenericDataObject = { [key: string]: string | GenericDataObject }
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this! Maybe we should make this globally available? I am sure there are other places that would use this. It seems strange that TS doesn't provide something like this OTB.

label='edit name'
onClick={toggleEditName}
tabIndex={1}
tabIndex={-1}
Copy link
Contributor

Choose a reason for hiding this comment

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

These are explicitly set to 1 and 2 bc of the weirdness of the form in the modal. That's why I left this rule a warning instead of an error.

Copy link
Collaborator Author

@vas3a vas3a Nov 11, 2022

Choose a reason for hiding this comment

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

I see. we should probably disable the rule for the file in this case, right? (as this is unavoidable and it will just keep warning otherwise)

Copy link
Contributor

Choose a reason for hiding this comment

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

correct

Copy link
Contributor

@brooketopcoder brooketopcoder left a comment

Choose a reason for hiding this comment

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

looks good!!

@brooketopcoder brooketopcoder merged commit aed04fc into TCA-499_eslint Nov 14, 2022
@brooketopcoder brooketopcoder deleted the TCA-499_eslint_fix-linting branch November 14, 2022 18:11
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.

4 participants