diff options
| author | Adam Malczewski <[email protected]> | 2026-03-28 03:34:00 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-03-28 03:34:00 +0900 |
| commit | 7edf1f2bbccd514a497ade838c821ca91d499bf9 (patch) | |
| tree | d9c848f2a9cfd88f43bd0e783b664f1e249e75b3 /.rules | |
| parent | 94bca96aec909890da7c06a03e5c2c6b380be4a8 (diff) | |
| download | ai-pulse-obsidian-plugin-7edf1f2bbccd514a497ade838c821ca91d499bf9.tar.gz ai-pulse-obsidian-plugin-7edf1f2bbccd514a497ade838c821ca91d499bf9.zip | |
cleanup typescript
Diffstat (limited to '.rules')
| -rw-r--r-- | .rules/changelog/2026-03/28/01.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.rules/changelog/2026-03/28/01.md b/.rules/changelog/2026-03/28/01.md new file mode 100644 index 0000000..45d3135 --- /dev/null +++ b/.rules/changelog/2026-03/28/01.md @@ -0,0 +1,22 @@ +# Changelog — 2026-03-28 #01 + +## Strict TypeScript Convention Compliance + +### `tsconfig.json` +- Added `strict: true` (umbrella flag covering `noImplicitAny`, `noImplicitThis`, `strictNullChecks`, `strictBindCallApply`, `strictFunctionTypes`, `strictPropertyInitialization`, `useUnknownInCatchVariables`, `alwaysStrict`). +- Added `exactOptionalPropertyTypes: true`. +- Added `noFallthroughCasesInSwitch: true`. +- Added `noPropertyAccessFromIndexSignature: true`. +- Added `forceConsistentCasingInFileNames: true`. +- Removed redundant individual flags superseded by `strict: true`. + +### `src/main.ts` +- Changed `AIPulseSettings` to `import type` (type-only import). + +### `src/ollama-client.ts` +- Replaced explicit `undefined` assignments on optional properties with conditional spread in `parseToolCalls()`. +- Replaced intermediate boolean guards with direct `!== undefined` narrowing in `chatAgentLoop()`. + +### `src/chat-view.ts` +- Replaced `condition ? value : undefined` patterns with conditional spreads for `exactOptionalPropertyTypes` compliance in `handleSend()`. +- Removed 6 redundant `as HTMLDivElement` type assertions (already narrowed by null checks). |
