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.07 kB
import type { Rule } from 'eslint'; import { TSESTree } from '@typescript-eslint/utils'; /** * Processes the `base` and `variants` properties of a recipe object. * @param ruleContext The ESLint rule context. * @param recipeNode The recipe object node to process. * @param processProperty A callback function to process each property object (e.g., for alphabetical or concentric ordering). * * This function iterates through the properties of the recipe object: * - For the `base` property, it processes object or array style nodes. * - For the `variants` property, it processes each variant option as object or array style nodes. * * The function skips any non-Property nodes or nodes without an Identifier key. * It delegates node handling to `processStyleNode`, which safely supports * ObjectExpression and ArrayExpression values. */ export declare const processRecipeProperties: (ruleContext: Rule.RuleContext, recipeNode: TSESTree.ObjectExpression, processProperty: (ruleContext: Rule.RuleContext, value: TSESTree.ObjectExpression) => void) => void;