Skip to content

fix: address lint CI failures#235

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/fix-main-lint-ci
Jun 21, 2026
Merged

fix: address lint CI failures#235
chenjiahan merged 1 commit into
mainfrom
chenjiahan/fix-main-lint-ci

Conversation

@chenjiahan

@chenjiahan chenjiahan commented Jun 21, 2026

Copy link
Copy Markdown
Member

Summary

This PR fixes the current main lint CI failures after the rslint upgrade with a minimal diff. It keeps the existing ANSI regex implementation and adds localized no-control-regex disables for those literals, removes the redundant boolean cast around the codePointAt capability check, and uses Object.prototype.hasOwnProperty.call for color overrides.

Related Links

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Two client-side utility files receive defensive coding corrections. In overlay.ts, the getCodePoint function's availability check for String.prototype.codePointAt is changed from boolean coercion (!!) to an explicit typeof ... === 'function' comparison. In client-src/utils/ansiHTML.ts, ESC and CSI character-code constants are introduced and used to construct the _regANSI regex via new RegExp(...) instead of a hardcoded literal; a new global _regANSIColors constant is added and used in the SGR text.replace call; and setColors switches from colors.hasOwnProperty(key) to Object.prototype.hasOwnProperty.call(colors, key).

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: address lint CI failures' directly describes the primary objective of the PR, which is to fix lint CI failures mentioned in the description and PR objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description clearly relates to the changeset, describing specific fixes for lint CI failures including ANSI regex handling, codePointAt check optimization, and hasOwnProperty usage updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chenjiahan/fix-main-lint-ci

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.

@chenjiahan chenjiahan force-pushed the chenjiahan/fix-main-lint-ci branch 2 times, most recently from 07b6ddc to 0b19f70 Compare June 21, 2026 08:13
@chenjiahan chenjiahan force-pushed the chenjiahan/fix-main-lint-ci branch from 0b19f70 to f62960c Compare June 21, 2026 08:19
@chenjiahan chenjiahan merged commit 20ade13 into main Jun 21, 2026
2 of 3 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/fix-main-lint-ci branch June 21, 2026 08:55
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.

1 participant