Skip to content

fix(eslint-plugin): fix placement of lifecycle interface for subclasses #1965

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

Merged
merged 3 commits into from
Nov 23, 2024

Conversation

al-mart
Copy link
Contributor

@al-mart al-mart commented Aug 6, 2024

No description provided.

@al-mart
Copy link
Contributor Author

al-mart commented Aug 6, 2024

#1901

@al-mart
Copy link
Contributor Author

al-mart commented Aug 6, 2024

I have manually tested the fix on my project but I wonder whether there is any possibility to test --fix with automated tests.

Copy link
Member

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

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

@al-mart Yes please take a look at existing rules, there are many cases where auto fixing is tested.

convertAnnotatedSourceToFailureCase() is our utility to allow for a nice visual way to write assertions about errors.

annotatedSource is with the errors, annotatedOutput is after the fixes are applied

@al-mart
Copy link
Contributor Author

al-mart commented Aug 12, 2024

Thank you. Will add the missing test cases accordingly.

@JamesHenry
Copy link
Member

@al-mart Following up on this one please

@al-mart
Copy link
Contributor Author

al-mart commented Sep 15, 2024

Yeah, sorry was on vacation without the pc. Will add the PR with tests tomorrow.

@al-mart
Copy link
Contributor Author

al-mart commented Sep 23, 2024

@JamesHenry added the missing test case, the problem is only occurring when there is a class extension but no interface implementation at all.

@al-mart al-mart force-pushed the fix/use-lifecycle-interface branch from f8206c8 to 6c0006f Compare September 23, 2024 10:19
@al-mart al-mart force-pushed the fix/use-lifecycle-interface branch from 6c0006f to 08d49b4 Compare September 23, 2024 10:21
Copy link

nx-cloud bot commented Oct 20, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 6906477. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 7 targets

Sent with 💌 from NxCloud.

@JamesHenry
Copy link
Member

@al-mart I have updated the branch, will you be addressing the CI failures please?

Copy link

codecov bot commented Nov 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.05%. Comparing base (ba27de5) to head (6906477).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1965      +/-   ##
==========================================
+ Coverage   90.99%   91.05%   +0.06%     
==========================================
  Files         181      181              
  Lines        3475     3521      +46     
  Branches      580      587       +7     
==========================================
+ Hits         3162     3206      +44     
+ Misses        165      164       -1     
- Partials      148      151       +3     
Flag Coverage Δ
unittest 91.05% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...lugin/tests/rules/use-lifecycle-interface/cases.ts 100.00% <ø> (ø)

... and 6 files with indirect coverage changes

---- 🚨 Try these New Features:

@JamesHenry
Copy link
Member

@al-mart I fixed things up for you, thanks again for the PR

@JamesHenry JamesHenry merged commit 3be9177 into angular-eslint:main Nov 23, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants