Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

tech-debt: reduce max-lines disables in ANSI editor files

Đang mở
#757 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
frontend, tooling

Hướng nghiên cứu

Start by reading the three named files and locating their eslint max-lines disables. Review the suggested responsibilities for ScreenRegistry, useAnsiEditorTools.ts, and the CRT-loading hook before separating them. Done means the responsibilities are split without changing editor behavior and the max-lines disables can be removed.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

tech-debt

Context

The arbitrary-dimensions feature (PR #755) pushed 3 files past their ESLint max-lines threshold, requiring /* eslint-disable max-lines */:

  • packages/lua-runtime/src/AnsiController.ts (438 lines, limit 400)
  • lua-learning-website/src/components/AnsiGraphicsEditor/useAnsiEditor.ts (~1010 lines, limit 850)
  • lua-learning-website/src/components/AnsiGraphicsEditor/AnsiGraphicsEditor.tsx (~435 lines, limit 400)

Suggested splits

  • AnsiController.ts: Extract the screenStates map + create/set/remove/resolve methods into a ScreenRegistry class.
  • useAnsiEditor.ts: Extract resizeCanvas + clearGrid + tool-handler wiring (createDrawHelpers / createSelectionHandlers / createTextToolHandlers setup) into useAnsiEditorTools.ts.
  • AnsiGraphicsEditor.tsx: Extract the CRT config loading effect block into a small hook.

Origin

Code review suggestion #2 on PR #755 (arbitrary ANSI canvas dimensions).

Ngôn ngữ chính
TypeScript
Star
1
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jcollard/LuaInTheWeb

Tất cả issue của jcollard/LuaInTheWeb

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.