Contributing
Thank you for considering contributing to img-mapper. We welcome all contributions, whether it’s fixing a bug, improving documentation, or suggesting new rules.
How to Contribute
1. Fork & Clone the Repository
sh
$ git clone git@github.com:img-mapper/img-mapper.git
$ cd img-mappersh
$ git clone https://github.com/img-mapper/img-mapper.git
$ cd img-mapper2. Install Dependencies
Check the .nvmrc file for the required Node.js version. For pnpm version, see the packageManager field in the root package.json.
This project is a monorepo managed with pnpm. Install dependencies with:
sh
$ pnpm install3. Project Structure
The repo is organized as a monorepo with two main packages:
packages/react-img-mapper→ React img mapper packagepackages/vue-img-mapper→ Vue img mapper packageapps/examples→ Img mapper examplesdocs/→ Documentation site (built with VitePress)
4. Making Changes
Always create a new branch:
sh$ git checkout -b fix/your-changeFor docs → check formatting and verify links.
5. Linting & Formatting
Run checks and fixes before committing:
sh
$ pnpm lint
$ pnpm format:checksh
$ pnpm lint:fix
$ pnpm format:fix6. Commit Guidelines
We follow Conventional Commits for a clean commit history. Examples:
feat: implement ESM functionalityfix: resolve path alias issuedocs: update installation steps
7. Running Scripts
Before pushing, ensure all scripts pass:
sh
$ pnpm script:lint8. Submitting a PR
- Push your branch and open a Pull Request against
canary. - Clearly describe the problem, your solution, and reference any related issues/discussions.
- Maintainers will review, suggest improvements if needed, and merge once approved.
Code of Conduct
This project follows a Code of Conduct. Please be respectful, collaborative, and inclusive.
Suggestions & Issues
- Found a bug? → Open an Issue
- Want a new feature or rule? → Use the same link to create an issue, or start a discussion before opening a PR.
