Skip to content

Latest commit

 

History

History
69 lines (41 loc) · 2.25 KB

contributing.md

File metadata and controls

69 lines (41 loc) · 2.25 KB

Contributing to Fingerprint Pro SPA integration

Working with code

We prefer using pnpm for installing dependencies and running scripts.

The main branch is locked for the push action. For proposing changes, use the standard pull request approach. It's recommended to discuss fixes or new functionality in the Issues, first.

Development playground

There is no specific playground for this library, but you can develop it with fingerprintjs-pro-react, just link this package with the pnpm link <spa-directory>. You need to build the project before testing the integration.

How to build

Just run:

pnpm build

Code style

The code style is controlled by ESLint and Prettier. Run to check that the code style is ok:

pnpm lint

You aren't required to run the check manually, the CI will do it. Run to fix code style mistakes (not all mistakes can be fixed automatically):

pnpm lint:fix

How to test

Tests located in __tests__ folder and run by jest in jsdom environment.

To run tests you can use IDE instruments or just run:

pnpm test

To check the distributive TypeScript declarations, build the project and run:

pnpm test:dts

Committing changes

We follow Conventional Commits for committing changes. We use git hooks to check that the commit message is correct.

How to publish

The library is automatically released and published to NPM on every push to the main branch if there are relevant changes. The workflow must be approved by one of the maintainers, first.

Generating docs

We use typedoc to generate docs. To generate docs run:

pnpm docs

The docs will be generated into ./docs directory.

The docs are automatically deployed to Github Pages on every push to the main branch.