UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

18 lines (15 loc) 589 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCssMapObject = void 0; var getCssMapObject = exports.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]; };