Skip to content

Contributing to Laser Eyes

First off, thank you for considering contributing to Laser Eyes! It's people like you that make Laser Eyes such a great tool for the Bitcoin development community.

Code of Conduct

By participating in this project, you are expected to uphold our Code of Conduct. Please report unacceptable behavior to [gm@lasereyes.build].

How Can I Contribute?

Reporting Bugs

This section guides you through submitting a bug report for Laser Eyes. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.

  • Use a clear and descriptive title for the issue to identify the problem.
  • Describe the exact steps which reproduce the problem in as many details as possible.
  • Provide specific examples to demonstrate the steps.

Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Laser Eyes, including completely new features and minor improvements to existing functionality.

  • Use a clear and descriptive title for the issue to identify the suggestion.
  • Provide a step-by-step description of the suggested enhancement in as many details as possible.
  • Provide specific examples to demonstrate the steps or point out the part of Laser Eyes where the enhancement could be implemented.
  • Explain why this enhancement would be useful to most Laser Eyes users.

Pull Requests

  • Fill in the required template
  • Do not include issue numbers in the PR title
  • Include screenshots and animated GIFs in your pull request whenever possible.
  • Follow the JavaScript/TypeScript styleguides.
  • Include thoughtfully-worded, well-structured tests.
  • Document new code based on the Documentation Styleguide
  • End all files with a newline

Styleguides

Git Commit Messages

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line

JavaScript Styleguide

All JavaScript code is linted with ESLint and formatted with Prettier.

  • Prefer the object spread operator ({...anotherObj}) to Object.assign()
  • Use async/await over Promises where possible
  • Inline exports with expressions whenever possible
// Use this:
export const foo = "bar";
 
// Instead of:
const foo = "bar";
export { foo };

TypeScript Styleguide

  • Use types wherever possible
  • Use interfaces for object definitions
  • Use type for unions and intersections
  • Use enum for a set of related constants

Documentation Styleguide

  • Use Markdown.
  • Reference methods and classes in markdown with the following syntax:
    • Class: {ClassName}
    • Method: {ClassName.methodName}
    • Event: {ClassName#eventName}

Setting up your environment

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/your-username/laser-eyes.git
  3. Create a new branch: git checkout -b my-branch-name
  4. Install dependencies: npm install
  5. Make your changes
  6. Run the tests: npm test
  7. Push to your fork and submit a pull request

License

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

Questions?

If you have any questions, please feel free to contact the project maintainers.

Thank you for your interest in contributing to Laser Eyes! We look forward to your contributions.