Add lint rule to catch arrays passed to RxJS operators instead of args#3867
Add lint rule to catch arrays passed to RxJS operators instead of args#3867
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3867 +/- ##
=======================================
Coverage 81.04% 81.04%
=======================================
Files 630 630
Lines 40592 40592
Branches 6588 6588
=======================================
Hits 32898 32898
- Misses 6661 6674 +13
+ Partials 1033 1020 -13 ☔ View full report in Codecov by Sentry. |
marksvc
left a comment
There was a problem hiding this comment.
@marksvc reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Nateowami).
src/SIL.XForge.Scripture/ClientApp/eslint.config.mjs line 131 at r1 (raw file):
"CallExpression[callee.name=/^(merge|concat)$/][arguments.length=1][arguments.0.type='ArrayExpression']", message: 'You should probably pass separate arguments instead of an array to this RxJS operator. If you want to pass an array, disable this rule for the line with // eslint-disable-line no-restricted-syntax'
In my testing, it looks like "eslint-disable-line" should be "eslint-disable-next-line".
7b0414f to
adb2dc9
Compare
adb2dc9 to
a8f058e
Compare
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on marksvc).
src/SIL.XForge.Scripture/ClientApp/eslint.config.mjs line 131 at r1 (raw file):
Previously, marksvc wrote…
In my testing, it looks like "eslint-disable-line" should be "eslint-disable-next-line".
Done.
This catches subtle issues like
merge([observableOne$, observableTwo$])which should bemerge(observableOne$, observableTwo$)This change is