Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function isValidProperty(
property: string,
ast: any,
isList?: boolean = false
): boolean {
// if we do not know a property, we just skip it
// and pretend its valid anyways
// TODO: add valid property list
if (!properties.hasOwnProperty(property)) {
const unprefixedProperty = unprefixProperty(property)
// we also check for prefixed properties that are
// actually standard CSS properties
if (properties.hasOwnProperty(unprefixedProperty)) {
return isValidProperty(unprefixedProperty, ast, isList)
}
// TODO: remove as soon as 100% props are covered
if (_missingProps.indexOf(property) !== -1) {
return true
}
console.warn(
`Unknown property: "${property}". If it is a valid CSS property, please file an issue.
https://github.com/rofrischmann/bredon/issues/new`
)