Skip to content

Add lint rule to catch arrays passed to RxJS operators instead of args#3867

Open
Nateowami wants to merge 1 commit intomasterfrom
lint/add-rxjs-arg-linter
Open

Add lint rule to catch arrays passed to RxJS operators instead of args#3867
Nateowami wants to merge 1 commit intomasterfrom
lint/add-rxjs-arg-linter

Conversation

@Nateowami
Copy link
Copy Markdown
Collaborator

@Nateowami Nateowami commented May 8, 2026

This catches subtle issues like merge([observableOne$, observableTwo$]) which should be merge(observableOne$, observableTwo$)


This change is Reviewable

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.04%. Comparing base (1feb822) to head (a8f058e).
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@Nateowami Nateowami temporarily deployed to screenshot_diff May 8, 2026 15:16 — with GitHub Actions Inactive
@marksvc marksvc self-assigned this May 8, 2026
Copy link
Copy Markdown
Collaborator

@marksvc marksvc left a comment

Choose a reason for hiding this comment

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

@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".

@Nateowami Nateowami force-pushed the lint/add-rxjs-arg-linter branch from 7b0414f to adb2dc9 Compare May 8, 2026 19:13
@Nateowami Nateowami force-pushed the lint/add-rxjs-arg-linter branch from adb2dc9 to a8f058e Compare May 8, 2026 19:14
Copy link
Copy Markdown
Collaborator Author

@Nateowami Nateowami left a comment

Choose a reason for hiding this comment

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

@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.

@Nateowami Nateowami temporarily deployed to screenshot_diff May 8, 2026 19:20 — with GitHub Actions Inactive
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