Skip to content

Commit

Permalink
pkg: add CONTRIBUTING
Browse files Browse the repository at this point in the history
explain lint

explain commit message preferences in CONTIRBUTING
  • Loading branch information
pinheadmz committed Aug 11, 2020
1 parent e053fb8 commit 9fafb91
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
73 changes: 73 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,73 @@
# Contributing to Handshake

## Code style

This repository includes a file [.eslintrc.json](.eslintrc.json) which sets
linting preferences for the project. The continuous integration bot will
install [bslint](https://www.npmjs.com/package/bslint) which vendors a specific
version of eslint. Before submitting a pull request, please make sure your code
is clean of linting errors. If you choose to use bslint, it can be installed
globally in your development environment:

```
npm install bslint -g
cd hsd # must be in repository root
npm run lint # command is defined in package.json
```

## Testing

[bmocha](https://www.npmjs.com/package/bmocha) will be installed as a
"developer dependency" if installed without the `--production` flag. The
complete built-in testing suite can be run with the command:

```
cd hsd
npm run test
```

You can specify a single test file to run with (for example):

```
cd hsd
npm run test-file test/wallet-test.js
```

Before submitting a pull request, please make sure your code changes do not
break any of the existing regression tests or linting rules. We currently use
GitHub Workflows to run the testing suite on all new pull requests.

Recent workflow actions are available:
https://github.com/handshake-org/hsd/actions

All code changes should be covered by new tests if applicable. We currently use
Coveralls to examine test coverage, and a pull request that *decreases* test
coverage will likely not be reviewed by contributors or maintainers.

Current test coverage details are available:
https://coveralls.io/github/handshake-org/hsd

## Commit messages

Whenever possible, commits should prefixed by the module they change. The module
name is generally the folder name in the `lib/` directory in which the changes
occur (subdirectories can usually be ignored). Please see recent
[commits to master branch](https://github.com/handshake-org/hsd/commits/master)
for examples of the preferred pattern.

Additional examples:

```
test: increase timeouts
pkg: update CHANGELOG
wallet: expose importname in RPC
```

Additional commit details are always welcome after the short title. A good
example of this is in
[this commit](https://github.com/handshake-org/hsd/commit/c385fc59d488f5cd592a1d23554fe1c018bf26da).
Note how the author used a very brief commit message as the title but then added
a detailed description in the extended message.



6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -123,6 +123,12 @@ $ npm install -g hs-client
- API Docs: [https://hsd-dev.org/api-docs](https://hsd-dev.org/api-docs)
- JSDoc: [https://hsd-dev.org/docs](https://hsd-dev.org/docs)

## Contributing

Handshake is a community project, we welcome contributions of all kinds from
everyone. Before opening a pull request, please review the style guide and
workflow tips in [CONTRIBUTING.md](CONTRIBUTING.md).

## Quickstart

### API
Expand Down

0 comments on commit 9fafb91

Please sign in to comment.