CONTRIBUTING lacks dev setup and the test and lint conventions

Đang mở Phù hợp với người mới
#47 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
eslint, github, javascript, node.js

Hướng nghiên cứu

Bắt đầu với .github/CONTRIBUTING.md, sau đó đối chiếu README.md, eslint.config.js, tests/unit/pieces.test.js và package.json với các quy ước được liệt kê trong issue. Tài liệu hóa Node 20, cách cài đặt và ba script, các export CommonJS, cấu hình kiểm thử và các biến toàn cục ESLint theo từng tệp; thêm liên kết đến tài liệu cộng đồng vào README. Hoàn tất khi người mới đóng góp lần đầu có thể làm theo các bước đã tài liệu hóa để thêm một hàm nằm trên nhiều tệp và chạy lint cùng các bài kiểm thử.

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

Mô tả

documentation severity: medium

Summary

.github/CONTRIBUTING.md is 14 lines and only says to run lint and tests. It leaves out the conventions a contributor needs in order to add or move a function without lint and test failures.

Where

  • .github/CONTRIBUTING.md:1-14
  • README.md:137-144, README.md:214-217, README.md:304-313
  • eslint.config.js:35-80, tests/unit/pieces.test.js:9-20, package.json:8-10

Details

  • How source files become testable. Each js/*.js ends with a CommonJS footer, and each test rebuilds the globals by hand in dependency order. A new function needs the footer export and the wiring in every suite that loads it.
  • ESLint globals are listed per file. Calling a function from another file fails lint with no-undef until eslint.config.js is edited.
  • Node version. CI uses Node 20; there is no engines field, .nvmrc or mention in the docs.
  • npm run format. The script exists but is not documented.
  • Two ESLint configs. Nothing says that eslint.config.js is live and .eslintrc.cjs is ignored.
  • README links. The README does not link CONTRIBUTING, SECURITY or the Code of Conduct, and its tree omits them.

Impact

A first-time contributor who adds a helper in one file and calls it from another gets a lint failure and a ReferenceError in tests, with nothing explaining either.

Suggested fix

Add a "Development" section: Node version, npm install, the three scripts, the export-footer and test-wiring pattern, and the per-file globals rule. Link the community files from the README.

Acceptance criteria

  • A new contributor can add a cross-file function using only the documented steps

Getting started

  • Relevant files: .github/CONTRIBUTING.md, README.md
  • How to run tests: npm install, then npm test and npm run lint
  • Related docs: docs/ARCHITECTURE.md, .github/CONTRIBUTING.md

Filed by repo-audit/full-audit at 8a2c86c. Severity: medium. Effort: S. audit-key: documentation|.github/CONTRIBUTING.md|dev-setup

Ngôn ngữ chính
JavaScript
Star
4
Fork
2
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 TMHSDigital/Static_Chess

Tất cả issue của TMHSDigital/Static_Chess

Issue tương tự

Thêm issue về JavaScript

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.