Skip to content

Contributing

WoompaLoompa edited this page Jul 21, 2026 · 2 revisions

Guide for contributing to the CLINK payment plugin.

How to Contribute

Reporting Bugs

  1. Check existing issues
  2. Use Bug Report template
  3. Include:
    • Medusa version
    • Plugin version
    • Steps to reproduce
    • Logs

Suggesting Features

  1. Check discussions
  2. Use Feature Request template
  3. Describe use case

Pull Requests

  1. Fork repository
  2. Create feature branch
  3. Make changes
  4. Add tests
  5. Submit PR

Development Setup

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Git

Setup

# Clone
git clone https://github.com/shocknet/medusa-bitcoin-lightning-payment-module-via-clink.git

# Install
npm install

# Test
npm test

# Build
npm run build

Code Style

  • TypeScript strict mode
  • ESLint for linting
  • Prettier for formatting

Naming Conventions

  • Files: kebab-case.ts
  • Classes: PascalCase
  • Functions: camelCase
  • Constants: UPPER_SNAKE_CASE

Testing

Run Tests

# All tests
npm test

# Watch mode
npm run test:watch

# Coverage
npm run test:coverage

Write Tests

describe("Feature", () => {
  it("should do something", async () => {
    // Arrange
    const input = { /* ... */ }

    // Act
    const result = await service.method(input)

    // Assert
    expect(result).toEqual(expected)
  })
})

Commits

Follow Conventional Commits:

  • feat: new feature
  • fix: bug fix
  • docs: documentation
  • test: adding tests

Examples:

feat: add Kraken support
fix: handle expired invoice
docs: update merchant guide

Pull Request Checklist

  • Code follows style guidelines
  • Self-review completed
  • Tests added/updated
  • Documentation updated
  • No console.log statements
  • All tests pass

Getting Help

Clone this wiki locally