Contributing
This page is for developing React Native Chart Kit itself. If you are installing the library in an app, start with the Quickstart.
Repository Setup
git clone git@github.com:indiespirit/react-native-chart-kit.gitcd react-native-chart-kitnpm installThe repository uses npm workspaces and package-lock.json. The published npm
package is react-native-chart-kit; the @chart-kit/* workspaces are internal
packages used to develop and build the modern implementation.
Local Checks
Run the focused check for the area you changed, then run the broader checks before opening a pull request.
npm run lintnpm run typechecknpm run testnpm run docs:buildnpm run buildUseful focused commands:
| Command | Purpose |
|---|---|
npm run core:typecheck | Type-check the v2 core workspace. |
npm run svg:typecheck | Type-check the SVG renderer workspace. |
npm run rn:typecheck | Type-check the React Native workspace. |
npm run test:unit | Run unit tests. |
npm run test:compat | Run legacy compatibility tests. |
npm run example:rn-cli:typecheck | Type-check the React Native CLI smoke example. |
npm run docs:build | Verify docs links and type-check documentation examples. |
npm run pack:check | Dry-run package artifacts for the public package. |
npm run surface:check | Check public exports and package boundaries. |
Example App
The public repo includes a React Native CLI smoke surface for non-Expo import and peer-dependency checks:
npm run example:rn-cli:typecheckSee examples/rn-cli-basic for the app source and Metro aliases.
The Expo preview app lives in the private chart-kit-pro repository because it
combines free and Pro chart examples.
Branch Names
Use lowercase kebab-case branch names in this format:
<type>/<short-summary>Use these branch types:
fix/for user-visible bug fixesfeat/for new public functionalitydocs/for documentation-only changesci/for automation and CI changeschore/for maintenance, release hygiene, and dependency upkeeprefactor/for internal changes that do not intentionally change behaviorrelease/for version bump and publishing prep
Include an issue number when the branch maps to a specific issue, for example
fix/733-svg-gradient-ids. Keep each branch scoped to one pull request.