@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.
27 lines (26 loc) • 997 B
TypeScript
import type { Rule } from 'eslint';
import { TSESTree } from '@typescript-eslint/utils';
import type { ThemeContractAnalyzer } from './theme-contract-analyzer.js';
export interface ThemeTokenOptions {
themeContracts?: string[];
checkColors?: boolean;
checkSpacing?: boolean;
checkFontSizes?: boolean;
checkBorderRadius?: boolean;
checkBorderWidths?: boolean;
checkShadows?: boolean;
checkZIndex?: boolean;
checkOpacity?: boolean;
checkFontWeights?: boolean;
checkTransitions?: boolean;
allowedValues?: string[];
allowedProperties?: string[];
autoFix?: boolean;
remBase?: number;
checkHelperFunctions?: boolean;
}
/**
* Recursively processes a vanilla-extract style object and reports hard-coded values
* that should use theme tokens instead.
*/
export declare const processThemeTokensInStyleObject: (context: Rule.RuleContext, node: TSESTree.ObjectExpression, options: ThemeTokenOptions, analyzer: ThemeContractAnalyzer) => void;