Skip to content

playground: print text for node#353

Merged
hardfist merged 2 commits intomainfrom
yj/print-node
Sep 10, 2025
Merged

playground: print text for node#353
hardfist merged 2 commits intomainfrom
yj/print-node

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

Summary

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings September 10, 2025 06:07
@netlify
Copy link
Copy Markdown

netlify bot commented Sep 10, 2025

Deploy Preview for rslint ready!

Name Link
🔨 Latest commit 4717769
🔍 Latest deploy log https://app.netlify.com/projects/rslint/deploys/68c117d6d5d016000888f813
😎 Deploy Preview https://deploy-preview-353--rslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds text content to AST nodes in the playground component by including a text property in the ASTNode interface and populating it from the node's text content.

  • Added text property to the ASTNode interface definition
  • Populated the text property in the RemoteNodeToEstree function to capture node text content

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines 83 to +85
start: node.pos,
end: node.end,
text: node.text,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P1] Access Node.text which is not part of @rslint/api types

The AST conversion now reads node.text, but the imported Node type is just the TypeScript AST interface re‑exported from @typescript/api, which does not define a text property. Under the website’s strict TypeScript configuration this line produces Property 'text' does not exist on type 'Node', causing the playground build to fail. If the intent is to show node text, it needs to be derived from the source (e.g. via RemoteSourceFile or specific token types) instead of accessing a nonexistent field.

Useful? React with 👍 / 👎.

@hardfist hardfist merged commit 108ee49 into main Sep 10, 2025
15 of 16 checks passed
@hardfist hardfist deleted the yj/print-node branch September 10, 2025 06:26
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.

2 participants