📝 add contribution guide

This commit is contained in:
Chase Manning 2025-04-29 21:14:22 +01:00
parent 5cb8f48f20
commit 50fe494a2c

102
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,102 @@
# Contributing to Pokemon JS
First off, thank you for considering contributing to Pokemon JS! It's people like you that make Pokemon JS such a great tool.
## How Can I Contribute?
### Reporting Bugs
Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps which reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed after following the steps
- Explain which behavior you expected to see instead and why
- Include screenshots if possible
### Suggesting Enhancements
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the steps
- Describe the current behavior and explain which behavior you expected to see instead
### Pull Requests
- Fill in the required template
- Do not include issue numbers in the PR title
- Include screenshots and animated GIFs in your pull request whenever possible
- Follow the TypeScript and React styleguides
- Include thoughtfully-worded, well-structured tests
- Document new code
- End all files with a newline
## Styleguides
### Git Commit Messages
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
### TypeScript Styleguide
- Use 2 spaces for indentation
- Use semicolons
- Use `const` and `let` instead of `var`
- Use meaningful variable names
- Use TypeScript interfaces for type definitions
- Use proper type annotations
### React Styleguide
- Use functional components with hooks
- Use proper prop types
- Keep components small and focused
- Use meaningful component names
- Follow the container/presenter pattern when appropriate
## Development Process
1. Fork the repo
2. Create a new branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Commit your changes (`git commit -m 'Add some amazing feature'`)
5. Push to the branch (`git push origin feature/amazing-feature`)
6. Open a Pull Request
## Getting Started with Development
1. Install dependencies:
```bash
yarn install
```
2. Start the development server:
```bash
yarn start
```
3. Run tests:
```bash
yarn test
```
## Project Structure
- `/src/components`: React components
- `/src/maps`: Game map data
- `/src/state`: Redux store and state management
- `/src/assets`: Game assets (sprites, music, etc.)
- `/src/styles`: Global styles
## Questions?
Feel free to open an issue for any questions you might have about contributing.