How to exclude files from Prettier glob pattern?
I have a hard time to exclude files from being formatted "on save" with Prettier using the glob pattern.
I want to exclude all files that contain the extension ".min."
foo.css (good)
foo.min.css (bad)
I tried this glob pattern:
{**/!(*.min),!(*.min)}.{js,ts,jsx,tsx,cjs,css}
Any idea?
Please sign in to leave a comment.
You can create a
.prettierignore
file that looks something like this:in your project root folder
That works. Thank you so much, Elena.