Merge pull request #709 from eordano/fix/contributing

Add two more rules to CONTRIBUTING
This commit is contained in:
Manuel Aráoz 2014-12-11 12:40:42 -03:00
commit ceb78297d1
1 changed files with 28 additions and 0 deletions

View File

@ -92,6 +92,19 @@ returned to the user, its `.name` property should be used.
Write a `.inspect()` method so an instance can be easily debugged in the
console.
### G6 - General: Naming Utility Namespaces
Name them in CamelCase, as they are namespaces.
DO:
```javascript
var BufferUtil = require('./util/buffer');
```
DON'T:
```javascript
var bufferUtil = require('./util/buffer');
```
### E1 - Errors: Use bitcore.Errors
We've designed a structure for Errors to follow and are slowly migrating to it.
@ -196,6 +209,21 @@ variable names.
Inputs for tests should not be generated randomly. Also, the type and structure
of outputs should be checked.
### T3 - Testing: Require 'bitcore' and look up classes from there
This helps to make tests more useful as examples, and more independent of where
they are placed. This also helps prevent forgetting to include all submodules
in the bitcore object.
DO:
```javascript
var bitcore = require('../');
var PublicKey = bitcore.PublicKey;
```
DON'T:
```javascript
var PublicKey = require('../lib/publickey');
```
## Pull Request Workflow