UNPKG

@antebudimir/eslint-plugin-vanilla-extract

Version:

Comprehensive ESLint plugin for vanilla-extract with CSS property ordering, style validation, and best practices enforcement. Supports alphabetical, concentric and custom CSS ordering, auto-fixing, and zero-runtime safety.

18 lines (17 loc) 1.08 kB
import type { Rule } from 'eslint'; import { TSESTree } from '@typescript-eslint/utils'; import type { SortRemainingProperties } from '../concentric-order/types.js'; /** * Enforces custom group ordering of CSS properties within a recipe function call. * * @param ruleContext The ESLint rule context for reporting and fixing issues. * @param callExpression The CallExpression node representing the recipe function call. * @param userDefinedGroups An array of property groups in the desired order. * * This function does the following: * 1. Validates that the first argument of the recipe function is an ObjectExpression. * 2. Processes the recipe object's properties if valid. * 3. Applies custom group ordering to CSS properties in relevant properties (e.g., 'base', 'variants'). * 4. Processes nested selectors and style objects recursively. */ export declare const enforceUserDefinedGroupOrderInRecipe: (ruleContext: Rule.RuleContext, callExpression: TSESTree.CallExpression, userDefinedGroups: string[], sortRemainingProperties?: SortRemainingProperties) => void;