Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Latest commit

 

History

History
59 lines (36 loc) · 2.56 KB

CONTRIBUTING.md

File metadata and controls

59 lines (36 loc) · 2.56 KB

discord.js Contributing Guide

The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the Discord server instead of opening an issue – you will get redirected there anyway.

Pull Request Guidelines

  • Checkout a topic branch from a base branch, e.g. main, and merge back against that branch.

  • If adding a new feature:

    • Add an accompanying test case.
    • Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
  • If fixing a bug:

    • If you are resolving a special issue, add fix/close #xxxx[,#xxxx] (#xxxx is the issue id) in your PR body for a better release log, e.g.
    fix(Guild): handle events correctly
    
    close #28
    
    • Provide a detailed description of the bug in the PR. Live demo preferred.
  • It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.

  • Make sure tests pass!

  • Commit messages must follow the commit message convention so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking Git Hooks via husky).

  • No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking Git Hooks via husky).

Development Setup

You will need Node.js version 16+, and npm.

After cloning the repo, run:

$ npm ci # install the dependencies of the project

A high level overview of tools used:

Contributing Tests

Unit tests are collocated with the code being tested in each package, inside directories named __tests__. Consult the Jest docs and existing test cases for how to write new test specs.