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 more eslint errors #2976

Merged
merged 1 commit into from
Jun 21, 2020
Merged

chore(v2): Fix more eslint errors #2976

merged 1 commit into from
Jun 21, 2020

Conversation

SamChou19815
Copy link
Contributor

Motivation

Continue the effort made in #2972, fix more eslint warnings to avoid spamming the terminal.

Before

✖ 217 problems (0 errors, 217 warnings)

After

✖ 86 problems (0 errors, 86 warnings)

Notable fixes:

  • Added a lot of type annotations to reduce the number of any.
  • Eradicated 'import/prefer-default-export', no-shadow, 'no-else-return', 'no-nested-ternary', 'object-shorthand', 'consistent-return', 'no-useless-return', 'default-case' and 'dot-notation'
  • Make TS error suppression comments a linter error, except @ts-expect-error with a reason (requires bump TS to 3.9)
  • Added some missing dependencies to fix no-extraneous-dependencies. The only remaining ones are TS type imports, which requires import-js/eslint-plugin-import@1f7422d to be included in a new release.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

  • Test passes
  • Preview page can load

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 20, 2020
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jun 20, 2020

Deploy preview for docusaurus-2 ready!

Built with commit 833694d

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

@SamChou19815 SamChou19815 marked this pull request as ready for review June 20, 2020 23:25
@yangshun yangshun merged commit 6e43c9b into facebook:master Jun 21, 2020
@SamChou19815 SamChou19815 deleted the fix-more-eslint-errors branch June 21, 2020 07:14
@slorber
Copy link
Collaborator

slorber commented Jun 22, 2020

awesome :) back to a decent ESLint working config, and nice to see ts-expect-error already used ^^

@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.

5 participants