Skip to content

docs(kit) & test(react-x): add is.APICall callout and captureOwnerStack edge-case tests#1813

Merged
Rel1cx merged 1 commit into
mainfrom
docs-kit-api-callout-and-capture-owner-stack-tests
May 29, 2026
Merged

docs(kit) & test(react-x): add is.APICall callout and captureOwnerStack edge-case tests#1813
Rel1cx merged 1 commit into
mainfrom
docs-kit-api-callout-and-capture-owner-stack-tests

Conversation

@Rel1cx
Copy link
Copy Markdown
Owner

@Rel1cx Rel1cx commented May 29, 2026

What kind of change does this PR introduce?

  • Docs
  • Test

Does this PR introduce a breaking change?

  • No

Checklist

  • I have added a convincing reason for adding this feature, if necessary

Other information

  • Docs: Adds a callout in @eslint-react/kit documentation explaining why is.API / is.APICall should be preferred over hand-written AST checks. Uses ((React as any)?.captureOwnerStack)?.()! as a concrete example to illustrate how deeply the callee can be buried under TSAsExpression, ChainExpression, TSNonNullExpression, and other wrappers.
  • Tests: Expands no-misused-capture-owner-stack test coverage with cases involving optional chaining (?.()), TSTypeAssertion, TSAsExpression, and TSNonNullExpression layered together, ensuring the rule correctly identifies captureOwnerStack calls through complex TypeScript syntax.

test(no-misused-capture-owner-stack): add cases for optional chaining and multi-layer TS wrappers
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
eslint-react Building Building Preview, Comment May 29, 2026 5:00pm

@Rel1cx Rel1cx merged commit a0ef3d2 into main May 29, 2026
12 of 13 checks passed
@Rel1cx Rel1cx deleted the docs-kit-api-callout-and-capture-owner-stack-tests branch May 29, 2026 17:01
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