UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

12 lines (10 loc) 456 B
export var getCssMapObject = function getCssMapObject(node) { // We assume the argument `node` is already a cssMap() call. // Things like the number of arguments to cssMap and the type of // cssMap's argument are handled by the TypeScript compiler, so // we don't bother with creating eslint errors for these here if (node.arguments.length !== 1 || node.arguments[0].type !== 'ObjectExpression') { return; } return node.arguments[0]; };