I am trying to create a regex glob for an NPM script. This is what I have:
"format": "prettier-eslint --write \"{,!(node_modules|cypressTests)/**/}*.{js,json,vue}\""
And this currently formats all .js, .json, and .vue files that are NOT in the node_modules folder or in the cypressTests folder.
The below is my problem:
The cypressTests
folder ALSO contains a node_modules
folder that I do not want to format. How can I exclude ./cypressTests/node_modules
just like I am currently doing for the folder ./node_modules
?
I tried like this and this does not work. It then excludes pretty much everything in the entire project for some reason:
"format": "prettier-eslint --write \"{,!(node_modules|cypressTests/node_modules)/**/}*.{js,json,vue}\""