-
Notifications
You must be signed in to change notification settings - Fork 0
Monaco Editor에 oxlint 린터 적용하여 에디터에 표기 기능 추가 #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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.
ce6928c to
4f3f354
Compare
* chore: 타우리 tempfile 패키지 추가 * feat: oxlint 결과 반환 함수 생성 * feat: 백엔드에서 전달하는 oxlint 결과를 에디터에 적용 * fix: rust lint fix * refactor: npx --yes 명령어로 인한 성능 문제 개선 * chore: 이벤트리스너도 언마운트 시 cleanup 하여 중복 등록되지 않도록 수정 * chore: severity 타입 좁히기 * chore: 디버깅용 에러 로깅 추가 * fix: format rust * chore: 명확하지 않은 기본값을 최소값을 수정 * chore: severity 변수 할당 방식 수정
📌 요약
📝 작업 내용
🔍 스크린샷
unused에 대해 밑줄로 표기💡 참고 사항