简体   繁体   English

" Eslint "没有找到与模式 "lint" 匹配的文件。请检查模式中的输入错误。 错误

[英]Eslint "No files matching the pattern "lint" were found. Please check for typing mistakes in the pattern." error

recently I have updated my project eslint package to "eslint": "^6.8.0" .最近我将我的项目 eslint 包更新为"eslint": "^6.8.0" And this is when I'm seeing the error这是我看到错误的时候

Oops! Something went wrong! :(

ESLint: 6.8.0.

No files matching the pattern "lint" were found.
Please check for typing mistakes in the pattern.

My package JSON script looks like this:我的包 JSON 脚本如下所示:

"lint": "eslint lint --color src -f ./node_modules/eslint-friendly-formatter src/ tests/unit/__mocks__/ --ext .json --ext .js -c .eslintrc.js",

I'm not sure what's wrong with this script, it was wroking fine with the older verisons of eslint.我不确定这个脚本有什么问题,它在 eslint 的旧版本上运行良好。

When looking for a solution in the forums, the suggestion is to add a flag --no-error-on-unmatched-pattern .在论坛中寻找解决方案时,建议添加一个标志--no-error-on-unmatched-pattern I'm not sure why do I need to add this flag to my script.我不确定为什么需要将此标志添加到我的脚本中。 Any help appreciated!任何帮助表示赞赏!

I guess people have faced this issue on verison 5 as well.. See this issue我想人们在 verison 5 上也遇到过这个问题.. 看到这个问题

https://github.com/eslint/eslint/issues/10587 https://github.com/eslint/eslint/issues/10587

--no-error-on-unmatched-pattern was added to ignore this kind of problem. --no-error-on-unmatched-pattern以忽略此类问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 prettier 时出现错误“未找到与模式匹配的文件” - Getting an error 'No files matching the pattern were found' when using prettier Javascript继承模式。 反馈好吗? - Javascript Inheritance pattern. Feedback please? ESlint:通过 glob 模式验证文件 - ESlint: validate files by glob pattern typescript / JS模块模式。 分割成多个文件 - typescript/JS module pattern. splitting into multiple files JavaScript装饰模式。 错误:超出了最大调用堆栈大小 - JavaScript Decorator pattern. Error: Maximum call stack size exceeded 排除特定模式后,在特定模式后匹配“,”。 (在JavaScript中落后) - Match a “,” after a specific pattern while excluding this pattern. (lookbehind in JavaScript) 在IDEA中按模式将ESLint规则仅应用于某些文件 - Apply ESLint rules only to some files by pattern in IDEA Vim YouCompleteMe模式未找到错误 - Vim YouCompleteMe Pattern Not Found Error eslint:如何仅对接触过的文件进行 lint - eslint: howto lint only touched files 猫鼬错误:`{“ message”:“找不到匹配的文档。”,“ name”:“ VersionError”}` - Mongoose Error: `{“message”:“No matching document found.”,“name”:“VersionError”}`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM