UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

11 lines 521 B
import { isXcss } from '@atlaskit/eslint-utils/is-supported-import'; export const isDecendantOfXcssBlock = (node, referencesInScope, importSources) => { // xcss contains types for all properties that accept tokens, so ignore xcss for linting as it will report false positives if (node.type === 'CallExpression' && isXcss(node.callee, referencesInScope, importSources)) { return true; } if (node.parent) { return isDecendantOfXcssBlock(node.parent, referencesInScope, importSources); } return false; };