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

chore(v2): Fix a lot of eslint warnings #2972

Merged
merged 1 commit into from
Jun 20, 2020
Merged

chore(v2): Fix a lot of eslint warnings #2972

merged 1 commit into from
Jun 20, 2020

Conversation

SamChou19815
Copy link
Contributor

@SamChou19815 SamChou19815 commented Jun 19, 2020

Motivation

Fix a lot of eslint warnings to avoid spamming the terminal.

Before

✖ 892 problems (0 errors, 892 warnings)

After

✖ 217 problems (0 errors, 217 warnings)

All of the fixes are low-effort ones, major ones are including:

  • Disable some TS rules that don't make sense for JS code.
  • Adding missing type annotation, which can be already easily inferred by TS.
  • Change some any type to unknown type.
  • Small syntax change: prefer-template, prefer-destructuring.

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

  • Everything type checks
  • Existing tests can pass
  • Preview site doesn't break.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 19, 2020
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 34bc353

https://deploy-preview-2972--docusaurus-2.netlify.app

@SamChou19815 SamChou19815 marked this pull request as ready for review June 19, 2020 23:54
Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

LGTM!

@yangshun yangshun merged commit 3611c96 into facebook:master Jun 20, 2020
@SamChou19815 SamChou19815 deleted the eslint-fix branch June 20, 2020 05:50
@slorber
Copy link
Collaborator

slorber commented Jun 22, 2020

thanks ;)

@slorber slorber added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants