|
| 1 | +# Contributing to `playwright-page-object` |
| 2 | + |
| 3 | +First off, thank you for being here! 🎉 |
| 4 | + |
| 5 | +I'm a solo maintainer working on this project in my free time, and I am thrilled that you want to help make it better. To keep things moving smoothly and respect everyone's time, I just have a few simple guidelines. |
| 6 | + |
| 7 | +## 💡 The Golden Rule: Let's talk first! |
| 8 | + |
| 9 | +**Bugs & Typos:** Did you find a bug, a typo, or something broken? Feel free to open a Pull Request directly! No need to ask. |
| 10 | + |
| 11 | +**New Features & Big Changes:** Before you spend your valuable time writing code for a new feature, **please open an Issue first to discuss it.** |
| 12 | +Why? Because I want to make sure your idea fits the vision of the project, doesn't duplicate ongoing work, and uses an architecture we agree on. I would hate to reject a massive PR that you spent hours on just because we didn't chat first! |
| 13 | + |
| 14 | +## 🛠️ Local Development |
| 15 | + |
| 16 | +Setting up the project is super simple. We don't have a massive web of tools—just install and build! |
| 17 | + |
| 18 | +1. **Fork & Clone** the repository. |
| 19 | +2. **Install dependencies:** |
| 20 | + ```bash |
| 21 | + npm ci |
| 22 | + ``` |
| 23 | +3. **Run the dev watcher:** |
| 24 | + ```bash |
| 25 | + npm run dev |
| 26 | + ``` |
| 27 | + *This uses `tsup` to instantly rebuild the MCP server whenever you save a file.* |
| 28 | + |
| 29 | +## 🎨 Code Style (Zero Config!) |
| 30 | + |
| 31 | +You don't need to configure your editor, set up ESLint, or worry about formatting rules. We use **Biome**. |
| 32 | + |
| 33 | +Just write your code naturally. When you are ready to commit, our Husky pre-commit hook will automatically format your files and fix any basic linting errors in milliseconds. |
| 34 | + |
| 35 | +If you want to run it manually before committing: |
| 36 | +```bash |
| 37 | +npm run lint:fix |
| 38 | +``` |
| 39 | + |
| 40 | +## 📦 Committing & Publishing |
| 41 | + |
| 42 | +We use automated releases, which means your commit messages dictate the version numbers and the changelog. |
| 43 | + |
| 44 | +When you run `git commit`, you must use **Conventional Commits**: |
| 45 | +* `feat: added a new tool` (Triggers a Minor release, e.g., 1.1.0) |
| 46 | +* `fix: resolved crash on startup` (Triggers a Patch release, e.g., 1.0.1) |
| 47 | +* `docs: updated readme` (No release triggered) |
| 48 | + |
| 49 | +*(Don't worry, if you format it wrong, the terminal will kindly reject the commit and ask you to fix it!)* |
| 50 | + |
| 51 | +Once your PR is merged into `main`, GitHub Actions will automatically compile the code, write the release notes, and publish the new version to NPM. You don't need to bump any version numbers in `package.json`. |
0 commit comments