UNPKG

@perfective/eslint-config

Version:
59 lines (58 loc) 2.58 kB
/** * Values for the `@typescript-eslint/naming-convention` rule `format` option. * * @since v0.11.0 */ export type TypescriptEslintNamingConventionFormat = 'camelCase' | 'strictCamelCase' | 'PascalCase' | 'StrictPascalCase' | 'snake_case' | 'UPPER_CASE'; /** * Values for individual selectors for the `@typescript-eslint/naming-convention` rule `selector` option. * * @since v0.11.0 */ export type TypescriptEslintNamingConventionIndividualSelector = 'variable' | 'function' | 'parameter' | 'classProperty' | 'objectLiteralProperty' | 'typeProperty' | 'parameterProperty' | 'classMethod' | 'objectLiteralMethod' | 'typeMethod' | 'accessor' | 'enumMember' | 'class' | 'interface' | 'typeAlias' | 'enum' | 'typeParameter'; /** * Values for grouped of individual selectors for the `@typescript-eslint/naming-convention` rule `selector` option. * * @since v0.11.0 */ export type TypescriptEslintNamingConventionGroupSelector = 'default' | 'variableLike' | 'memberLike' | 'typeLike' | 'property' | 'method'; /** * Values for the `@typescript-eslint/naming-convention` rule `selector` option. * * @since v0.11.0 */ export type TypescriptEslintNamingConventionSelector = TypescriptEslintNamingConventionIndividualSelector | TypescriptEslintNamingConventionGroupSelector; /** * Values for the `@typescript-eslint/naming-convention` rule `leadingUnderscore` and `trailingUnderscore` options. * * @since v0.11.0 */ export type TypescriptEslintNamingConventionUnderscore = 'forbid' | 'require' | 'requireDouble' | 'allow' | 'allowDouble' | 'allowSingleOrDouble'; /** * Configuration options for the `@typescript-eslint/naming-convention` rule. * * @see https://typescript-eslint.io/rules/naming-convention/ * * @since v0.11.0 */ export interface TypescriptEslintNamingConvention { selector: TypescriptEslintNamingConventionSelector | TypescriptEslintNamingConventionSelector[]; format: TypescriptEslintNamingConventionFormat[] | null; modifiers?: string[]; leadingUnderscore?: TypescriptEslintNamingConventionUnderscore; trailingUnderscore?: TypescriptEslintNamingConventionUnderscore; prefix?: string[]; suffix?: string[]; custom?: { regex: string; match: boolean; }; } /** * Creates configuration with the given extensions for the `@typescript-eslint/naming-convention` rule. * * @see https://typescript-eslint.io/rules/naming-convention/ * * @since v0.11.0 */ export declare function typescriptEslintNamingConvention(extensions?: TypescriptEslintNamingConvention[]): TypescriptEslintNamingConvention[];