Skip to content

Commit d63a641

Browse files
committed
Add content for contributing.md file and add fail-fast flag for npm run test:watch script [ci skip]
1 parent fe9b3fc commit d63a641

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

.github/CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,43 @@
1+
# Contributing
2+
we are happy that you want to contribute to this project, first of all we know it is a bit painful but please it is important to read the [code of conduct file](https://github.com/luctst/repo-template/blob/master/.github/CODE_OF_CONDUCT.md).
13

4+
## How to contribute ?
5+
It is possible to contribute in many ways, either you want to solve a problem or you have an idea and you'll like to add it in the project.
6+
7+
1. First case, please go to the issue page and read the issues sections in this file to start coding.
8+
2. In the second case it is preferable at first to validate your idea, to do this open an issue by following the feature request template by giving a maximum information and add the label enhancement.
9+
This method is important because it allows us to verify that your idea is in adequacy with the project and thus be able to validate it or not. Once your idea is validate you can start coding by reading the next section.
10+
11+
### Issues
12+
If you decide to solve an issue, please do the actions listed below:
13+
14+
1. Fork the project.
15+
2. Create a branch with the issue name.
16+
3. Once you're done open a PR by respecting the rules writing in the Pull request section of this file.
17+
18+
When you solve a problem we have made tests available to keep some guideline in the code:
19+
20+
* `npm run test:watch` - Test and watch all the Javascript files in the `lib` folder with ava.
21+
* `npm run lint:watch` - Lint check style and watch all the Javascript files in the `lib` folder with eslint and prettier.
22+
23+
The lint command will sometime return warnings and errors that can be automatically fixed to solve this use this command `npm run lint:fix`.
24+
25+
### Pull request
26+
So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at.
27+
28+
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
29+
30+
When you create your pull request we give you access to a template, it is important to try to respect it as much as possible by providing as much information as you judge necessary it can save us a lot of time.
31+
32+
To get your code merge in the codebase you must
33+
imperatively pass those tests to run them enter this in your terminal:
34+
35+
* Test with ava - `npm run test`.
36+
* Lint with eslint - `npm run lint`.
37+
* Style with prettier - `npm run style`.
38+
39+
It's really important to keep this tests green because
40+
they allow us to keep some consistency in the code. As long as this tests are red we will not be able to watch your work.
41+
42+
Once everything is good you can watch your code
43+
alive :)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"scripts": {
1616
"test": "ava --verbose ./test/*.js",
17-
"test:watch": "ava --watch --verbose ./test/*.js",
17+
"test:watch": "ava --watch --verbose --fail-fast ./test/*.js",
1818
"lint": "npx eslint --cache './lib/**/*.js'",
1919
"lint:watch": "esw -w --clear --color --cache './lib/**/*.js'",
2020
"lint:fix": "npx eslint --fix './lib/**/*.js'",

0 commit comments

Comments
 (0)