24 lines
1.6 KiB
TypeScript
Executable file
24 lines
1.6 KiB
TypeScript
Executable file
import type { TSESTree } from '@typescript-eslint/experimental-utils';
|
|
import type { SelectorStyle } from './utils';
|
|
export declare const OPTION_TYPE_ATTRIBUTE = "attribute";
|
|
export declare const OPTION_TYPE_ATTRS = "attrs";
|
|
export declare const OPTION_TYPE_ELEMENT = "element";
|
|
export declare type SelectorStyleOption = SelectorStyle | string;
|
|
export declare type SelectorTypeOption = typeof OPTION_TYPE_ATTRIBUTE | typeof OPTION_TYPE_ELEMENT | string;
|
|
export declare type SelectorTypeInternal = typeof OPTION_TYPE_ATTRS | typeof OPTION_TYPE_ELEMENT;
|
|
export declare type Options = [
|
|
{
|
|
type: SelectorTypeOption | Array<SelectorTypeOption>;
|
|
prefix: string | Array<string>;
|
|
style: SelectorTypeOption;
|
|
}
|
|
];
|
|
export declare const reportPrefixError: (node: TSESTree.Expression | TSESTree.Literal, prefix: string | Array<string>, context: any) => void;
|
|
export declare const reportStyleError: (node: TSESTree.Expression | TSESTree.Literal, style: SelectorStyleOption, context: any) => void;
|
|
export declare const reportTypeError: (node: TSESTree.Expression | TSESTree.Literal, type: SelectorTypeOption | Array<SelectorTypeOption>, context: any) => void;
|
|
export declare const checkValidOptions: (type: SelectorTypeOption | Array<SelectorTypeOption>, prefix: string | Array<string>, style: SelectorStyleOption) => boolean;
|
|
export declare const checkSelector: (node: TSESTree.Expression | TSESTree.Literal, type: SelectorTypeOption | Array<SelectorTypeOption>, prefixOption: Array<string>, styleOption: SelectorStyle) => {
|
|
hasExpectedPrefix: boolean;
|
|
hasExpectedType: boolean;
|
|
hasExpectedStyle: boolean;
|
|
} | null;
|