Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
block.forEach('declaration', function (dec) {
var prop = dec.first('property'),
name = prop.first('ident');
if (name) {
if (parser.options['ignore-custom-properties']) {
// lazy load our css property list
const propertyList = require('known-css-properties').all;
if (propertyList.indexOf(name.content) !== -1) {
properties[name.content] = prop;
}
}
else {
properties[name.content] = prop;
}
}
});
root.walkDecls(decl => {
const { prop } = decl
if (!isStandardSyntaxProperty(prop)) { return }
if (!isStandardSyntaxDeclaration(decl)) { return }
if (isCustomProperty(prop)) { return }
if (!shouldCheckPrefixed && vendor.prefix(prop)) { return }
if (optionsMatches(options, "ignoreProperties", prop)) { return }
if (properties.indexOf(prop.toLowerCase()) !== -1) { return }
report({
message: messages.rejected(prop),
node: decl,
result,
ruleName,
})
})
}
return;
}
if (isCustomProperty(prop)) {
return;
}
if (!shouldCheckPrefixed && postcss.vendor.prefix(prop)) {
return;
}
if (optionsMatches(options, "ignoreProperties", prop)) {
return;
}
if (properties.indexOf(prop.toLowerCase()) !== -1) {
return;
}
report({
message: messages.rejected(prop),
node: decl,
result,
ruleName
});
});
};