UNPKG

@perfective/eslint-config

Version:
36 lines (35 loc) 1.47 kB
/** * Nominal type for the `replacements` option of the `unicorn/prevent-abbreviation` rule. */ export type UnicornPreventAbbreviationReplacements = Record<string, boolean | Record<string, boolean>>; /** * Configuration options for the `unicorn/prevent-abbreviation` rule. * * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md * * @since v0.11.0 */ export interface UnicornPreventAbbreviations { replacements: UnicornPreventAbbreviationReplacements; extendDefaultReplacements: boolean; allowList: Record<string, boolean>; extendDefaultAllowList: boolean; checkDefaultAndNamespaceImports: 'internal' | boolean; checkShorthandImports: 'internal' | boolean; checkShorthandProperties: boolean; checkProperties: boolean; checkVariables: boolean; checkFilenames: boolean; ignore: RegExp[]; } /** * Creates configuration for the `unicorn/prevent-abbreviation` rule with the given replacements and options. * * @param replacements - List of additional replacements. * @param options - Additional properties to override. * * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md * * @since v0.11.0 */ export declare function unicornPreventAbbreviations(replacements?: UnicornPreventAbbreviationReplacements, options?: Partial<Pick<UnicornPreventAbbreviations, 'checkProperties'>>): UnicornPreventAbbreviations;