Skip to content

Latest commit

 

History

History
165 lines (109 loc) · 5.71 KB

contributing.md

File metadata and controls

165 lines (109 loc) · 5.71 KB

Contributing to this repository

Getting started

Thank you for contributing to Rafiki 🎉

Before you begin:

Table of Contents

Types of contributions

You can contribute to Rafiki in several ways.

📣 Discussions

Discussions are where we have conversations about Rafiki.

If you would like to discuss topics about the broader ecosystem, have a new idea, or want to show off your work - join us in discussions.

🪲 Issues

We use GitHub issues to track tasks that contributors can help with. We haven't finalized labels yet for contributors to tackle. If you want to help with work related to an issue, please comment on the issue before starting work on it.

If you've found something that needs fixing, search open issues to see if someone else has reported the same thing. If it's something new, open an issue. We'll use the issue to discuss the problem you want to fix.

🛠️ Pull requests

Feel free to fork and create a pull request on changes you think you can contribute.

The team will review your pull request as soon as possible.

📚 Documentation

We started to maintain public-facing documentation for Rafiki on rafiki.dev. The project is new, and available documentation there is scarce. We'd love help to fill that out. A list of issues being tracked across the Interledger ecosystem (including rafiki) is maintained in the Documentation project.

Working in the rafiki repository

This project uses pnpm. A list of steps for setting up a local development environment can be found in the Readme.

DO NOT use npm install. This will cause the project to spontaneously self-destruct 💥

Labels

We use labels to communicate the intention of issues and PRs.

  • discussions: prefix denotes issues that can be converted to discussions.
  • good first issue are great issues for newcomers to take on.
  • pkg: prefix denotes issues/PRs related to a specific package.
  • team: prefix lets contributors know if the issue will be done by the core team or not.
  • triage issues that the core team needs to assign labels to.
  • type: prefix denotes a specific action/category to issues/PRs.

Some labels will be automatically assigned to PRs.

Code quality

All the code quality tools used in the project are installed and configured at the root. This allows for consistency across the monorepo. Allows new packages to be added with minimal configuration overhead.

We try not to put config files in workspaces, unless absolutely necessary.

Linting

Eslint is used for linting.

./.eslintrc.yml # config
./.eslintignore # ignore file

Eslint config should not be overridden in any packages.

Formatting

Prettier is used for formatting.

./.prettierrc.yml # config
./.prettierignore # ignore file

Prettier config should not be overridden in any packages.

GraphQL type generation

GraphQL Code Generator is used for generating TypeScript types from schema.graphql files.

./<package>/codegen.yml # GraphQL Code Generator config

The generate script should be run if a package's schema.graphql file is modified.

pnpm --filter <package> generate

Testing

Jest is used for testing.

./jest.config.js # config used to configure projects and run all tests
./jest.config.base.js # (base jest config, imported by other packages)
./packages/*/jest.config.js # jest config file for package * (extends base.config.base.js)

Jest config at the root is intended to be a base config that should be extended by each package to suit the package's testing requirements.

Commit hooks

Husky provides git hooks.

./.husky/commit-msg # linting commit messages
./.husky/pre-commit # perform functions before committing

Commitlint is used for linting commit messages so that they conform to conventional commits.

./commitlint.config.js # config

Lint-staged is used for linting and formatting staged files on commit.

./.lintstagedrc.yml # config

https://commitlint.js.org

Language

Typescript is the chosen language.

./tsconfig.json # config

Typescript config at the root is intended to be a base config that should be extended by each package to suit the package's requirements.

CI

We use GitHub actions to manage our CI pipeline.

The workflows can be found in .github/workflows