dspace-angular
dspace-angular copied to clipboard
add import of missing Angular interfaces
Description
This PR adds imports of missing Angular interfaces, e.g. OnInit, OnDestroy etc.
@tdonohue , is it possible to add an appropriate lint check?
@saschaszott : I would recommend setting this aside for a bit. We are doing some major refactoring of dspace-angular in #2343 , #2750 and #2752 . This will surely result in major conflicts with this PR until that work is complete.
I don't know the answer to your question about adding a lint rule, but I know lint rules were recently updated by @ybnd in #2343... so, it's possible @ybnd would know the right approach. In any case, this PR won't be reviewed or merged until after all other code refactoring is completed.. so, I'd wait to do more major work on this.
Hi @saschaszott, Conflicts have been detected against the base branch. Please resolve these conflicts as soon as you can. Thanks!
Looks like we can use this rule: https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-lifecycle-interface.md
@tdonohue , maybe the best way of handling this issue (missing imports of Angular lifecycle interfaces) in the ongoing development efforts is the adoption of an additional lint rule as suggested by @ybnd .
Small nitpick, could this be rebased and squashed into one commit to keep our git log neat and tidy? Thanks!
Small nitpick, could this be rebased and squashed into one commit to keep our git log neat and tidy? Thanks!
@alanorth should I open a new PR or do you plan to squash all the commits at merge time?
Hi @saschaszott, we could rebase/squash on GitHub when merging if we remember, but it would be easy for you to do in your branch as well. Assuming you have a git remote for the upstream DSpace repository you could do:
$ git rebase -i upstream/dspace-7_x
Then you will get a list of commits with actions to be performed. You change everything after the first one from pick to squash and git will combine them all into the first commit and let you enter a new commit message after saving:
pick 6dc2ea3 added missing interfaces
squash 8bce1d8 added missing OnInit interface
squash fee794b added missing interface OnInit
...
Hi @saschaszott, we could rebase/squash on GitHub when merging if we remember, but it would be easy for you to do in your branch as well. Assuming you have a git remote for the upstream DSpace repository you could do:
$ git rebase -i upstream/dspace-7_xThen you will get a list of commits with actions to be performed. You change everything after the first one from
picktosquashand git will combine them all into the first commit and let you enter a new commit message after saving:pick 6dc2ea3 added missing interfaces squash 8bce1d8 added missing OnInit interface squash fee794b added missing interface OnInit ...
@alanorth , this does not work as expected. I get tons of merge conflicts. Any ideas how to handle this situation?
@saschaszott Ah, in my comment I suggested rebasing on top of dspace-7_x, but your pull request is against main so you should rebase (and squash) on top of that instead. If your commits apply clean, then a squashed version of the commits should as well (the only difference is one large commit instead of many small ones).
@alanorth , thank you. This does not work either - I'm lost in merge conflicts after running git rebase -i upstream main. I will try another approach and create a new PR (with one commit).
@alanorth , @tdonohue : you can find the squashed version of this PR in https://github.com/DSpace/dspace-angular/pull/3048 - I'll close this PR