[英]ESLint 7.1.0 Error: 'patterns' must be a non-empty string or an array of non-empty strings
I have just upgraded my ESLint to 7.1.0 and if I try to run it, I get this error:我刚刚将我的 ESLint 升级到 7.1.0,如果我尝试运行它,我会收到以下错误:
Error: 'patterns' must be a non-empty string or an array of non-empty strings
I am providing the config file through the -c
parameter, but I have no idea what is the problem, any ideas?我通过
-c
参数提供配置文件,但我不知道是什么问题,有什么想法吗?
The error comes from the ESLint itself:错误来自 ESLint 本身:
at ESLint.lintFiles (...)
I ran across this issue and I had an extra trailing space after my backslash.我遇到了这个问题,反斜杠后有一个额外的尾随空格。 Look carefully and I had an extra space after the backslash in the before command.
仔细看,我在 before 命令的反斜杠后面多了一个空格。
Before -前 -
eslint \
Cool.js
After -后 -
eslint \
Cool.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.