Skip to content

feat: expose applyFixes to js api#285

Merged
hardfist merged 3 commits intomainfrom
yj/expose-applyfix
Aug 17, 2025
Merged

feat: expose applyFixes to js api#285
hardfist merged 3 commits intomainfrom
yj/expose-applyfix

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

@hardfist hardfist commented Aug 17, 2025

to support applyFix in js api to support testing autofix result
related #280

Copilot AI review requested due to automatic review settings August 17, 2025 09:33
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 17, 2025

Deploy Preview for rslint canceled.

Name Link
🔨 Latest commit 0621fc1
🔍 Latest deploy log https://app.netlify.com/projects/rslint/deploys/68a1b30fbf03e7000869cb21

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 exposes the applyFixes functionality to the API, allowing users to programmatically apply lint fixes to TypeScript/JavaScript code. The change adds a new API endpoint that takes file content and diagnostics as input and returns the fixed content along with statistics about applied and unapplied fixes.

Key changes:

  • Added applyFixes function and related types to the public API
  • Implemented IPC communication for fix application between JS and Go layers
  • Added comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/rule-tester/src/index.ts Added output field to TsDiagnostic interface
packages/rslint/tests/api.test.mjs Added comprehensive test suite for applyFixes API with multiple scenarios
packages/rslint/src/service.ts Added applyFixes method and related interfaces to RSLintService
packages/rslint/src/index.ts Exposed applyFixes function and types in public API
packages/rslint/rstest.config.ts Added test configuration file
internal/api/api.go Added Go types and IPC handling for apply fixes functionality
cmd/rslint/api.go Implemented the core fix application logic in the Go binary

@hardfist hardfist changed the title feat: expose applyFixes to api feat: expose applyFixes to js api Aug 17, 2025
@hardfist hardfist merged commit 378ca1b into main Aug 17, 2025
12 checks passed
@hardfist hardfist deleted the yj/expose-applyfix branch August 17, 2025 10:58
ScriptedAlchemy pushed a commit to ScriptedAlchemy/rslint that referenced this pull request Aug 19, 2025
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