@atlaskit/eslint-plugin-design-system
Version:
The essential plugin for use with the Atlassian Design System.
17 lines (16 loc) • 731 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isDecendantOfXcssBlock = void 0;
var _isSupportedImport = require("@atlaskit/eslint-utils/is-supported-import");
var _isDecendantOfXcssBlock = exports.isDecendantOfXcssBlock = function 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' && (0, _isSupportedImport.isXcss)(node.callee, referencesInScope, importSources)) {
return true;
}
if (node.parent) {
return _isDecendantOfXcssBlock(node.parent, referencesInScope, importSources);
}
return false;
};