@antebudimir/eslint-plugin-vanilla-extract
Version:
ESLint plugin for enforcing best practices in vanilla-extract CSS styles, including CSS property ordering and additional linting rules.
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;