I'm trying to format my next.js project with prettier. In my package.json I've defined this:
"scripts": {
"format": "prettier --write \"**/*.{js, jsx}\"",
},
So my project has a lot of folders:
I obviously don't want to run prettier in my .next
folder. How can I ignore some folders?
Try this:
"scripts": {
"format": "prettier --write \"{,!(.next)/**/}*.{js, jsx}\"",
},