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.

16 lines (15 loc) 884 B
import type { Rule } from 'eslint'; import { TSESTree } from '@typescript-eslint/utils'; /** * Processes a style object to enforce alphabetical ordering of CSS properties. * * This function handles different types of style objects: * 1. If the object is invalid or not an ObjectExpression, it returns immediately. * 2. For 'selectors' objects, it processes nested selectors recursively. * 3. For regular style objects, it separates and enforces alphabetical order on properties. * 4. It always processes nested objects recursively, regardless of type. * * @param ruleContext - The ESLint rule context for reporting and fixing issues. * @param styleObject - The object expression representing the style object to be processed. */ export declare const enforceAlphabeticalCSSOrderInStyleObject: (ruleContext: Rule.RuleContext, styleObject: TSESTree.ObjectExpression) => void;