Contribution Guidelines
Thank you for considering contributing to the proper-tags
package! Here’s a comprehensive guide to help you through the process.
Setup
- Fork the Repository: Use the GitHub interface to fork this repository to your account.
- Clone the Fork: On your local machine, open a terminal or command prompt. Use the following command to clone the forked repository:
git clone https://github.com/hexagon/proper-tags.git
- Navigate to the Repository: Change to the project directory using:
cd proper-tags
- Install Dependencies: To ensure you have all the required dependencies, run:
npm ci
Working on Your Contribution
- Create a New Branch: Always create a new branch for your work to ensure master remains clean. Use:
git checkout -b feature/<feature-name>
orgit checkout -b bugfix/<bug-name>
- Stay Updated: Ensure you regularly pull the latest changes from the upstream repository to keep your fork up-to-date:
git pull origin master
Tests
- Writing Tests: Make sure you include tests that cover any new logic or features you add. A good test not only confirms the correct behavior but can also serve as documentation for how a certain feature works.
- Running Tests: This project uses AVA for testing. To run tests, execute:
npm test
- Testing Convention: The project is set up to search for test files in the
src
directory that have the.test.js
extension.
Code Style and Quality
- Coding Standards: Adhere to the code style and patterns established in the project. This ensures consistency and readability across all contributions.
- Linting: The project uses Prettier and ESLint to maintain a consistent code style. Before committing your changes, ensure your code adheres to the rules. Run:
npm run lint
- Auto-fixing Issues: Some linting issues can be automatically fixed. Use the following command to attempt auto-fixes:
npm run lint:fix
Committing and Pushing Changes
- Commit Messages: Write clear and concise commit messages describing the changes you made.
- Atomic Commits: Make sure each commit contains related changes. Avoid bundling unrelated changes into a single commit.
- Push Your Changes: Once you’re ready to submit your changes, push the branch to your forked repository:
git push origin feature/<feature-name>
Submitting a Pull Request
- Open a Pull Request: Navigate to the GitHub page of your forked repository and click on the “New pull request” button.
- Describe Your Changes: In the pull request description, provide a detailed explanation of the changes you’ve made. If your PR is fixing a bug, provide steps to reproduce the bug.
- Wait for Review: Maintainers of the
proper-tags
package will review your pull request. Address any feedback or changes requested.
Final Notes
- Please ensure your code doesn’t introduce any regressions by running the full test suite before submitting a PR.
- Always reference relevant issues or discussions in your pull requests.
- Contributions aren’t just about code! If you find a typo, a confusing piece of documentation, or have ideas for improving the project structure, we’d love to hear from you.
Thank you for helping improve proper-tags
! ```