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 <noreply@anthropic.com>
This commit is contained in:
Richard McCorkle 2026-05-17 08:05:55 +02:00
parent d1d74e6a5d
commit e98eb5d0db
2 changed files with 12 additions and 4 deletions

View file

@ -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$"],
},
],
},
},

View file

@ -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');