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 follows formatted commit logs based on [Conventional Commits](https://www.conventionalcommits.org/) 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>[optional scope]: <description>
|
22 |
|
23 | [optional body]
|
24 |
|
25 | [optional 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 | - #### Description
|
39 | A short description of the commit.
|
40 |
|
41 | ```bash
|
42 | fix(Axis): Correct tick rendering
|
43 | ```
|
44 |
|
45 | Example commit applying code review (after the 1st commit)
|
46 | > **Note:** Commit log starting with `skip:` type will be ignored by commit hook constraint.
|
47 | ```bash
|
48 | skip: Applied the review
|
49 | ```
|
50 |
|
51 | - #### Body
|
52 | A short descriptive message part of the commit.
|
53 |
|
54 | Example commit of fixing a bug:
|
55 | ```bash
|
56 | <type>(<module>): <subject>
|
57 |
|
58 | Update condition of tick to avoid unnecessary tick rendering
|
59 |
|
60 | <footer>
|
61 | ```
|
62 |
|
63 | > **BREAKING CHANGE:** a commit that has the text 'BREAKING CHANGE:' at the beginning of its optional body or footer section introduces a breaking API change.
|
64 |
|
65 | - #### Footer
|
66 |
|
67 | Related github issue number referenced by `Ref #ISSUE-NO`.
|
68 |
|
69 | ex) When the commit is about issue number 20, then
|
70 | ```bash
|
71 | Ref #20
|
72 | ```
|
73 |
|
74 | - #### Example
|
75 | ```bash
|
76 | fix(Axis): Correct tick rendering
|
77 |
|
78 | Update condition of tick to avoid unnecessary tick rendering
|
79 |
|
80 | Ref #20
|
81 | ```
|
82 |
|
83 | ```bash
|
84 | feat(tooltip): Intent to ship tooltip.contents.template
|
85 | - Implementation of tooltip.contents.template
|
86 | - Update legend template processing with util's .tplProcess()
|
87 |
|
88 | Ref #813
|
89 | ```
|
90 |
|
91 | ```bash
|
92 | feat(browser): Drop support for IE 11
|
93 |
|
94 | Drop support for IE 11.
|
95 |
|
96 | Ref #31
|
97 |
|
98 | BREAKING CHANGE: Internet Explorer 11 is a burden to support and at EOL.
|
99 | ```
|
100 |
|
101 |
|
102 | ## How to submit Pull Requests
|
103 | Steps to submit your pull request:
|
104 |
|
105 | 1. Fork `billboard.js` on your repository
|
106 | 2. Create a new branch from your billboard.js `master` branch (and be sure to be always up-to-date)
|
107 | 3. Do your work
|
108 | 4. Create test code for your work (when is possible)
|
109 | 5. Run `npm run lint` for linting and code style check. (update until without any error or warnings)
|
110 | 6. Run test code by `npm test` or `npm test:chrome` for chrome browser.
|
111 | Make sure all tests pass at least on the latest version of Chrome(mobile/desktop).
|
112 | 7. Write a commit log following convention and push to your repository branch.
|
113 | 8. Create a new PR from your branch to `billboard.js/master` branch.
|
114 | 9. Wait for reviews.
|
115 | When your contribution is well enough to be accepted, then it will be merged to our branch.
|
116 | 10. All done!
|
117 |
|
118 |
|
119 | ## License
|
120 | By contributing to billboard.js, you're agreeing that your contributions will be licensed under its [MIT](https://opensource.org/licenses/MIT) license.
|