[英]How to get .eslintrc.js ignore all none js files
How to configure .eslintr.js
to ignore all non-js files? 如何配置
.eslintr.js
以忽略所有非js文件?
I started a .eslintignore
file with the rule !**/*.js
but doesn't work. 我使用规则
!**/*.js
.eslintignore
启动了.eslintignore
文件,但无效。
You're close. 你很亲密 In the .eslintignore section for negating (
!
) (emphasis mine): 在.eslintignore部分中用于排除(
!
) (强调我的意思):
Lines preceded by !
行前加! are negated patterns that re-include a pattern that was ignored by an earlier pattern.
是否定的模式,它们重新包含了先前模式忽略的模式。
So, ignore everything (you can use blob, or a specific directory, etc.) and then un-ignore js files: 因此,忽略所有内容(可以使用blob或特定目录等),然后忽略js文件:
src/
!src/**/*.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.