Husky/lint-staged is it possible to exclude/ignore file?

uidevthing picture uidevthing · Apr 1, 2019 · Viewed 15.4k times · Source

Is it possible to exclude/ignore a file when using Husky/lint-staged hooks?

Looking through the docs atm but not having any luck finding anything on this.

Was hoping there was something like an

/*ignore*/

tag that I could add.

To make lint-staged ignore certain files that were causing formatting issues.

Any thought on this greatly appreciated :)

Answer

uidevthing picture uidevthing · Apr 1, 2019

Ended up adding

.prettierignore 

file.

Not ideal but seems to do the job ok.