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.

20 lines (19 loc) 1.39 kB
import type { Rule } from 'eslint'; import type { SortRemainingProperties } from '../concentric-order/types.js'; import type { OrderingStrategy } from '../types.js'; /** * Creates an ESLint rule listener with visitors for style-related function calls using reference tracking. * This automatically detects vanilla-extract functions based on their import statements. * * @param ruleContext The ESLint rule context. * @param orderingStrategy The strategy to use for ordering CSS properties. * @param userDefinedGroupOrder An optional array of property groups for the 'userDefinedGroupOrder' strategy. * @param sortRemainingProperties An optional strategy for sorting properties not in user-defined groups. * @returns An object with visitor functions for the ESLint rule. */ export declare const createReferenceBasedNodeVisitors: (ruleContext: Rule.RuleContext, orderingStrategy: OrderingStrategy, userDefinedGroupOrder?: string[], sortRemainingProperties?: SortRemainingProperties) => Rule.RuleListener; /** * Backwards-compatible alias that maintains the original API. * Uses reference tracking internally for automatic detection of vanilla-extract functions. */ export declare const createNodeVisitors: (ruleContext: Rule.RuleContext, orderingStrategy: OrderingStrategy, userDefinedGroupOrder?: string[], sortRemainingProperties?: SortRemainingProperties) => Rule.RuleListener;