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

feat(eslint-plugin): [use-lifecycle-interface] add fixer for the rule #1691

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bulldog98
Copy link

I got the fixer to work, but could not fix one of the tests, seems to be a white space issue.

@bulldog98 bulldog98 changed the title [request for feedback] feat(eslint-plugin): [use-lifecycle-interface] add fixer for the rule feat(eslint-plugin): [use-lifecycle-interface] add fixer for the rule Jan 11, 2024
@bulldog98 bulldog98 marked this pull request as draft January 11, 2024 21:02
Copy link

nx-cloud bot commented Jan 21, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 891a05d. 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


🟥 Failed Commands
nx-cloud record -- yarn format-check
✅ Successfully ran 6 targets

Sent with 💌 from NxCloud.

@@ -120,6 +138,19 @@ export const invalid = [
},
},
],
annotatedOutput: `
@Injectable()
class Test implements DoBootstrap {
Copy link
Member

Choose a reason for hiding this comment

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

This didn't fix all the issues?

Copy link
Author

Choose a reason for hiding this comment

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

If I understood the documentation of eslint correctly the fixes are applied again and again, as long as the lint error is still reported. I'm unsure, how I can use the plugin in a local testing repo to test that out, please advice me on that.

Copy link
Author

Choose a reason for hiding this comment

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

So yes I found a way to try it out. (run e2e tests and then try your changes in tmp/e2e-fixtures/ in any of the apps there. Maybe that should be documented) Indeed eslint runs again on the output of fixes until there are no changes, so it indeed results in a fix that adds all the implements clauses.

Copy link
Author

Choose a reason for hiding this comment

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

Only thing I noticed is that I do not add an import for the Interface, here I would like guidance @JamesHenry

@JamesHenry
Copy link
Member

Thank you @bulldog98! Left some comments

@bulldog98
Copy link
Author

I'll try to fix the issues, not sure if I have time before the weekend though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants