![](/img/trans.png)
[英]Is it possible to ignore ESLint configuration files in certain, but not all, parent directories?
[英]Eslint ignore all exept js fles
如何忽略目录scr/
中除.js
文件之外的所有文件? (使用.eslintignore
文件)
我尝试使用
scr/*
!scr/*.js
单个星*
仅匹配文件名,如果您有目录,则需要使用**
作为匹配的一部分:
# Exclude **/scr/
scr/
# ...but not **/scr/**/*.js
!scr/**/*.js
在这种情况下,以 javascript 文件为目标可能比尝试忽略所有其他文件更容易。 像eslint scr/**/*.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.