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.

22 lines (21 loc) 1.13 kB
import type { Rule } from 'eslint'; import { TSESTree } from '@typescript-eslint/utils'; /** * Enforces concentric ordering of CSS properties within a style object. * * This function processes the given style object to ensure that CSS properties * follow a concentric order based on predefined priority groups. It handles * different types of style objects by: * 1. Validating that the input is an ObjectExpression. * 2. Processing 'selectors' objects separately and recursively applying the * concentric order enforcement. * 3. Separating regular properties and building a list of CSSPropertyInfo * objects with priority details. * 4. Enforcing concentric order on the properties using their priority * information. * 5. Recursively processing nested selectors and style objects. * * @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 enforceConcentricCSSOrderInStyleObject: (ruleContext: Rule.RuleContext, styleObject: TSESTree.ObjectExpression) => void;