export interface LintAttribute { /** As written: an attribute (`icon`, `aria-label`) or a property (`ariaLabel`, `label`). */ name: string; /** * How it reaches the element: `static`, an attribute in the markup (`tone="weak"`); * `property`, a property binding (``, Angular `[disabled]`); * `attribute`, an attribute binding (Angular `[attr.disabled]`). */ binding: 'static' | 'property' | 'attribute'; /** * The value when the source states it: a string, a number, a boolean or null (a literal * expression, `{false}`, `[attr.x]="null"`); `''` for an attribute without value; * undefined for an expression only known at run time. */ value: string | number | boolean | null | undefined; /** What to report on. */ node: unknown; } export interface LintClass { /** One class, as written (`dark:bg-white/50`). */ name: string; /** What to report on: the attribute or binding that holds it, in JSX the literal. */ node: unknown; } export interface LintCustomProperty { /** An `--mds-*` name its inline style sets or reads. */ name: string; /** What to report on: the attribute, binding or object key that holds it. */ node: unknown; } export interface LintElement { /** The custom element tag: `mds-button` for `` and ``. */ tag: string; attributes: LintAttribute[]; classes: LintClass[]; /** The `--mds-*` custom properties its inline style names, as written in the template. */ customProperties: LintCustomProperty[]; /** It has, or may have, content for the default slot: text, an element, an expression. */ content: boolean; /** It spreads attributes the template does not show (`{...props}`): nothing is sure. */ spread: boolean; node: unknown; } export interface Finding { node: unknown; message: string; } /** The `--mds-*` names a piece of inline style sets or reads (`--mds-x: 1; color: var(--mds-y)`). */ export declare const customPropertiesOf: (text: string, node: unknown) => LintCustomProperty[]; /** `MdsButtonDropdown` -> `mds-button-dropdown`; a lowercase tag stays as it is. */ export declare const tagOf: (name: string) => string; /** The attribute or property of the element that answers to any of `names`. */ export declare const attributeOf: (element: LintElement, ...names: string[]) => LintAttribute | undefined; /** The attribute gives a value: a non-empty literal, or an expression. */ export declare const isSet: (attribute: LintAttribute | undefined) => boolean;