UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

17 lines (16 loc) 697 B
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.isValidTypographyToken = isValidTypographyToken; var _atlassianTypography = _interopRequireDefault(require("@atlaskit/tokens/atlassian-typography")); function isValidTypographyToken(tokenName) { return _atlassianTypography.default.filter(function (t) { return t.attributes.group === 'typography'; }).filter(function (t) { return t.cleanName.includes('font.heading') || t.cleanName.includes('font.body') || t.cleanName.includes('font.code'); }).find(function (t) { return t.cleanName === tokenName; }); }