@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.
32 lines (31 loc) • 1.31 kB
TypeScript
import type { Rule } from 'eslint';
import { TSESTree } from '@typescript-eslint/utils';
/**
* Checks if a value has trailing zeros and returns the fixed value if needed.
*
* @param value The string value to check
* @returns Object with hasTrailingZero flag and fixed value, or null if no trailing zeros
*/
export declare const checkTrailingZero: (value: string) => {
hasTrailingZero: boolean;
fixed: string;
} | null;
/**
* Processes a single string value and checks for trailing zeros in all numeric values.
* Handles strings with multiple numeric values (e.g., "1.0px 2.50em").
* Also handles values within function calls (e.g., "rotate(45.0deg)").
*
* @param value The string value to process
* @returns Object with hasTrailingZero flag and fixed value, or null if no trailing zeros
*/
export declare const processStringValue: (value: string) => {
hasTrailingZero: boolean;
fixed: string;
} | null;
/**
* Recursively processes a style object, reporting and fixing instances of trailing zeros in numeric values.
*
* @param ruleContext The ESLint rule context.
* @param node The ObjectExpression node representing the style object to be processed.
*/
export declare const processTrailingZeroInStyleObject: (ruleContext: Rule.RuleContext, node: TSESTree.ObjectExpression) => void;