Skip to content

Latest commit

 

History

History
132 lines (90 loc) · 2.65 KB

CONTRIBUTING.md

File metadata and controls

132 lines (90 loc) · 2.65 KB

Contributing

Table of Contents

Pull requests are welcome! By participating in this project, you agree to abide by our code of conduct.

Fork

Fork and then clone the repository:

# replace <USER> with your username
git clone [email protected]:<USER>/html-react-parser.git
cd html-react-parser

Install

Set the Node.js version with nvm:

nvm use

Install the dependencies:

npm install

Develop

Make your changes, add tests/documentation, and ensure tests and lint pass:

npm test
npm run lint
npm run lint:tsc

Write a commit message that follows the Conventional Commits specification:

  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • test: Add missing tests or correct existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Updates configuration files and scripts for continuous integration
  • docs: Documentation only changes

The commit message will be linted during the pre-commit Git hook. To manually lint the most recent commit message:

git log -1 --pretty=format:"%s" | npx commitlint

Push to your fork and create a pull request.

At this point, wait for us to review your pull request. We'll try to review pull requests within 1-3 business days. We may suggest changes, improvements, and/or alternatives.

Things that will improve the chance that your pull request will be accepted:

  • Write tests that pass CI.
  • Write good documentation.
  • Write a good commit message.

Test

Run tests with coverage:

npm test

Run tests in watch mode:

npm run test:watch

View the coverage report in your browser:

open coverage/lcov-report/index.html

Lint

Run ESLint:

npm run lint

Fix lint errors:

npm run lint:fix

Check types:

npm run lint:dts

Release

Release and publish are automated with Release Please.