UNPKG

@atlaskit/eslint-plugin-ui-styling-standard

Version:

The eslint plugin to enforce and educate on Atlassian's UI Styling Standard

14 lines • 474 B
import { closestOfType } from 'eslint-codemod-utils'; import { isSafeStyleArgument } from './is-safe-style-argument'; export function isSafeCss(css) { return css.references.every(function (ref) { var callExpression = closestOfType(ref.identifier, 'CallExpression'); if (!callExpression) { return false; } if (callExpression.callee !== ref.identifier) { return false; } return callExpression.arguments.every(isSafeStyleArgument); }); }