我可以阻止stylelint扩展验证JavaScript文件吗? [英] Can I stop stylelint extension from validating JavaScript file?
本文介绍了我可以阻止stylelint扩展验证JavaScript文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
美好的一天,
在上图中,stylelint在JS文件中提示CSS错误.有没有一种方法可以阻止stylelint验证javascript文件,我无法在他们的官方配置指南.
In above picture, stylelint prompt a CSS error in a JS file. Is there a way to stop stylelint from validating javascript file, I coundn't find such option in their official configuration guide.
非常感谢.
推荐答案
The linter can be configured to ignore specific files using the ignoreFiles
property of the stylelint configuration object.
您可以尝试通过以下方式忽略JavaScript文件:
You can try ignoring JavaScript files with:
{
"ignoreFiles": ["**/*.js"],
"rules": { .. }
}
我相信stylelint Visual Studio Code扩展将尊重此属性.
I believe the stylelint Visual Studio Code extension will respect this property.
这篇关于我可以阻止stylelint扩展验证JavaScript文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文