|
| 1 | +# Contributing Guide ✨ |
| 2 | + |
| 3 | +Welcome to **Awesome Social Chess**! We appreciate your interest in contributing. All contributions are welcome! 💖 |
| 4 | + |
| 5 | +## Table of Contents |
| 6 | + |
| 7 | +- [Getting Started](#getting-started) |
| 8 | +- [Creating an Issue](#creating-an-issue) |
| 9 | +- [How to Contribute](#how-to-contribute) |
| 10 | + - [Formatting & Commit Rules](#formatting--commit-rules) |
| 11 | +- [Community Support](#community-support) |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## Getting Started |
| 16 | + |
| 17 | +Before you begin: |
| 18 | + |
| 19 | +- **Familiarize Yourself**: Take a moment to read through the existing [issues](https://github.com/brisbanesocialchess/brisbanesocialchess.github.io/issues) and [pull requests](https://github.com/brisbanesocialchess/brisbanesocialchess.github.io/pulls) to understand current discussions. |
| 20 | + |
| 21 | +## Creating an Issue |
| 22 | + |
| 23 | +If you encounter a bug or have a feature request, please create an issue: |
| 24 | + |
| 25 | +- **Search Existing Issues**: Check if the issue already exists to avoid duplicates. |
| 26 | +- **Open a New Issue**: |
| 27 | + - Use a descriptive title. |
| 28 | + - Clearly describe the problem or feature request. |
| 29 | + - Provide steps to reproduce the issue, if applicable. |
| 30 | + - Include screenshots or code snippets, if helpful. |
| 31 | + |
| 32 | +## How to Contribute |
| 33 | + |
| 34 | +We welcome contributions in the form of bugfixes, new features, documentation improvements, and more. |
| 35 | + |
| 36 | +### 1. Fork the Repository 🔗 |
| 37 | + |
| 38 | +Click the **"Fork"** button at the top right corner of the repository page to create a copy of the repository on your GitHub account. |
| 39 | + |
| 40 | +### 2. Clone Your Fork 📥 |
| 41 | + |
| 42 | +Clone the forked repository to your local machine: |
| 43 | + |
| 44 | +```bash |
| 45 | +git clone https://github.com/your-username/brisbanesocialchess.github.io.git |
| 46 | +``` |
| 47 | + |
| 48 | +### 3. 🌿 Create a Branch |
| 49 | + |
| 50 | +```bash |
| 51 | +cd brisbanesocialchess.github.io |
| 52 | +git checkout -b add-new-feature |
| 53 | +``` |
| 54 | + |
| 55 | +### 4. ✏️ Make Changes |
| 56 | + |
| 57 | +Make necessary improvements, such as fixing bugs, enhancing documentation, or adding new features. |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +### 📐 Formatting & Commit Rules |
| 62 | + |
| 63 | +Before committing, please make sure your code follows our formatting and line-ending standards. |
| 64 | + |
| 65 | +We use: |
| 66 | + |
| 67 | +- [**dprint**](https://dprint.dev) for consistent code formatting |
| 68 | +- [**pre-commit**](https://pre-commit.com) for checking **end-of-file** and **line endings (LF/CRLF)** |
| 69 | + |
| 70 | +#### 🔧 Setting Up dprint |
| 71 | + |
| 72 | +**Windows:** |
| 73 | + |
| 74 | +- Download and install dprint from the [dprint releases](https://github.com/dprint/dprint/releases) |
| 75 | +- Run the installer and make sure `dprint` is in your system PATH |
| 76 | + |
| 77 | +**Linux/macOS:** |
| 78 | + |
| 79 | +Install via curl: |
| 80 | + |
| 81 | +```bash |
| 82 | +curl -fsSL https://dprint.dev/install.sh | sh |
| 83 | +``` |
| 84 | + |
| 85 | +**To check code without changing files:** |
| 86 | + |
| 87 | +```bash |
| 88 | +dprint check |
| 89 | +``` |
| 90 | + |
| 91 | +**To auto-format code:** |
| 92 | + |
| 93 | +```bash |
| 94 | +dprint fmt |
| 95 | +``` |
| 96 | + |
| 97 | +Our configuration is already in the repo: [dprint.json](./dprint.json) |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +#### 🧪 Setting Up pre-commit |
| 102 | + |
| 103 | +Used to enforce newline at end of files and OS-specific line endings. |
| 104 | + |
| 105 | +**Install (requires Python):** |
| 106 | + |
| 107 | +```bash |
| 108 | +pip install pre-commit |
| 109 | +``` |
| 110 | + |
| 111 | +**Activate pre-commit hooks:** |
| 112 | + |
| 113 | +```bash |
| 114 | +pre-commit install |
| 115 | +``` |
| 116 | + |
| 117 | +**Run manually (optional):** |
| 118 | + |
| 119 | +```bash |
| 120 | +pre-commit run --all-files |
| 121 | +``` |
| 122 | + |
| 123 | +--- |
| 124 | + |
| 125 | +### 5. 📝 Commit Changes |
| 126 | + |
| 127 | +Use descriptive commit messages that clearly state the purpose of your changes. |
| 128 | + |
| 129 | +```bash |
| 130 | +git add . |
| 131 | +git commit -m "Add feature: description of feature" |
| 132 | +``` |
| 133 | + |
| 134 | +### 6. ⬆️ Push Changes |
| 135 | + |
| 136 | +```bash |
| 137 | +git push origin add-new-feature |
| 138 | +``` |
| 139 | + |
| 140 | +### 7. 🔄 Create a Pull Request |
| 141 | + |
| 142 | +- Go to your forked repository on GitHub. |
| 143 | +- Click **"Compare & pull request"**. |
| 144 | +- Add a title and description (e.g., "Fixes #102"). |
| 145 | +- Click **"Create pull request"**. |
| 146 | + |
| 147 | +--- |
| 148 | + |
| 149 | +## Community Support |
| 150 | + |
| 151 | +If you need help or have questions: |
| 152 | + |
| 153 | +- Join Discussions: Participate in discussions. |
| 154 | +- Contact Maintainers: Reach out to project maintainers if needed. |
0 commit comments