Thank you for considering contributing to this project! We appreciate your help in making this project better. Please follow the guidelines below to ensure that your contributions are smoothly integrated.
By participating in this project, you agree to abide by our Code of Conduct. Please engage respectfully and constructively.
Begin by opening a discussion to propose your changes or improvements. We’ll invite you as contributors and assist you in creating the corresponding issue and working branch for your contribution.
Follow these steps to prepare your development environment:
-
Clone the repository using SSH:
git clone git@github.com:mnrendra/stack-trace.git
-
Navigate to the project directory:
cd stack-trace -
Switch to the assigned branch:
git checkout [assigned-branch-name]
-
Verify your Git configuration to ensure that your commits are associated with the correct author information:
git config --list
Verify that
user.nameis your name anduser.emailis your private email. -
Ensure that you’re using the latest LTS version of Node.js and a compatible version of npm:
node -v && npm -vIf outdated, please upgrade to the latest LTS version of Node.js and npm.
-
Install the project dependencies:
npm install
-
Test your local project to ensure it's ready for development:
npm test
Follow these guidelines to implement your changes:
- Write a test for your feature or fix in
./__tests__/index.ts, or create a new test file in the./__tests__directory if appropriate. - Ensure that your tests cover all affected code paths (see current coverage).
- Use TypeScript consistently for all source files (see
tsconfig.jsonfor details). - Strictly adhere to the configured ESLint rules (see
.eslintrc.jsonfor details). - Follow existing file naming and organization conventions (see project structure for reference).
- Maintain code readability and consistency by providing proper documentation. Please use JSDoc comments for all exported public APIs to ensure maintainability and auto-generation of documentation (see
./src/main.tsfor an example). - Avoid introducing breaking changes to the public API or major behavioral changes unless discussed in advance. We are following semantic versioning using semantic-release, so please follow its guidelines.
- Update the
README.mdfile to reflect any changes to public APIs, usage examples, or configuration options introduced by your contribution. - Keep commits atomic and focused on a single change.
Ensure that your changes do not break existing tests.
- Run tests before committing to confirm that all tests pass:
npm test
Ensure that your changes don’t negatively impact the OpenSSF Scorecard rating or introduce vulnerabilities.
Before running the security checks, ensure that
scorecardis installed locally:scorecard --versionIf not, follow the Scorecard documentation to install it.
-
Run security checks before committing to ensure that everything is secure:
npm run security
This checks for known vulnerabilities and ensures compliance with best practices.
We use Commitizen for generating commit messages and semantic-release for semantic versioning. Please use the provided script for committing.
-
Run the commit script to commit your changes:
npm run commit
-
Follow the Conventional Commits format.
-
Select the appropriate commit type (see conventional-commit-types for reference).
-
Ensure that your commit message includes the related issue number and aligns with the scope and naming of the assigned branch.
-
Avoid introducing breaking changes unless they have been discussed in advance.
⚠️ Pull requests with non-standard or poorly formatted commit messages will be rejected.
Ensure that your local branch is up-to-date with the base branch before pushing it to the remote repository:
git pull --rebase origin [base-branch]
⚠️ Please only pull from the base branch (e.g.,dev) — do not pull from any other branches.
Push your up-to-date local branch to the remote repository:
git push origin [assigned-branch-name]Create a Pull Request targeting the base branch (e.g., dev). After submission, a maintainer will review it before merging. Please use the following format for your Pull Request:
Must match the related issue title (e.g., feat: something).
Use the following template to ensure consistency:
issues:
* [issue title] (#[issue number])
commits:
* [commit title] ([first 7 chars of the commit hash])
Example:
issues:
* feat: something (#123)
commits:
* feat: something (abc123d)
See merged commits for reference.
- Correct target branch
- Relevant reviewers
- Proper assignee
- Updated project status
- Linked issue
If you have any questions, feel free to open a discussion. We’re here to help!
Thank you for your contributions and collaboration!