UNPKG

2.48 kBMarkdownView Raw
1# Contributing to Recharts
2
3We'd love for you to contribute to our source code and to make Recharts even better than it is today! Here are the guidelines we'd like you to follow:
4
5+ [Issues and Bugs](#issues)
6+ [Pull Requests](#pr)
7+ [Code Guide](#code)
8+ [License](#license)
9
10## <a name="issues"></a>Issues and Bugs
11
12### Where to Find Known Issues
13
14We will be using [GitHub Issues](https://github.com/recharts/recharts/issues) for our public bugs. We will keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn't already exist.
15
16### Reporting New Issues
17
18The best way to get your bug fixed is to provide a reduced test case. jsFiddle provide a way to give live examples. You can fork our example in [recharts.org](http://recharts.org/) to show your case.
19
20
21## <a name="pr"></a>Pull Requests
22
23**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
24
25*Before* submitting a pull request, please make sure the following is done…
26
27+ Search [GitHub](https://github.com/recharts/recharts/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
28
29+ Fork the repo and create your branch from `master`.
30+ If you've added code that should be **tested**, add tests!
31+ If you've changed APIs, update the [documentation](https://github.com/recharts/recharts.org) and demo.
32+ Ensure the test suite passes (`npm run test`).
33+ Make sure your code lints (`npm run lint`) - we've done our best to make sure these rules match our internal linting guidelines.
34
35
36## <a name="code"></a>Code Guide
37
38Our linter will catch most styling issues that may exist in your code.
39You can check the status of your code styling by simply running: `npm run lint`
40
41However, there are still some styles that the linter cannot pick up. If you are unsure about something, looking at [Airbnb's Style Guide](https://github.com/airbnb/javascript) will guide you in the right direction.
42
43### Code Conventions
44
45* Use semicolons `;`
46* Commas last `,`
47* 2 spaces for indentation (no tabs)
48* Prefer `'` over `"`
49* 100 character line length
50* Write "attractive" code
51
52## <a name="license"></a>License
53
54By contributing to Recharts, you agree that your contributions will be licensed under its MIT license.