@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.
17 lines (16 loc) • 912 B
TypeScript
import type { Rule } from 'eslint';
import type { CSSPropertyInfo } from './types.js';
/**
* Enforces concentric ordering of CSS properties.
*
* This function checks the order of CSS properties to ensure they follow a concentric order
* based on their priority and position within their group. It performs the following steps:
* 1. Validates if there are enough properties to compare.
* 2. Creates pairs of consecutive properties for comparison.
* 3. Identifies the first pair that violates the concentric order.
* 4. If a violation is detected, reports the issue and suggests fixes using ESLint.
*
* @param ruleContext - The ESLint rule context used for reporting and fixing.
* @param cssPropertyInfoList - An array of CSS property information objects to be checked.
*/
export declare const enforceConcentricCSSOrder: (ruleContext: Rule.RuleContext, cssPropertyInfoList: CSSPropertyInfo[]) => void;