When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. Please note we have a code of conduct, please follow it in all your interactions with the project.
To set up a development environment, please follow these steps:
-
Before cloning the repo, ensure you have the following software installed.
Node.js
(You should install a version manager that could handle .node-version file)pnpm
(You might have already installed it if you enabled the Corepack feature)- git
-
Clone the repo
git clone https://github.com/RightCapitalHQ/phpdoc-parser
-
Install the dependencies
pnpm install
-
The code style follows the RightCapital front-end style guide
-
Some naming rules might be break. because for some variables or methods naming, we keep it the same as the upstream library(PHP version PHPDoc parer), It would make it easier to catch up the upstream changes.
- eg. for the boolean variable/property name, our guide let us prefix the name with
is
,has
,can
,should
, however, the upstream lib is not following this rule. so we just use the upstream's name. likelines
,indexes
, ``parseDescription`. - Our style guide requires enum types to be named in camel case. but for the enum directly from upstream lib, we just use the all caps for the member of the enum. like
enum ArrayShapeNodeKind { ARRAY = 'array', LIST = 'list', }
- eg. for the boolean variable/property name, our guide let us prefix the name with
Please ensure your code is
- Passing the ESLint check and Prettier check
- Passing all existing test cases
and Your commit message is following the spec of the Conventional Commits ( https://www.conventionalcommits.org/ )
we use beachball to automate the npm publishing and changelog. when you fire a PR. the only thing the contributor needs to take care is ensuring run
pnpm change
to generate appropriate change file for us to bump the version and generate the changelog
You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new feature? You can help us by submitting an issue on GitHub. Before you create an issue, make sure to search the issue archive -- your issue may have already been addressed!
Please try to create bug reports that are:
- Reproducible. Include steps to reproduce the problem.
- Specific. Include as much detail as possible: which version, what environment, etc.
- Unique. Do not duplicate existing opened issues.
- Scoped to a Single Bug. One bug per report.
Even better: Submit a pull request with a fix or new feature!
- Search our repository for open or closed Pull Requests that relate to your submission. You don't want to duplicate effort.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing_feature
) - Commit your changes (
git commit -m 'feat: add amazing_feature'
) PHPDoc Parser uses conventional commits, so please follow the specification in your commit messages. - Push to the branch (
git push origin feature/amazing_feature
) - Open a Pull Request