type LogLevel = 'debug' | 'error' | 'info' | 'warn'; declare const defaultOption: { /** * Path to the config file * * @defaultValue './i18n-validate.json' */ config: string; /** * Exclude files from parsing * * @defaultValue '**\/node_modules/**' */ exclude: string[] | string; /** * Exit immediately if an error is found * * @defaultValue false */ exitOnError: boolean; /** * names of the translation function * * @defaultValue ['t', 'i18next.t', 'i18n.t'] */ functions: string[]; /** * Glob pattern to match input files * * @defaultValue '**\/*.{js,jsx,ts,tsx}' */ inputs: string[] | string; /** * Key separator for nested translation keys * * @defaultValue '.' */ keySeparator: string; /** * The source language of the translation keys * It'll be used to find missing keys and variables * * @defaultValue 'en' */ sourceLang: string; /** * Path to translation files * * @defaultValue 'i18n' */ localeFolder: string; /** * Path to translation files * * @defaultValue '{{lng}}/{{ns}}.json' * * @remarks * You can use `{{lng}}` for language and `{{ns}}` for namespace */ localePath: string; /** * Log level * * @defaultValue 'info' */ logLevel: LogLevel; /** * Namespace separator for translation keys * * @defaultValue ':' */ nsSeparator: string; /** * Folder separator for translation keys * * @defaultValue '/' */ nsFolderSeparator: string; /** * Suffixes to use for plural keys */ pluralSuffixes: string[]; /** * Plural separator for translation keys * * @defaultValue '_' */ pluralSeparator: string; }; type OptionsWithDefault = typeof defaultOption; declare function parseOptionsFile(cliOptions: OptionsWithDefault): Promise; interface TranslationNode { isStaticKey: boolean; key: string; namespace: string; path: string; positions: { end: { col: number; line: number; }; start: { col: number; line: number; }; }; variables: string[]; } declare const parseFile: (filePath: string, options: OptionsWithDefault) => TranslationNode[]; declare class ValidationError extends Error { stack: string; constructor(message: string, filePath: string, positions: TranslationNode['positions']); } declare const validateKey: (node: TranslationNode, options: OptionsWithDefault) => Promise; type Options = Partial; export { type LogLevel, type Options, type TranslationNode, ValidationError, parseFile, parseOptionsFile, validateKey };