Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ast.walkRules((rule) => {
for (const invalidPair of validateRule(rule)) {
const message = formatMessage(invalidPair);
const isValue = invalidPair.lastPrefixed.prop === invalidPair.unprefixed.prop;
const location = getCSSLocationFromNode(invalidPair.unprefixed, { isValue });
const codeSnippet = getFullCSSCodeSnippet(invalidPair.unprefixed);
const severity = Severity.warning;
context.report(
resource,
message,
{ codeLanguage: 'css', codeSnippet, element, location, severity });
}
});
});