web-llm icon indicating copy to clipboard operation
web-llm copied to clipboard

[Style] Add GitHub action for linter and pre-commit hook formater

Open Neet-Nestor opened this issue 9 months ago • 0 comments

Overview

Currently this repo doesn't have a formatter setup. Besides, even though we have ESLint rule set up, these rules are not currently enforced in this repo.

This PR adds the following to ensure better code quality:

  • Add prettier for code auto formatting
  • Run prettier format on every commit using pre-commit hook using husky
  • Add GitHub actions for automatically checks ESLint and Prettier on PRs and pushes

All other changes are just auto formatting and can be safely ignored.

Testing

Pre-commit hooks:

 git commit -m "[Style] Add GitHub action for linter and pre-commit hook formater"   

✔ Preparing lint-staged...
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Cleaning up temporary files...

Neet-Nestor avatar May 22 '24 07:05 Neet-Nestor