Skip to content

[Feat] Modernize dev tooling: tsx + husky git hooks - #6

Open
anagperal wants to merge 3 commits into
masterfrom
feature/tooling-and-scripts
Open

anagperal wants to merge 3 commits into
masterfrom
feature/tooling-and-scripts

Conversation

@anagperal

Copy link
Copy Markdown

📌 References

📝 Implementation

Replace ts-node with tsx

  • Swapped the TypeScript execution tool from ts-node to tsx for running scripts directly without a build step.
  • Removed the now-obsolete ts-node configuration block from the base TypeScript config.
  • Bumped the documented required Node version to match the pinned version, since tsx requires a newer Node runtime.

Add husky git hooks

  • Introduced husky to manage git hooks, installed automatically on dependency install.
  • Added a pre-push hook that runs formatting, linting, and tests, aborting the push if any fail.
  • Added a post-merge hook that reinstalls dependencies automatically when the lockfile changed during a merge.

Document the git hooks

  • Added a README section explaining the husky setup, how hooks are installed, and what the pre-push and post-merge hooks do.

📹 Screenshots/Screen capture

🔥 Notes to the tester

tsx requires Node >=18, so bump the documented node version to match .nvmrc (v22.22.0).
pre-push runs prettify, lint and test; post-merge runs a dep-check that reinstalls when yarn.lock changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant