pretty-quick
pretty-quick copied to clipboard
Ignore errors with husky precommit hook
I have the husky pretty quick setup and I'm formatting html files.
Some of my HTML files include a templating language that's not supported (it's a custom templating language)
When running the hook, it throws errors because it doesn't recognize this templating language
I know I can go add a prettier-ignore tag at the top of those html files. But there's so many id have to spend an hour doing it for those certain html files.
Is there a way to just ignore the errors thrown so that the hook doesn't fail when it hits those custom html files?
Adding those files to your .prettierignore does not work for you? 🤔
https://prettier.io/docs/en/ignore.html#ignoring-files-prettierignore
There are like 750 HTML files and half of them need to be ignored. That's why in my original post I mentioned "But there's so many id have to spend an hour doing it for those certain html files."
I was just looking for a way to ignore the errors and still successfully run the commit. Because those files are the only ones with errors, I would have been comfortable bypassing the errors. We ended up just ignoring all HTML files. All good.
add the files to the ignore list
closing this because I know there is an ignore list.
nobody read what I actually asked and my response.