Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to this project.
Please be respectful and constructive in all interactions. We aim to create a welcoming environment for all contributors.
- Node.js 18 LTS or 20 LTS
- pnpm 10.27.0+
- Git
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/desktop-mobile.git cd desktop-mobile - Install dependencies:
pnpm install
- Build all packages:
pnpm turbo build
- Run tests to verify setup:
pnpm test
See docs/setup.md for detailed setup instructions.
Create a new branch for your changes:
git checkout -b feature/my-feature
# or
git checkout -b fix/my-bugfixBranch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test improvementschore/- Build/tooling changes
- Write code following our coding standards
- Add tests for new functionality
- Update documentation as needed
- Ensure tests pass:
pnpm test - Ensure linting passes:
pnpm lint
We use conventional commits for clear commit history:
git add .
git commit -m "feat: add new feature"Commit message format:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Build process or tooling changesperf: Performance improvements
Scope:
Scope by framework, not package name. Most changes that touch a service, its plugin, fixtures, and E2E tests are all part of the same logical unit of work. For cross-cutting changes, omit the scope.
# Framework-scoped (changes within one framework's ecosystem)
git commit -m "feat(tauri): complete mocking"
git commit -m "fix(electron): windows multiremote"
# No scope (cross-cutting or shared changes)
git commit -m "refactor: extract shared diagnostics to native-utils"
git commit -m "docs: update installation instructions"
git commit -m "chore: update deps"git push origin feature/my-featureThen create a pull request on GitHub with:
- Clear title describing the change
- Description of what changed and why
- Reference to any related issues
- Screenshots (if applicable)
- Use TypeScript strict mode
- Prefer
undefinedovernull - Use ESM (ES Modules) everywhere
- Avoid
any- use proper types - JSDoc for public APIs only when necessary (prefer self-documenting code)
- Use 2 spaces for indentation
- Use single quotes for strings
- Use trailing commas in objects and arrays
- Max line length: 120 characters
- Use arrow functions for callbacks
Our linters (Biome and ESLint) will auto-fix most style issues:
pnpm lint:fix
pnpm format- No barrel files (
index.tswith only re-exports) except in package roots - Avoid nested ternaries - extract logic for readability
- Use meaningful names for files and directories
- Keep files focused - one main export per file
- All code must have 80%+ test coverage
- Write tests for:
- New features
- Bug fixes
- Edge cases
- Error handling
We use Vitest for testing:
import { describe, expect, it, beforeEach, afterEach } from 'vitest';
describe('MyFeature', () => {
it('should do something', () => {
expect(doSomething()).toBe(expected);
});
it('should handle errors', () => {
expect(() => doSomethingBad()).toThrow('Error message');
});
});# Run all tests
pnpm test
# Run tests for specific package
pnpm --filter @wdio/electron-service test
# Run tests with coverage
pnpm test:coverage
# Run tests in watch mode
pnpm --filter @wdio/electron-service vitest- JSDoc for public APIs only when necessary
- Prefer self-documenting code over comments
- No comments unless the logic isn't self-evident
- Each package must have a comprehensive README
- Include installation, usage, API docs, and examples
- Keep READMEs up to date with code changes
- Update
docs/when adding new features - Add examples to
examples/directory - Update CHANGELOG.md for notable changes
Ensure your PR passes all checks:
# Build all packages
pnpm turbo build
# Run linting
pnpm lint
# Run type checking
pnpm typecheck
# Run all tests
pnpm test
# Run tests with coverage
pnpm test:coverage- Code follows project conventions
- Tests added/updated and passing
- Test coverage ≥ 80%
- Documentation updated
- Commit messages follow convention
- No TypeScript errors
- Linting passes
- All CI checks passing
- Maintainers will review your PR
- Address any requested changes
- Once approved, a maintainer will merge
When contributing to the Electron service:
- Maintain backward compatibility
- Test on Windows, macOS, and Linux
- Test with both Electron Forge and Builder
- Test with ESM and CJS configurations
When contributing to the Tauri service:
- Maintain backward compatibility with tauri-driver
- Test on Windows, macOS, and Linux
- Test with multiremote configurations
- Ensure plugin communication works correctly
- Test with various Tauri configuration patterns
When new services are added, contribution guidelines will be updated as necessary.
When contributing to shared utilities:
- Keep utilities framework-agnostic
- Document extension points clearly
- Consider impact on all services
This repository does not maintain LTS or backport branches. Only the latest version on main receives updates. For details, see MAINTENANCE.md.
Maintainers handle releases. The process is:
- Update version numbers
- Update CHANGELOG.md
- Create git tag
- Publish to npm
- Questions: Ask on GitHub Discussions
- Bugs: Report on GitHub Issues
- Discord: Join the WebdriverIO Discord for real-time support
Contributors will be:
- Credited in CHANGELOG.md
- Listed in package.json contributors
- Recognized in release notes
Thank you for contributing! 🎉