Files
memecoin-botV2/.pnpm-store/v10/files/53/eb675b85a9252dd4adfea61a1582a2e5985c0f4e64d41bd045b419c68103234d529deac30ce807a1b35be233bf74c9c4868118c3af4d5f9ab9cad9f00ac26d

40 lines
1.7 KiB
Plaintext

import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import type { MessageIds, Options } from '../naming-convention';
import type { IndividualAndMetaSelectorsString, MetaSelectors, Modifiers, ModifiersString, PredefinedFormats, PredefinedFormatsString, Selectors, SelectorsString, TypeModifiers, TypeModifiersString, UnderscoreOptions, UnderscoreOptionsString } from './enums';
export interface MatchRegex {
match: boolean;
regex: string;
}
export interface Selector {
custom?: MatchRegex;
filter?: string | MatchRegex;
format: PredefinedFormatsString[] | null;
leadingUnderscore?: UnderscoreOptionsString;
modifiers?: ModifiersString[];
prefix?: string[];
selector: IndividualAndMetaSelectorsString | IndividualAndMetaSelectorsString[];
suffix?: string[];
trailingUnderscore?: UnderscoreOptionsString;
types?: TypeModifiersString[];
}
export interface NormalizedMatchRegex {
match: boolean;
regex: RegExp;
}
export interface NormalizedSelector {
custom: NormalizedMatchRegex | null;
filter: NormalizedMatchRegex | null;
format: PredefinedFormats[] | null;
leadingUnderscore: UnderscoreOptions | null;
modifiers: Modifiers[] | null;
modifierWeight: number;
prefix: string[] | null;
selector: MetaSelectors | Selectors;
suffix: string[] | null;
trailingUnderscore: UnderscoreOptions | null;
types: TypeModifiers[] | null;
}
export type ValidatorFunction = (node: TSESTree.Identifier | TSESTree.Literal | TSESTree.PrivateIdentifier, modifiers?: Set<Modifiers>) => void;
export type ParsedOptions = Record<SelectorsString, ValidatorFunction>;
export type Context = Readonly<TSESLint.RuleContext<MessageIds, Options>>;