Skip to content

Conversation

@Bori-github
Copy link
Collaborator

@Bori-github Bori-github commented Nov 7, 2025

📌 요약

  • Monaco Editor에 oxlint 린터 적용하여 에디터에 표기 기능 추가

📝 작업 내용

  • Rust 백엔드 oxlint 결과 반환 함수 생성
    • oxlint가 린트를 수행을 위한 에디터의 코드를 임시 파일에 저장하기 위해 tempfile 패키지 추가
    • 린트 결과를 반환하는 함수 생성
  • oxlint 결과를 Rust 백엔드에서 전달받아 클라이언트에서 setModelMarkers를 통해 에디터에 표기

🔍 스크린샷

  • 사용하지 않은 변수 unused에 대해 밑줄로 표기
image

💡 참고 사항

  • 없음

@Bori-github Bori-github self-assigned this Nov 7, 2025
@Bori-github Bori-github added the enhancement New feature or request label Nov 7, 2025
@ohah ohah requested a review from Copilot November 7, 2025 12:48
Copy link
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 pull request adds oxlint integration to the Monaco code editor for real-time JavaScript/TypeScript linting. The implementation uses a Tauri backend command to execute oxlint via npx and displays lint results as markers in the editor.

  • Integrates oxlint for code linting with 500ms debounced validation
  • Adds Tauri backend command to execute oxlint on temporary files
  • Implements Monaco editor markers to display lint errors and warnings

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
apps/executeJS/src/widgets/code-editor/code-editor.tsx Implements validation logic with Monaco markers, debouncing, and event listeners for code changes
apps/executeJS/src/shared/types/index.ts Defines LintResult interface for lint diagnostic data structure
apps/executeJS/src-tauri/src/lib.rs Registers lint_code command in Tauri's invoke handler
apps/executeJS/src-tauri/src/commands.rs Implements lint_code command that runs oxlint via npx and parses JSON output
apps/executeJS/src-tauri/Cargo.toml Adds tempfile dependency for temporary file creation
Cargo.lock Updates lock file with tempfile dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
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

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

apps/executeJS/src/widgets/code-editor/code-editor.tsx:179

  • The disposables are being overwritten at line 180, but then conditionally overwritten again at lines 211-215 or 221. This creates a potential memory leak because the original disposables at line 180 may not be properly disposed if the model exists. The assignment at line 180 should be removed, and the disposables should only be assigned once within the if-else block (lines 200-222).
      // Disposable들을 ref에 저장
      disposablesRef.current = [jsDisposable, tsDisposable];

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Bori-github Bori-github force-pushed the feat/editor-with-eslint branch from ce6928c to 4f3f354 Compare November 14, 2025 11:18
@Bori-github Bori-github merged commit 4fec900 into main Nov 14, 2025
4 checks passed
ohah pushed a commit that referenced this pull request Dec 12, 2025
* chore: 타우리 tempfile 패키지 추가

* feat: oxlint 결과 반환 함수 생성

* feat: 백엔드에서 전달하는 oxlint 결과를 에디터에 적용

* fix: rust lint fix

* refactor: npx --yes 명령어로 인한 성능 문제 개선

* chore: 이벤트리스너도 언마운트 시 cleanup 하여 중복 등록되지 않도록 수정

* chore: severity 타입 좁히기

* chore: 디버깅용 에러 로깅 추가

* fix: format rust

* chore: 명확하지 않은 기본값을 최소값을 수정

* chore: severity 변수 할당 방식 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants