@atlaskit/eslint-plugin-design-system
Version:
The essential plugin for use with the Atlassian Design System.
27 lines (26 loc) • 794 B
TypeScript
import { type ObjectExpression } from 'eslint-codemod-utils';
declare const referenceObject: {
width: string;
height: string;
padding: string;
position: string;
border: string;
clip: string;
overflow: string;
whiteSpace: string;
};
type KeyValue = {
key: string;
value: string;
};
export type ReferenceObject = typeof referenceObject;
/**
* Given a node, translate the node into css key-value pairs and
* compare the output to the reference styles required to make a
* visually hidden element.
*
* @returns {number} A fraction between 0-1 depending on the object's likeness.
*/
export declare const getObjectLikeness: (node: ObjectExpression) => number;
export declare const countMatchingKeyValues: (styleEntries: KeyValue[]) => number;
export {};