-
-
Notifications
You must be signed in to change notification settings - Fork 218
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(eslint-plugin): handle DoBootstrap correctly in lifecycle rules #243
fix(eslint-plugin): handle DoBootstrap correctly in lifecycle rules #243
Conversation
ed3cf9d
to
14a19f2
Compare
559c7a5
to
e0ddc05
Compare
Btw, while I was implementing this I noticed a strange behavior and reported in #246. I'll fix it after this PR gets merged. |
e0ddc05
to
5614f2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could you work on reducing the noise in this PR, there seem to be a lot of changed unit tests for no obvious reason or benefit? E.g. whitespacing, ordering etc
It's currently hard to judge the overall impact of the changes in this PR
Hey @JamesHenry I agree that there are a lot of noise and the reason for this is that there are really really amount of tests unneeded. For example, in In a nutshell, I was trying to rework the tests in this specific PR (you can notice by the amount of deletion), but it's surely a bad idea. I'll try to reduce the amount of changes in tests to just cover the |
That would be perfect, thanks @rafaelss95 |
a243007
to
4301093
Compare
@@ -134,7 +140,7 @@ ruleTester.run(RULE_NAME, rule, { | |||
@Component() | |||
class Test { | |||
ngAfterContentChecked() { } | |||
~~~~~~~~~~~~~~~~~~~~~ | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason for this change in reporting style?
In other rules we tend to go for the method name I think (e.g. even in this same PR you have a mixture)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the confusion. Everything should be fine now.
4301093
to
e2acb04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Legitimate integration tests failures to fix
Also please do not force push on an open PR that is already in review - it forces the reviewer to have to start from scratch instead of seeing what changes over time in a PR.
You can achieve everything with merge commits and the history is maintained, unlike with rebasing. Plus the commit history is all squashed and cleaned up on merge to master anyway.
Rebasing is an awesome tool, but should only be used before a PR is already in review IMO.
I don't know if it's my setup or what, but as in #260 (comment), I'm unable to run the command successfully. It always output a blank snap file and after try to
PS: I removed |
@rafaelss95 Sorry, that's strange... Not sure what to suggest. Glad you were able to work around it on this one, if it happens again I'll try pulling down the branch and see if I can reproduce |
This:
DoBootstrap
/ngDoBootstrap
for all 4 lifecycle rules correctly now;no-empty-lifecycle-method
handles all decorators. Before it was caring only aboutComponent
andDirective
;no-empty-lifecycle -method
now ignores non-angular classes;use-lifecycle-interface
now ignores non-angular classes.