Skip to content

Fix PropTypes linting errors #1514

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

Closed
ghalestrilo opened this issue Jul 24, 2020 · 7 comments · Fixed by #1692
Closed

Fix PropTypes linting errors #1514

ghalestrilo opened this issue Jul 24, 2020 · 7 comments · Fixed by #1692
Labels
Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance

Comments

@ghalestrilo
Copy link
Collaborator

ghalestrilo commented Jul 24, 2020

Nature of issue?

  • Found a bug
  • Existing feature enhancement
  • New feature request

Details about the bug:

Some invalid PropType declarations (array.isRequired and object.isRequired) somehow ended up on develop. In order not to block development because of this, I disabled these lines with // eslint-disable-line, but it's still tech debt to be addressed. Below are the files we should check:

  • IDEView.jsx
  • MobileIDEView.jsx
  • AccountForm.jsx
  • LoginForm.jsx
  • NewPasswordForm.jsx
  • SignupForm.jsx
  • ResetPasswordForm.jsx
  • LoginForm.jsx
  • APIKeyForm.jsx
@catarak catarak added Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance labels Jul 27, 2020
@catarak
Copy link
Member

catarak commented Jul 27, 2020

Great idea 😄

@KKVANONYMOUS
Copy link
Contributor

@catarak
I want to work on this issue. Can you please guide me through

@catarak
Copy link
Member

catarak commented Nov 19, 2020

Yes! I believe in order to get these errors to appear, you'll need to update React. You don't need to upgrade to React 17, just the latest minor/patch in v16.

@KKVANONYMOUS
Copy link
Contributor

Hi, @catarak I have checked all the above specified files and found that only ResetPasswordForm.jsx shows the error related to array.isRequired and object.isRequired.
So should I make a PR disabling these lines using // eslint-disable-line ?

@catarak
Copy link
Member

catarak commented Nov 19, 2020

So should I make a PR disabling these lines using // eslint-disable-line ?

You could do that, but I think a better fix would be to update React and then to actually fix the PropType errors rather than hiding them with // eslint-disable-line.

@KKVANONYMOUS
Copy link
Contributor

Hi @catarak I have fixed all the PropType errors in the above files by replacing PropTypes.object.isRequired with PropTypes.objectOf(PropTypes.shape())
If you find it correct I will create a PR for the same.

@catarak
Copy link
Member

catarak commented Nov 23, 2020

That works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants