UNPKG

@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.

15 lines (14 loc) 709 B
import type { Rule } from 'eslint'; import { TSESTree } from '@typescript-eslint/utils'; /** * Enforces alphabetical ordering of CSS properties. * @param ruleContext The ESLint rule context. * @param regularProperties An array of regular CSS properties to be checked. * * This function does the following: * 1. Checks if there are enough properties to compare (more than 1). * 2. Creates pairs of consecutive properties for comparison. * 3. Finds the first pair that violates alphabetical order. * 4. If a violation is found, reports the issue and generates fixes. */ export declare const enforceAlphabeticalCSSOrder: (ruleContext: Rule.RuleContext, regularProperties: TSESTree.Property[]) => void;