Web: add ESLint and component test infrastructure (jsdom + testing-library); cover barcodeScanner and exportCsv
Maintainer thường phản hồi trong vòng 1 ngày
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
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- eslint, react, typescript
- Lĩnh vực
- documentation, frontend, testing, tooling
Hướng nghiên cứu
Start by reading web/vitest.config.ts and package.json to see current test setup. Add ESLint config and lint script, then run it to fix hook-dependency warnings in FileListTable.tsx and LoadConfigModal.tsx. Next, configure jsdom and @testing-library/react, writing a modal and an App keyboard test as patterns. Finally, add tests for utils/barcodeScanner.ts and utils/exportCsv.ts, and document npm test in web/README.md; done when lint and all tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The web app has vitest but effectively no safety net:
- No ESLint — no config and no
lintscript anywhere inweb/. That's why hook-dependency bugs (dep-less effect atFileListTable.tsx:370-377; missingbrowsedep atLoadConfigModal.tsx:55) were never flagged. Addeslint+typescript-eslint+eslint-plugin-react-hookswith alintscript, and wire it into pre-commit alongside ruff. - No component tests —
vitest.config.tsruns in the default node env; nojsdom, no@testing-library/reactin devDependencies. All 23 components and the 1572-lineApp.tsx(scan races, global keyboard handler, barcode flow, drag state) are untested. Existing tests cover only pure modules (client, configDrop, fileProperties, searchSyntax, theme, barcodeDecoder). - Untested pure logic that's trivially testable:
utils/barcodeScanner.ts(parseBarcodeInput— the whole barcodekey=valuelanguage incl. alias normalization and boolean parsing) andutils/exportCsv.ts(RFC 4180 quoting). - Document
npm testinweb/README.md(it documents build/dev only).
Suggested order: ESLint + fix its findings → jsdom/testing-library with one modal + one App keyboard test as the pattern → the two pure-logic test files.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 1
- Merge trung bình
- 4 giờ 46 phút
- Pull request đã merge (30 ngày)
- 55
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của falbany/ProFiles
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
falbany/ProFiles#187 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Web UI: config handoff from a second launch leaves the open YAML editor showing stale contentĐang mởbug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của falbany/ProFiles
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ip-tools/patzilla#219 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushesĐang mởpriority:p3 technical-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jimmy058910/jmo-security-repo#1673 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
integration: frontier_silicon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
home-assistant/core#193176 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
task create and task update take --body-file and --stdinCó thể đã có người làm @JuanBarriosS đã nhận hôm nay. Đang mởcli enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
pyrite-wiki/pyrite#1687 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày