JoshuaKGoldberg / JoshuaKGoldberg/create-typescript-app

🚀 Feature: Switch from husky & lint-staged to something faster

Open
#2,363 2 comments 0 reactions 0 assignees View on GitHub
status: needs investigation type: feature
Dominant language
TypeScript
Stars
1.4k
Forks
89
Avg merge
1m
Merged PRs (30d)
3

Description

### Feature Request Checklist

- [x] I have looked at the latest version of the project.
- [x] I have [searched for related issues](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aissue) and found none that matched my issue.

### Overview

[Lefthook](https://lefthook.dev/) can be used to replace husky + lint-staged with a single tool. @cylewaitforit and I have been using it in OctoGuide for a while and it's really nice! Shoutout to @cylewaitforit for leading this in https://github.com/octoguide/bot/issues/257 -> https://github.com/octoguide/bot/pull/274. 🗺️

Looking at that PR, the impact is:

* Root entries: -1 directory, +1 file. Roughly equal.
* `package.json`: 1 less key (`"lint-staged"`); 1 less dependency
* Size of install: from ~2MB ([1.91MB lint-staged](https://packagephobia.com/result?p=lint-staged) + [~4kB husky](https://packagephobia.com/result?p=husky)) to [~17MB lefthook](https://packagephobia.com/result?p=lefthook) 😬

### Additional Info

I think we should look into why the lefthook install size is so big. Personally I see think this should be a blocker for adding to CTA.

🎁

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.