UNPKG

3.16 kBMarkdownView Raw
1# How to contribute to billboard.js
2billboard.js is open to everyone, and we welcome any kinds of contribution.
3We believe that our project can grow with your interests in helping others' necessities.
4
5## Style Guide
6
7billboard.js has several style guidelines that you must follow.
8Before your start, please read the below instructions carefully.
9
10### Linting and Code Convention
11To maintain the code style and quality, we adopted [ESLint](http://eslint.org/).
12The [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
15billboard.js uses formatted commit logs for many different purposes (like creating CHANGELOG, ease history searching, etc.).
16To not break the current format, you'll be forced to follow our commit log guidelines.
17Before your commit/push, make sure follow our commit log guidelines.
18
19The 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
39A short descriptive message part of the commit.
40At the end, it should preferably contain related github issue number referenced by `Ref #ISSUE-NO`.
41
42ex) When the commit is about issue number 20, then
43```bash
44Ref #20
45```
46
47
48Example commit of fixing a bug:
49```bash
50Fix(Axis): Correct tick rendering
51
52Update condition of tick to avoid unnecessary tick rendering
53
54Ref #20
55```
56
57Example 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
60skip: Applied the review
61```
62
63## How to submit Pull Requests
64Steps to submit your pull request:
65
661. Fork `billboard.js` on your repository
672. Create a new branch from your billboard.js master branch (and be sure to be always up-to-date)
683. Do your work
694. Create test code for your work (when is possible)
705. Run `npm run lint` for linting and code style check. (update until without any error or warnings)
716. 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).
737. Write a commit log following convention and push to your repository branch.
748. Create a new PR from your branch to billboard.js.
759. Wait for reviews.
76 When your contribution is well enough to be accepted, then it will be merged to our branch.
7710. All done!
78
79
80## License
81By contributing to billboard.js, you're agreeing that your contributions will be licensed under its [MIT](https://opensource.org/licenses/MIT) license.