Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 1.52 KB

File metadata and controls

59 lines (43 loc) · 1.52 KB

Contributing

Thanks for your interest in contributing! Here's how to get started.

Reporting Issues

  • Use GitHub Issues to report bugs or suggest features
  • Include steps to reproduce for bugs
  • Check existing issues before creating a new one

Setup

git clone <this-repo>
cd contextpack
npm install
npm test          # run tests
node index.js --help

Pull Requests

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Make your changes
  4. Run tests (see below)
  5. Commit with a clear message: git commit -m "feat: add my feature"
  6. Push and open a Pull Request

Code Style

  • Plain JavaScript — no TypeScript, no build step
  • 'use strict' at the top of every file
  • CommonJS modules (require/module.exports)
  • Handle errors gracefully — no unhandled throws
  • All exported functions must handle null/undefined arguments without crashing
  • No hardcoded credentials or brand names in source files

Testing

npm test              # run vitest
npm run test:coverage # run with coverage report
  • Tests live in tests/
  • Test behavior, not implementation details
  • Test edge cases: null, undefined, empty string, empty array
  • All tests must pass before merging

Architecture

  • index.js — CLI entry point (argument parsing, command routing)
  • lib/*.js — core modules (each with a single responsibility)
  • tests/ — vitest unit tests

License

By contributing, you agree that your contributions will be licensed under the MIT License.