Conversation
✅ Deploy Preview for rslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for exporting AST buffer data to enable JavaScript API access for plugin support. The change allows the Go linter to serialize TypeScript AST data and send it to JavaScript consumers, facilitating JavaScript-based plugins that can operate on the parsed AST.
Key Changes:
- Added optional
includeEncodedSourceFilesparameter to lint API to control AST buffer export - Added encoded source file collection and serialization in the linting process
- Created new
@rslint/apipackage that re-exports TypeScript Go API functionality
Reviewed Changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/rslint/src/types.ts | Added includeEncodedSourceFiles option and encodedSourceFiles response field |
| cmd/rslint/api.go | Implemented source file tracking and AST encoding in lint handler |
| internal/api/api.go | Added data structures for encoded source files support |
| packages/rslint-api/ | New package for re-exporting TypeScript Go API |
| packages/rslint/tests/api.test.mjs | Added test for encoded source file functionality |
| pnpm-workspace.yaml | Added workspace packages for TypeScript Go integration |
| patches/typescript-go.patch | Patch for TypeScript Go to export required symbols |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
cmd/rslint/api.go:1
- Remove the extra blank lines before the sendError function comment.
package main
5054cef to
e8ec999
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
export ast buffer so we can call js api on ast buffer to support js plugin