Skip to content

Allow more unicorn eslint rules (prefer-includes)#2725

Merged
Crabcyborg merged 2 commits into
masterfrom
allow_more_unicorn_eslint_rules
Jan 6, 2026
Merged

Allow more unicorn eslint rules (prefer-includes)#2725
Crabcyborg merged 2 commits into
masterfrom
allow_more_unicorn_eslint_rules

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

No description provided.

@Crabcyborg Crabcyborg added this to the 6.27 milestone Jan 6, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 6, 2026

Warning

Rate limit exceeded

@Crabcyborg has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 4 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 9a022db and 0b8daef.

⛔ Files ignored due to path filters (1)
  • .eslintrc.json is excluded by !**/*.json
📒 Files selected for processing (3)
  • js/src/admin/admin.js
  • js/src/core/ui/addProgressToCardBoxes.js
  • stripe/js/frmstrp.js

Walkthrough

This PR modernizes string and array containment checks across four JavaScript files by replacing indexOf() comparisons with the more concise includes() method, maintaining identical control flow and logic throughout.

Changes

Cohort / File(s) Summary
indexOf to includes modernization
js/admin/legacy-views.js, js/formidable.js, js/src/admin/admin.js, stripe/js/frmstrp.js
Replaced all indexOf() containment checks with includes() method: converts indexOf(...) === -1 to !includes(...), indexOf(...) !== -1 to includes(...), and indexOf(...) > -1 to includes(...). No changes to control flow, error handling, or function signatures.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

run analysis, run tests

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.79% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to evaluate whether a description relates to the changeset. Add a pull request description explaining the purpose of enabling the prefer-includes unicorn eslint rule and the scope of changes across the codebase.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Allow more unicorn eslint rules (prefer-includes)' is directly related to the changeset, which updates multiple JavaScript files to use the includes() method instead of indexOf() checks, aligning with unicorn eslint's prefer-includes rule.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Crabcyborg Crabcyborg merged commit 9bffa62 into master Jan 6, 2026
15 of 16 checks passed
@Crabcyborg Crabcyborg deleted the allow_more_unicorn_eslint_rules branch January 6, 2026 20:44
stephywells pushed a commit that referenced this pull request Apr 4, 2026
Allow more unicorn eslint rules (prefer-includes)
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.

1 participant