docs
docs copied to clipboard
feat: ensure formatting and linting checks done on local development are required for PRs to pass
Problem
I've hit errors a lot recently from PRs made on Github UI or without using dependencies (Husky) that cause errors down the line once someone does contribute to site and test locally, or install deps.
The current linting and formatting checks done by Husky are only performed if the user installs dependencies and commits after doing this. If someone does not build the site, or install dependencies, locally, then they would be able to push bypassing the protections aimed at being accomplished in the automation.
Solution
Add CI checks for linting and formatting. Review husky and package.json to make sure that the flow makes sense. https://github.com/celestiaorg/docs/blob/2b46222b62f6719cabf12ed33354caa91df27cbc/package.json#L7-L9
Try using git hooks instead.
celestia node example: https://github.com/celestiaorg/celestia-node/blob/main/.githooks/pre-commit
this then runs whenever someone does git commit
and it'll prevent the commit from being made if there is a failures.
this this the install command https://github.com/celestiaorg/celestia-node/blob/e55e1c88708b46839867bcbbed9bcdd8a3ffa830/Makefile#L29C1-L33C22 You should be able to do that in the package.json scripts.
UX issue to be solved for local dev