### Required

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L149-L149)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L151-L151)[\[3\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L503-L503)[\[4\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1058-L1058)[\[5\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1425-L1425)[\[6\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1512-L1512)
Unexpected any. Specify a different type.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L178-L178)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L187-L187)[\[3\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L193-L193)[\[4\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L220-L220)[\[5\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L708-L708)[\[6\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L721-L721)[\[7\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1277-L1277)[\[8\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1291-L1291)[\[9\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1308-L1308)[\[10\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1623-L1623)[\[11\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1867-L1867)[\[12\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1959-L1959)
Use sentence case for UI text.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L179-L179)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L195-L195)[\[3\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L206-L206)[\[4\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L240-L240)[\[5\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L916-L916)[\[6\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L2035-L2035)[\[7\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L2046-L2046)[\[8\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L2059-L2059)
Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L287-L287)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L320-L320)[\[3\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L889-L889)[\[4\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L922-L922)[\[5\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1174-L1174)[\[6\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1474-L1474)[\[7\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1535-L1535)
This assertion is unnecessary since it does not change the type of the expression.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L344-L344)
Async method 'pollAndDownloadVideo' has no 'await' expression.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L348-L384)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L847-L961)[\[3\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L969-L1054)[\[4\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1181-L1188)[\[5\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1193-L1201)[\[6\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1522-L1561)
Promise returned in function argument where a void return was expected.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L447-L447)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L582-L582)[\[3\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L632-L632)[\[4\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L2006-L2006)
Unexpected use of 'fetch'. Use the built-in `requestUrl` function instead of `fetch` for network requests in Obsidian.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L840-L840)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L844-L844)[\[3\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L855-L855)[\[4\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L858-L858)[\[5\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1013-L1013)[\[6\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1117-L1117)[\[7\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1387-L1387)[\[8\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1391-L1391)[\[9\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1408-L1408)[\[10\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1411-L1411)[\[11\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1427-L1427)[\[12\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1428-L1428)[\[13\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1569-L1569)[\[14\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1570-L1570)
Avoid setting styles directly via `element.style.display`. Use CSS classes for better theming and maintainability.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L965-L965)
Async method 'pollVideoResult' has no 'await' expression.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1206-L1212)
Do not write to DOM directly using innerHTML/outerHTML property

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1217-L1217)
Async method 'insertVideoToNote' has no 'await' expression.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1284-L1284)
Async method 'onOpen' has no 'await' expression.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1604-L1604)
Async method 'onClose' has no 'await' expression.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1623-L1623)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1626-L1626)[\[3\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1659-L1659)[\[4\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1729-L1729)[\[5\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1793-L1793)[\[6\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1863-L1863)[\[7\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1918-L1918)
Use `new Setting(containerEl).setName(...).setHeading()` instead of creating HTML heading elements directly.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1709-L1709)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1840-L1840)
Unexpected confirm.



---

### Optional

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1-L1)
'TFile' is defined but never used.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L668-L668)
'VideoGeneratorModal' is defined but never used.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L721-L721)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1308-L1308)
'promptLabel' is assigned a value but never used.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L735-L735)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1317-L1317)
'imageLabel' is assigned a value but never used.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L756-L756)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1328-L1328)
'modelLabel' is assigned a value but never used.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L773-L773)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1340-L1340)
'aspectRatioLabel' is assigned a value but never used.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L792-L792)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1354-L1354)
'durationLabel' is assigned a value but never used.

[\[1\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L811-L811)[\[2\]](https://github.com/miroliu/ai-video-generator-obsidian/blob/e695973a5c4a2de2219184f3b4328fc7c8f3183a/main.ts#L1368-L1368)
'sizeLabel' is assigned a value but never used.

