Javascript 文件夹和子文件夹中的文件使用什么全局模式?
我正试图运行一个npm任务来对某些JS文件进行lint 给定以下列表文件:Javascript 文件夹和子文件夹中的文件使用什么全局模式?,javascript,glob,minimatch,Javascript,Glob,Minimatch,我正试图运行一个npm任务来对某些JS文件进行lint 给定以下列表文件: /root.js // should be excluded /js-src/lib/test.js // should be excluded /js-src/lib/anotherTst.js // should be excluded /js-src/utilities/anotherModule.js //
/root.js // should be excluded
/js-src/lib/test.js // should be excluded
/js-src/lib/anotherTst.js // should be excluded
/js-src/utilities/anotherModule.js // should be included
/js-src/modules/myModule.js // should be included
/js-src/common.js // should be included
以下模式适用于除“lib”之外的所有子文件夹:/js src/!(lib)/***.js
。但是,common.js被忽略,因为它在上的此处可见
小匹配/全局模式应该是什么才能起作用?试试/**/!(lib)/*.js
使用