import { StringRuleChecker } from './string-rule-checker'; import { ProgrammingConvention } from './string-types'; import { GuardResult } from '../../core/guard-result'; /** * PascalCase naming convention pattern: * - The first letter is capitalized. * - The word does not end on a capitalized letter: PascalCasE * - No two capitalised letters shall follow directly each other: PascalCAse * - No number in that word at any place: PascalCase1more * - No dot(.), under_score or dash (-) within the word, only letters: Pascal_Case * - Empty string allowed. */ export declare const PASCAL_CASE_PATTERN = "((^$)|(^(([A-Z])|(([A-Z][a-z]+)+))$))"; /** * camelCase naming convention pattern: * - The first letter is not capitalized. * - The word does not end on a capitalized letter: camelCasE * - No two capitalised letters shall follow directly each other: camelCAse * - No number in that word at any place: camelCase1more * - No dot(.), under_score or dash (-) within the word, only letters: camel_Case * - Empty string allowed. */ export declare const CAMEL_CASE_PATTERN = "((^$)|(^(([a-z])|(([a-z]+[A-Z]?)+[a-z]+))$))"; /** * quiet_snake_case naming convention pattern: * - At least one leading letter or number (not underscore). * - All letters are lowercase. * - Numbers allowed. * - All spaces between words are filled with underscores. * - Remove all punctuation. * - A "word" should never consist of a single letter unless it is the last "word". * - Empty string allowed. */ export declare const QUIET_SNAKE_CASE_PATTERN = "((^$)|(^(([a-z0-9]+)|(([a-z0-9]{2,}[_])+[a-z0-9]+))$))"; /** * SCREAMING_SNAKE_CASE naming convention pattern: * - At least one leading letter or number (not underscore). * - All letters are uppercase. * - Numbers allowed. * - All spaces between words are filled with underscores. * - Remove all punctuation. * - A "word" should never consist of a single letter unless it is the last "word". * - Empty string allowed. */ export declare const SCREAMING_SNAKE_CASE_PATTERN = "((^$)|(^(([A-Z0-9]+)|(([A-Z0-9]{2,}[_])+[A-Z0-9]+))$))"; /** * kebab-case naming convention pattern: * - At least one leading letter or number (not hyphen). * - All letters are lowercase. * - Numbers allowed. * - All spaces between words are filled with hyphens. * - Remove all punctuation. * - A "word" should never consist of a single letter unless it is the last "word". * - Empty string allowed. */ export declare const KEBAB_CASE_PATTERN = "((^$)|(^(([a-z0-9]+)|(([a-z0-9]{2,}[-])+[a-z0-9]+))$))"; /** * dot.case naming convention pattern: * - At least one leading letter or number (not dot). * - All letters are lowercase. * - Numbers allowed. * - All spaces between words are filled with dots. * - Remove all punctuation. * - A "word" should never consist of a single letter unless it is the last "word". * - Empty string allowed. */ export declare const DOT_CASE_PATTERN = "((^$)|(^(([a-z0-9]+)|(([a-z0-9]{2,}[.])+[a-z0-9]+))$))"; export declare class StringIsProgrammingCase extends StringRuleChecker<{ type: 'isProgrammingCase'; convention: ProgrammingConvention; }> { constructor(rule: { type: 'isProgrammingCase'; convention: ProgrammingConvention; }, value: string); /** * @override */ exec(): GuardResult; private isPascalCase; private isCamelCase; private isQuietSnakeCase; private isScreamingSnakeCase; private isKebabCase; private isDotCase; }