Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.73 KB

CONTRIBUTING.md

File metadata and controls

52 lines (36 loc) · 1.73 KB

How to Contribute

First of all, thank you for your interest in lighthouse-plugin-field-performance! We'd love to accept your patches and contributions!

1. Install dependencies

yarn install

2. Run plugin

yarn install # install deps
yarn link # create a global link for lighthouse-plugin-field-performance
yarn link lighthouse-plugin-field-performance # add symlink to test the plugin locally

yarn mobile-run https://www.apple.com/ # test plugin with a real PSI API response
yarn desktop-run https://www.booking.com/

yarn mobile-run https://treo.sh/ # empty response
yarn desktop-run https://treo.sh/ # just origin

lighthouse-plugin-field-performance folder is made of symlinks for a simple local testing.

3. Improve the plugin

Write your patch. Improve the plugin to help capture Field Performance.

Helpful links:

4. Tests and linters

Coding style is fully defined in .prettierrc. We use JSDoc with TypeScript for linting and annotations.

# https://github.com/GoogleChrome/lighthouse/issues/9050#issuecomment-495678706
yarn link && yarn link lighthouse-plugin-field-performance # install plugin locally

yarn test # run all linters && tests
yarn tsc -p . # run typescript checks
yarn ava test/index.js # run just AVA tests
yarn ava test/index.js -u # update AVA snapshots
PSI_TOKEN=... yarn ava test/index.js # run AVA with PSI_TOKEN