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

fix(eslint): fix inject function based injection not detecting store (#3834) #3936

Merged
merged 6 commits into from
Jul 3, 2023

Conversation

Flusinerd
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Currently, the eslint plugin does not detect the store, if it is injected via the new inject method

Closes #3834

What is the new behavior?

Updated store detection logic to also check for stores injected via inject method from the @angular/core package

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

I only updated a single spec file for now, so check if the implementation approach is okay. I'll add more test files later.
Also maybe other rules are affected as well, since for example Actions could also be injected using inject

@netlify
Copy link

netlify bot commented Jun 29, 2023

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 6e310f7
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/649cd7a513046c0008754a34

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

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

Nice! 🤩
The fact that other tests are still passing is already something.
How do you want to go forward with this, because as you mentioned more tests/implementations would be needed.

I propose to merge this change in and create another issue to go over each rule and update the tests and/or the implementation.

@Flusinerd
Copy link
Contributor Author

Hi, whatever works for you. Splitting it would add the benefit of multiple people being able to work on it.

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.

ESLint plugin does not work correctly when the inject function is used
3 participants