1 | # How to contribute to billboard.js
|
2 | billboard.js is open to everyone, and we welcome any kinds of contribution.
|
3 | We believe that our project can grow with your interests in helping others' necessities.
|
4 |
|
5 | ## Style Guide
|
6 |
|
7 | billboard.js has several style guidelines that you must follow.
|
8 | Before your start, please read the below instructions carefully.
|
9 |
|
10 | ### Linting and Code Convention
|
11 | To maintain the code style and quality, we adopted [ESLint](http://eslint.org/).
|
12 | The [rules](https://github.com/naver/eslint-config-naver/tree/master/rules) are based on the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript) with some modifications.
|
13 |
|
14 | ### Commit Log Guidelines
|
15 | billboard.js uses formatted commit logs for many different purposes (like creating CHANGELOG, ease history searching, etc.).
|
16 | To not break the current format, you'll be forced to follow our commit log guidelines.
|
17 | Before your commit/push, make sure follow our commit log guidelines.
|
18 |
|
19 | The outline is as below:
|
20 | ```bash
|
21 | <type>(<module>): <subject>
|
22 | <BLANK LINE>
|
23 | <body>
|
24 | <BLANK LINE>
|
25 | <footer>
|
26 | ```
|
27 |
|
28 | - #### Types
|
29 | - **feat**: A new feature
|
30 | - **fix**: A bug fix
|
31 | - **docs**: Documentation only changes
|
32 | - **style**: Changes that do not affect the meaning of the code. Such as white-space, formatting, missing semi-colons, etc.
|
33 | - **refactor**: A code change that neither fixes a bug nor adds a feature
|
34 | - **test**: Adding missing tests. Changing tests.
|
35 | - **chore**: Changes to the build process or tools and libraries such as documentation generation
|
36 | - **skip**: For commits made by after the 1st commit. Usually for applying code review changes.
|
37 |
|
38 | - #### Body
|
39 | A short descriptive message part of the commit.
|
40 | At the end, it should preferably contain related github issue number referenced by `Ref #ISSUE-NO`.
|
41 |
|
42 | ex) When the commit is about issue number 20, then
|
43 | ```bash
|
44 | Ref #20
|
45 | ```
|
46 |
|
47 |
|
48 | Example commit of fixing a bug:
|
49 | ```bash
|
50 | Fix(Axis): Correct tick rendering
|
51 |
|
52 | Update condition of tick to avoid unnecessary tick rendering
|
53 |
|
54 | Ref #20
|
55 | ```
|
56 |
|
57 | Example commit applying code review (after the 1st commit)
|
58 | > **Note:** Commit log starting with `skip:` type will be ignored by commit hook constraint.
|
59 | ```bash
|
60 | skip: Applied the review
|
61 | ```
|
62 |
|
63 | ## How to submit Pull Requests
|
64 | Steps to submit your pull request:
|
65 |
|
66 | 1. Fork `billboard.js` on your repository
|
67 | 2. Create a new branch from your billboard.js master branch (and be sure to be always up-to-date)
|
68 | 3. Do your work
|
69 | 4. Create test code for your work (when is possible)
|
70 | 5. Run `npm run lint` for linting and code style check. (update until without any error or warnings)
|
71 | 6. Run test code by `npm test` or `npm test:chrome` for chrome browser.
|
72 | Make sure all tests pass at least on the latest version of Chrome(mobile/desktop).
|
73 | 7. Write a commit log following convention and push to your repository branch.
|
74 | 8. Create a new PR from your branch to billboard.js.
|
75 | 9. Wait for reviews.
|
76 | When your contribution is well enough to be accepted, then it will be merged to our branch.
|
77 | 10. All done!
|
78 |
|
79 |
|
80 | ## License
|
81 | By contributing to billboard.js, you're agreeing that your contributions will be licensed under its [MIT](https://opensource.org/licenses/MIT) license.
|