UNPKG

@salesforce-ux/eslint-plugin-slds

Version:

ESLint plugin provides custom linting rules specifically built for Salesforce Lightning Design System 2 (SLDS 2 beta)

38 lines (37 loc) 1.78 kB
import { type PositionInfo } from './hardcoded-shared-utils'; /** * Check if a CSS property should be targeted for linting based on prefixes or explicit targets * @param property - The CSS property name to check * @param propertyTargets - Array of specific properties to target (empty means target all) * @returns true if the property should be targeted */ export declare function isTargetProperty(property: string, propertyTargets?: string[]): boolean; /** * CSS Variable information for SLDS variable detection */ export interface CssVariableInfo { name: string; hasFallback: boolean; } /** * Specialized CSS variable traversal for SLDS variables * Finds var(--slds-*) functions and reports their fallback status */ export declare function forEachSldsVariable(valueText: string, callback: (variableInfo: CssVariableInfo, positionInfo: PositionInfo) => void): void; /** * Specialized CSS variable traversal for SLDS/SDS namespace detection * Finds var(--slds-*) or var(--sds-*) functions in CSS values * Note: hasFallback is set to false as it's unused for namespace validation */ export declare function forEachNamespacedVariable(valueText: string, callback: (variableInfo: CssVariableInfo, positionInfo: PositionInfo) => void): void; /** * Specialized CSS variable traversal for LWC variables * Finds var(--lwc-*) functions in CSS values and reports their fallback status */ export declare function forEachLwcVariable(valueText: string, callback: (variableInfo: CssVariableInfo, positionInfo: PositionInfo) => void): void; /** * Format multiple hook suggestions for better readability * @param hooks - Array of hook names to format * @returns Formatted string with hooks */ export declare function formatSuggestionHooks(hooks: string[]): string;