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 LGTM code analysis warnings #6608

Merged
merged 10 commits into from
Sep 14, 2021
Merged

Fix LGTM code analysis warnings #6608

merged 10 commits into from
Sep 14, 2021

Conversation

pierlon
Copy link
Contributor

@pierlon pierlon commented Sep 14, 2021

Summary

Fixes #6587.

Checklist

  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@pierlon pierlon added the Tech Debt Deprecations, inefficiencies, code health label Sep 14, 2021
@pierlon pierlon added this to the v2.2 milestone Sep 14, 2021
@pierlon pierlon requested a review from westonruter September 14, 2021 05:49
@lgtm-com
Copy link

lgtm-com bot commented Sep 14, 2021

This pull request fixes 13 alerts when merging 776ceca into c8f6f6f - view on LGTM.com

fixed alerts:

  • 4 for Unused variable, import, function or class
  • 3 for Unused import
  • 2 for Useless conditional
  • 1 for Module is imported more than once
  • 1 for Unused local variable
  • 1 for Superfluous trailing arguments
  • 1 for Module is imported with 'import' and 'import from'

@github-actions
Copy link
Contributor

github-actions bot commented Sep 14, 2021

Plugin builds for 3a7f9cc are ready 🛎️!

@lgtm-com
Copy link

lgtm-com bot commented Sep 14, 2021

This pull request fixes 13 alerts when merging dc849e8 into ed78087 - view on LGTM.com

fixed alerts:

  • 4 for Unused variable, import, function or class
  • 3 for Unused import
  • 2 for Useless conditional
  • 1 for Module is imported more than once
  • 1 for Unused local variable
  • 1 for Superfluous trailing arguments
  • 1 for Module is imported with 'import' and 'import from'

Co-authored-by: Weston Ruter <westonruter@google.com>
@lgtm-com
Copy link

lgtm-com bot commented Sep 14, 2021

This pull request fixes 13 alerts when merging 3a7f9cc into a8706f7 - view on LGTM.com

fixed alerts:

  • 4 for Unused variable, import, function or class
  • 3 for Unused import
  • 2 for Useless conditional
  • 1 for Module is imported more than once
  • 1 for Unused local variable
  • 1 for Superfluous trailing arguments
  • 1 for Module is imported with 'import' and 'import from'

@westonruter westonruter merged commit 6822183 into develop Sep 14, 2021
@westonruter westonruter deleted the fix/lgtm-errors branch September 14, 2021 21:23
@@ -484,7 +483,7 @@ AmpNoloadingToggle.propTypes = {
* Get AMP Lightbox toggle control.
*
* @param {Object} props Props.
* @return {ReactElement} Element.
* @return {JSX.Element} Element.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Theoretically you could have also done @return {import('react').ReactElement} Element.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm yea, I think that would require us disabling the jsdoc/valid-types ESLint rule though. We're currently using the @wordpress/eslint-plugin/recommended-with-formatting plugin which in turn adds JSX as a valid type.

@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelogged Whether the issue/PR has been added to release notes. Tech Debt Deprecations, inefficiencies, code health
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LGTM Code Analysis
3 participants