UNPKG

@stylistic/stylelint-plugin

Version:
19 lines (16 loc) 393 B
/** * Check whether the declaration is processed by `postcss-styled-syntax`. * * @param {import('postcss').Declaration} declaration * @returns {boolean} */ export function isStyledSyntaxDeclaration (declaration) { let parent = declaration.parent while (parent) { if (parent.raws.styledSyntaxRangeStart !== undefined) { return true } parent = parent.parent } return false }