CONTRIBUTING lacks dev setup and the test and lint conventions

Aperta Adatta ai principianti
#47 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
eslint, github, javascript, node.js

Direzione di ricerca

Inizia da .github/CONTRIBUTING.md, poi verifica README.md, eslint.config.js, tests/unit/pieces.test.js e package.json rispetto alle convenzioni elencate nell’issue. Documenta Node 20, l’installazione e i tre script, le esportazioni CommonJS, la configurazione dei test e le variabili globali ESLint per file; aggiungi al README i link ai documenti della community. Il lavoro è completo quando chi contribuisce per la prima volta può seguire i passaggi documentati per aggiungere una funzione che coinvolge più file ed eseguire lint e test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
JavaScript
Stelle
4
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TMHSDigital/Static_Chess

Tutte le issue di TMHSDigital/Static_Chess

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.