UNPKG

@antebudimir/eslint-plugin-vanilla-extract

Version:

ESLint plugin for enforcing best practices in vanilla-extract CSS styles, including CSS property ordering and additional linting rules.

26 lines (25 loc) 1.16 kB
/** * Creates a map of CSS properties to their priority information. * * This function generates a Map where each key is a CSS property (in camelCase), * and each value is an object containing: * - groupIndex: The index of the property's group * - positionInGroup: The position of the property within its group * - inUserGroup: Whether the property is in a user-specified group * * The function prioritizes user-specified groups over default concentric groups. * If user groups are provided, they are processed first. Any remaining concentric * groups are then processed to ensure complete coverage of CSS properties. * * @param userGroups - An optional array of user-specified group names to prioritize * @returns A Map of CSS properties to their priority information * * @example * const priorityMap = createCSSPropertyPriorityMap(['layout', 'typography']); * console.log(priorityMap.get('display')); // { groupIndex: 0, positionInGroup: 0, inUserGroup: true } */ export declare const createCSSPropertyPriorityMap: (userGroups?: string[]) => Map<string, { groupIndex: number; positionInGroup: number; inUserGroup: boolean; }>;