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.

18 lines (17 loc) 1.17 kB
import type { Rule } from 'eslint'; import type { CSSPropertyInfo, SortRemainingProperties } from '../concentric-order/types.js'; /** * Enforces a custom ordering of CSS properties based on user-defined groups. * * @param ruleContext The ESLint rule context used for reporting and fixing. * @param cssPropertyInfoList An array of CSS property information objects to be ordered. * @param userDefinedGroups Array of user-defined property groups for custom ordering. * @param sortRemainingProperties Strategy for sorting properties not in user-defined groups * ('alphabetical' or 'concentric'). Defaults to 'concentric'. * * This function compares CSS properties based on their group priority and position within * those groups. Properties not part of user-defined groups are sorted according to the * specified strategy. If an ordering violation is detected, an ESLint report is generated * with a suggested fix. */ export declare const enforceCustomGroupOrder: (ruleContext: Rule.RuleContext, cssPropertyInfoList: CSSPropertyInfo[], userDefinedGroups?: string[], sortRemainingProperties?: SortRemainingProperties) => void;