I work on a python/svelte
full-stack app where we use pre-commit
. I've installed stylelint
to frontend web
dir and configured a custom hook for it :
- id: stylelint
name: stylelint
additional_dependencies:
- stylelint
entry: pnpm run --dir web lint:scss
files: ^.*\.(css|scss|svelte)$
language: node
pass_filenames: false
And the problem is: our web
folder is managed by pnpm
, but language: node
will install dependencies with npm
, and hook not gonna work.
The question is: how could I tell to pre-commit
to use pnpm
overall and install the stylelint
with pnpm add -D stylelint
?