|
| 1 | +# Contributing to TS Monorepo |
| 2 | + |
| 3 | +Thank you for considering contributing to our TypeScript monorepo! This document outlines the process for contributing and the standards we follow. |
| 4 | + |
| 5 | +## Development Process |
| 6 | + |
| 7 | +1. **Fork and clone** the repository |
| 8 | +2. **Install dependencies**: `pnpm install` |
| 9 | +3. **Create a branch**: `git checkout -b feature/my-feature` |
| 10 | +4. **Make your changes** |
| 11 | +5. **Test your changes**: `pnpm test` |
| 12 | +6. **Ensure code quality**: `pnpm lint && pnpm typecheck` |
| 13 | + |
| 14 | +## Commit Message Convention |
| 15 | + |
| 16 | +We follow [Conventional Commits](https://www.conventionalcommits.org/) for commit messages. This is enforced using commitlint. |
| 17 | + |
| 18 | +Format: `type(scope): subject` |
| 19 | + |
| 20 | +Types: |
| 21 | +- `feat`: A new feature |
| 22 | +- `fix`: A bug fix |
| 23 | +- `docs`: Documentation changes |
| 24 | +- `style`: Changes that don't affect code meaning (formatting, etc.) |
| 25 | +- `refactor`: Code changes that neither fix bugs nor add features |
| 26 | +- `perf`: Performance improvements |
| 27 | +- `test`: Adding or fixing tests |
| 28 | +- `chore`: Changes to build process or auxiliary tools |
| 29 | + |
| 30 | +Example: |
| 31 | +``` |
| 32 | +feat(core): add new API method for authentication |
| 33 | +``` |
| 34 | + |
| 35 | +## Pull Request Process |
| 36 | + |
| 37 | +1. Update the README.md if needed with details of changes to the interface. |
| 38 | +2. Add a changeset to document your changes: `pnpm changeset` |
| 39 | +3. Create a pull request to the `main` branch. |
| 40 | +4. The PR will be reviewed and merged if it meets our standards. |
| 41 | + |
| 42 | +## Adding New Packages |
| 43 | + |
| 44 | +1. Create a new directory in the `packages` folder. |
| 45 | +2. Create a `package.json`, `tsconfig.json`, and source files. |
| 46 | +3. Add the package to relevant workspace configurations. |
| 47 | +4. Update path mappings in the root `tsconfig.json`. |
| 48 | + |
| 49 | +## Testing |
| 50 | + |
| 51 | +- Write tests for all new features and bug fixes. |
| 52 | +- Run existing tests to ensure your changes don't break existing functionality. |
| 53 | +- Aim for good test coverage. |
| 54 | + |
| 55 | +## Code Style |
| 56 | + |
| 57 | +We use Biome for linting and formatting: |
| 58 | + |
| 59 | +- Run `pnpm lint` to check code quality. |
| 60 | +- Run `pnpm format` to format the code. |
| 61 | + |
| 62 | +All code must pass linting and typechecking before being merged. |
| 63 | + |
| 64 | +## Versioning |
| 65 | + |
| 66 | +We use [Changesets](https://github.com/changesets/changesets) to manage versions and generate changelogs. |
| 67 | + |
| 68 | +After making changes: |
| 69 | +1. Run `pnpm changeset` |
| 70 | +2. Follow the prompts to describe your changes |
| 71 | +3. Commit the generated changeset file |
| 72 | + |
| 73 | +## Questions? |
| 74 | + |
| 75 | +If you have any questions, please open an issue or discussion in the repository. |
0 commit comments