-
-
Notifications
You must be signed in to change notification settings - Fork 243
fix(eslint-plugin): [no-input-prefix] false positive on input initializer value #2184
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): [no-input-prefix] false positive on input initializer value #2184
Conversation
View your CI Pipeline Execution ↗ for commit 72638f6.
☁️ Nx Cloud last updated this comment at |
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.
Thanks a lot @lucasnbsb, you please need to update the rule docs and commit the results. Our rule docs are generated from our unit tests, so whenever they change the rule docs need to as well.
pnpm update-rule-docs
Hi @JamesHenry. Docs updated 👍 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2184 +/- ##
==========================================
+ Coverage 90.44% 90.45% +0.01%
==========================================
Files 177 177
Lines 3527 3532 +5
Branches 593 595 +2
==========================================
+ Hits 3190 3195 +5
Misses 183 183
Partials 154 154
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Thank you! |
Input properties initialized with literal values containing the prohibited prefix were being incorrectly flagged, causing code like:
To trigger on the initializer
That happened because the selector matched any
literal
oridentifier
that were children of property definitions.So the fix could either be in the selector or once the match already happened. I went with the latter.
I added 3 test cases, one valid with the disalowed prefix in the initializer instead of the property name and two invalids with the initializer not being matched,