| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1bcf9fb commit 623c707
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,5 +5,6 @@ Describe your changes. | |||
| 5 | 5 | Add link to the related issue. | |
| 6 | 6 | ||
| 7 | 7 | **Check list:** | |
| 8 | + - [ ] Ran `npm run check` locally (format, lint, build, test) and all checks pass. | ||
| 8 | 9 | - [ ] Mark if documentation changes are required. | |
| 9 | 10 | - [ ] Mark if tests were added or updated to cover the changes. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,4 @@ | |||
| 1 | + #!/usr/bin/env sh | ||
| 2 | + . "$(dirname -- "$0")/_/husky.sh" | ||
| 3 | + | ||
| 4 | + npx lint-staged | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,4 @@ | |||
| 1 | + #!/usr/bin/env sh | ||
| 2 | + . "$(dirname -- "$0")/_/husky.sh" | ||
| 3 | + | ||
| 4 | + npm run build && npm test | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,6 +63,17 @@ Pull requests are the easiest way to contribute changes to git repos at GitHub. | |||
| 63 | 63 | - To lint the code, **you need to run the `lint:fix` script** | |
| 64 | 64 | - To transpile source code to `javascript` we use [NCC](https://github.com/vercel/ncc). **It is very important to run the `build` script after making changes**, otherwise your changes will not get into the final `javascript` build | |
| 65 | 65 | ||
| 66 | + > [!TIP] | ||
| 67 | + > Instead of running each script individually, you can run the aggregate scripts: | ||
| 68 | + > | ||
| 69 | + > - `npm run fix` — formats, lints (with autofix) and rebuilds the `dist/` bundle. | ||
| 70 | + > - `npm run check` — runs the same validation as CI: `format-check`, `lint`, `build` and `test`. **Run this before pushing a pull request** to make sure it will pass the required checks. | ||
| 71 | + > | ||
| 72 | + > Git hooks are installed automatically when you run `npm install` (via [husky](https://typicode.github.io/husky/)): | ||
| 73 | + > | ||
| 74 | + > - a **pre-commit** hook formats and lints staged files with [lint-staged](https://github.com/lint-staged/lint-staged); | ||
| 75 | + > - a **pre-push** hook rebuilds `dist/` and runs the test suite. | ||
| 76 | + | ||
| 66 | 77 | **Learn more about how to implement tests:** | |
| 67 | 78 | ||
| 68 | 79 | Adding or changing tests is an integral part of making a change to the code. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments