From e98eb5d0dbdf9218c413056b3ff3564455baa094 Mon Sep 17 00:00:00 2001 From: Richard McCorkle Date: Sun, 17 May 2026 08:05:55 +0200 Subject: [PATCH] fix(lint): clear remaining sentence-case errors - Correct brand/acronym casing in UI text: 'Youtube' -> 'YouTube' (setting name + description), 'oauth' -> 'OAUTH', dropdown label 'Openai' -> 'OpenAI'. These were genuine misspellings. - Whitelist the 'OpenRouter' dropdown label via ignoreRegex; it is a brand with intentional internal capitals not in the rule's brand list, and ignoreWords is bypassed for single-word strings. npm run lint now passes with 0 errors and 0 warnings. Co-Authored-By: Claude Opus 4.7 --- eslint.config.mjs | 10 +++++++++- main.ts | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index a58f190..4eac3b1 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -48,7 +48,15 @@ export default tseslint.config( rules: { "obsidianmd/ui/sentence-case": [ "error", - { enforceCamelCaseLower: true, allowAutoFix: true }, + { + enforceCamelCaseLower: true, + allowAutoFix: true, + // "OpenRouter" is a brand name with intentional internal capitals. + // It is not in the rule's built-in brand list, and `ignoreWords` is + // bypassed for single-word strings, so the exact label is whitelisted + // by regex to preserve official casing. + ignoreRegex: ["^OpenRouter$"], + }, ], }, }, diff --git a/main.ts b/main.ts index c15775b..a55f9ee 100644 --- a/main.ts +++ b/main.ts @@ -4049,8 +4049,8 @@ class YouTubeTranscriptSettingTab extends PluginSettingTab { // Removed "Use YouTube Data API v3" setting and CORS issue notice new Setting(settingsContainer) - .setName('Youtube data API key') - .setDesc('Your Google cloud console API key for accessing public Youtube transcripts (not an oauth token). Required for downloading channels and playlists.') + .setName('YouTube data API key') + .setDesc('Your Google cloud console API key for accessing public YouTube transcripts (not an OAUTH token). Required for downloading channels and playlists.') .addText(text => { const textComponent = text .setPlaceholder('Enter API key (starts with aiza)') @@ -4199,7 +4199,7 @@ class YouTubeTranscriptSettingTab extends PluginSettingTab { .setDesc('Provider used for summarisation.') .addDropdown(dropdown => { // Add OpenAI option - dropdown.addOption('openai', 'Openai'); + dropdown.addOption('openai', 'OpenAI'); // Always add Anthropic, Google, Ollama, and OpenRouter options since they all work on any platform now dropdown.addOption('anthropic', 'Anthropic');