MCPcopy
hub / github.com/lingodotdev/lingo.dev / validateConfig

Function validateConfig

packages/cli/src/cli/cmd/cleanup.ts:146–161  ·  view source on GitHub ↗
(i18nConfig: I18nConfig | null)

Source from the content-addressed store, hash-verified

144 });
145
146function validateConfig(i18nConfig: I18nConfig | null) {
147 if (!i18nConfig) {
148 throw new CLIError({
149 message:
150 "i18n.json not found. Please run `lingo.dev init` to initialize the project.",
151 docUrl: "i18nNotFound",
152 });
153 }
154 if (!i18nConfig.buckets || !Object.keys(i18nConfig.buckets).length) {
155 throw new CLIError({
156 message:
157 "No buckets found in i18n.json. Please add at least one bucket containing i18n content.",
158 docUrl: "bucketNotFound",
159 });
160 }
161}
162
163function displaySummary(results: any[]) {
164 if (results.length === 0) return;

Callers 1

cleanup.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected