Contribution Guide
Enforma is an open-source project, and we welcome contributions from the community. This guide explains how you can contribute to the project, whether it's through code, documentation, or other forms of support.
Getting Started
Setting Up the Development Environment
- Fork the repository on GitHub
- Clone your fork to your local machinebash
git clone https://github.com/YOUR_USERNAME/@encolajs/enforma.git cd @encolajs/enforma - Install dependenciesbash
npm install - Start the development serverbash
npm run dev - Run CI scripts to make sure everything is in order (code is formatted, tests pass etc)bash
npm ci
Code Organization
The project structure follows this organization:
/src- Source code/core- Core components/headless- Headless components/presets- UI library presets/utils- Utility functions
/tests- Test files/docs- Documentation/dist- Build output (generated)
How to Contribute
Reporting Bugs
- Search existing issues to avoid duplicates
- Create a new issue using the bug report template
- Include detailed reproduction steps
- Specify your environment (Vue version, browser, etc.)
- If possible, include a minimal reproduction
Suggesting Features
- Search existing issues to avoid duplicates
- Create a new issue using the feature request template
- Describe the feature and its benefits
- Consider use cases and implementation details
- Be open to discussion and refinement
Making Code Contributions
- Find an issue to work on, or create one to discuss your idea
- Comment on the issue to express your interest
- Create a branch in your forkbash
git checkout -b feature/your-feature-name - Implement your changes
- Write tests for your changes
- Update documentation if needed
- Run linting and testsbash
npm run ci - Commit your changes with a descriptive message
- Push your branch and create a pull request
Pull Request Process
- Fill out the pull request template completely
- Link the related issue(s)
- Wait for the CI checks to pass
- Address any requested changes from reviewers
- Once approved, maintainers will merge the PR
Coding Standards
Code Style
- Follow the existing code style
- Use ESLint and Prettier for formatting
- Run linting before submitting PRsbash
npm run ci
TypeScript
- Use proper type annotations
- Avoid using
anywhen possible - Export interfaces for public APIs
- Use type guards for type narrowing
Component Guidelines
- Use Vue 3 Composition API
- Provide descriptive prop names
- Document component props with JSDoc comments
- Use slots for content customization
- Emit meaningful events
Testing
- Write unit tests for all components and utilities
- Test edge cases and error conditions
- Mock external dependencies
- For visual components, include snapshot tests
- Aim for high test coverage
Documentation
Writing Documentation
Our documentation uses Markdown with VitePress:
- Update relevant documentation when adding or changing features
- Use clear, concise language
- Include code examples for key features
- Follow the existing documentation structure
- Preview your changes with:bash
cd docs npm run docs:dev
Creating Examples
Good examples are crucial for documentation:
- Make examples focused on a single concept
- Keep examples simple and understandable
- Include comments to explain key points
- Ensure examples are working and tested
Community
Communication Channels
- GitHub Issues: For bug reports and feature requests
- Pull Requests: For code contributions
Code of Conduct
All contributors are expected to adhere to our Code of Conduct. This promotes a positive, inclusive environment for everyone.
Recognition
All contributors will be recognized in the project. Major contributors may be invited to join as maintainers.
Development Workflow
Branching Strategy
master- Development branchfeature/*- Feature branchesbugfix/*- Bug fix branches
Release Process
- Features and fixes are merged into
master - When ready for release, the commit is tagged with the new release number
- Version number is updated following semver
- Release notes are prepared
- New npm package is published
Working with Issues
Issue Labels
bug- Something isn't workingenhancement- New feature or improvementdocumentation- Documentation changeshelp wanted- Extra attention needed
Issue Workflow
- Issues are triaged and labeled by maintainers
- Contributors can claim issues by commenting
- Once assigned, the issue moves to "In Progress"
- When a PR is submitted, the issue moves to "In Review"
- After merging, the issue is closed
Thank You
Your contributions help make Enforma better for everyone. We appreciate the time and effort you put into improving the project!
