Skip to content

Turn on no-unused-imports rule and remove all unused imports#1927

Merged
tdonohue merged 1 commit intoDSpace:mainfrom
tdonohue:no_unused_imports
Nov 8, 2022
Merged

Turn on no-unused-imports rule and remove all unused imports#1927
tdonohue merged 1 commit intoDSpace:mainfrom
tdonohue:no_unused_imports

Conversation

@tdonohue
Copy link
Copy Markdown
Member

Description

Small PR which bans unused imports in all classes. We already have LGTM warning when unused imports exist. This officially bans unused imports, to ensure our code is kept small (and easy to tree-shake).

Unused imports will now throw an error when yarn lint is run.

@tdonohue tdonohue self-assigned this Oct 24, 2022
@tdonohue tdonohue added code task 1 APPROVAL pull request only requires a single approval to merge labels Oct 24, 2022
@tdonohue tdonohue added this to the 7.5 milestone Oct 24, 2022
@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Oct 24, 2022

This pull request fixes 15 alerts when merging ea4abe8 into 1c8d538 - view on LGTM.com

fixed alerts:

  • 15 for Unused variable, import, function or class

@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Oct 27, 2022

This pull request fixes 15 alerts when merging 8427dd6 into 0395480 - view on LGTM.com

fixed alerts:

  • 15 for Unused variable, import, function or class

@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Oct 28, 2022

This pull request fixes 15 alerts when merging a9b2812 into f782ee9 - view on LGTM.com

fixed alerts:

  • 15 for Unused variable, import, function or class

@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Oct 28, 2022

This pull request fixes 15 alerts when merging 76c5bdb into e7e049c - view on LGTM.com

fixed alerts:

  • 15 for Unused variable, import, function or class

@github-actions
Copy link
Copy Markdown

Hi @tdonohue,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Oct 31, 2022

This pull request fixes 15 alerts when merging 4f22aa2 into dc4b4ff - view on LGTM.com

fixed alerts:

  • 15 for Unused variable, import, function or class

@tdonohue tdonohue requested a review from atarix83 November 3, 2022 15:19
Copy link
Copy Markdown
Contributor

@atarix83 atarix83 left a comment

Choose a reason for hiding this comment

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

thanks @tdonohue

this is a very useful rule.

I've verified the IDE eslint plugin reports the errors properly (see screenshot) and the yarn lint fails if any unused imports are left
Schermata da 2022-11-08 09-48-14

@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Nov 8, 2022

This pull request fixes 15 alerts when merging cc86ba5 into 340cc0a - view on LGTM.com

fixed alerts:

  • 15 for Unused variable, import, function or class

@tdonohue tdonohue merged commit 89447a6 into DSpace:main Nov 8, 2022
@tdonohue tdonohue deleted the no_unused_imports branch November 8, 2022 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 APPROVAL pull request only requires a single approval to merge code task

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants