我有一个 Wordpress 项目,其中使用了 Webpack 和 StyleLint 插件。
问题是编译 sass 时,它显示此错误,表示它无法识别我在样式中使用的“aspect-ratio”属性:
Unexpected unknown property "aspect-ratio" property-no-unknown
我尝试将“ignoreProperties”添加到 .stylelintrc.js 文件中的配置中,但它不起作用并且一直显示错误。
module.exports = {
'extends': 'stylelint-config-standard',
'rules': {
'no-empty-source': null,
'string-quotes': 'double',
'at-rule-no-unknown': [
true,
{
'ignoreProperties': [
'aspect-ratio'
]
},
{
'ignoreAtRules': [
'extend',
'at-root',
],
},
],
},
};
Run Code Online (Sandbox Code Playgroud)
我该如何解决它?(我对 StyleLint 不是很了解,这个项目是由其他人启动的。)