我正在尝试运行 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 // should be included
/js-src/modules/myModule.js // should be included
/js-src/common.js // should be included
以下模式适用于除“lib”之外的所有子文件夹:./js-src/!(lib)/**/*.js
. 但是,在globtester上可以看到 common.js 被忽略
迷你匹配/通配模式应该是什么才能使其发挥作用?
尝试/**/!(lib)/*.js
使用globster.xyz
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句