-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Labels
Description
I love the fact that pre-commit ties directly into package.json scripts from an ergonomics perspective.
However, I think it'd be a good idea to avoid the npm sub-process altogether, for performance reasons. You could, for example, look up the scripts yourself and run them with the ./node_modules/.bin prefix.
Every commit will pay a penalty of ~380ms per pre-commit script defined. See investigation by @vjeux: prettier/prettier#443
Since pre-commit is now the recommended way to set up prettier, I think this is very much a worthwhile optimization that'll save a lot of time to many people.
styfle