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.

15 lines (14 loc) 905 B
import type { Rule } from 'eslint'; import { TSESTree } from '@typescript-eslint/utils'; /** * Recursively processes a vanilla-extract style object and reports occurrences of 'px' units. * * - Skips properties present in the allow list (supports camelCase and kebab-case). * - Traverses nested object values and delegates deeper traversal to callers for arrays/at-rules/selectors. * - Provides fix suggestions for string literals and simple template literals (no expressions). * * @param context ESLint rule context used to report diagnostics and apply suggestions. * @param node The ObjectExpression node representing the style object to inspect. * @param allowSet Set of property names (camelCase or kebab-case) that are allowed to contain 'px'. */ export declare const processNoPxUnitInStyleObject: (context: Rule.RuleContext, node: TSESTree.ObjectExpression, allowSet: Set<string>) => void;