UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

11 lines 471 B
import { isNodeOfType } from 'eslint-codemod-utils'; var _isDecendantOfGlobalToken = function isDecendantOfGlobalToken(node) { if (isNodeOfType(node, 'CallExpression') && isNodeOfType(node.callee, 'Identifier') && (node.callee.name === 'token' || node.callee.name === 'getTokenValue')) { return true; } if (node.parent) { return _isDecendantOfGlobalToken(node.parent); } return false; }; export { _isDecendantOfGlobalToken as isDecendantOfGlobalToken };