Skip to content

Fix ObsidianReviewBot required changes#28

Merged
desimpson merged 2 commits into
mainfrom
fix/review-bot-required-changes
Mar 2, 2026
Merged

Fix ObsidianReviewBot required changes#28
desimpson merged 2 commits into
mainfrom
fix/review-bot-required-changes

Conversation

@desimpson
Copy link
Copy Markdown
Owner

@desimpson desimpson commented Mar 1, 2026

Adopt the full eslint-plugin-obsidianmd recommended config to address ObsidianReviewBot required changes, add stricter rules, and fix all resulting lint errors.


Note

Medium Risk
Primarily a tooling/linting PR, but it touches OAuth refresh error handling, sync metadata parsing, and build-time env loading, which could affect runtime behavior if schemas or parsing assumptions are wrong.

Overview
Updates build and lint tooling to satisfy ObsidianReviewBot requirements by switching to Node’s process.loadEnvFile() and node:module builtinModules, and by adopting eslint-plugin-obsidianmd’s recommended flat config (plus stricter TypeScript/Unicorn/base rules) while dropping the previous import resolver setup.

Fixes the resulting code issues across the plugin: makes many fields readonly, tightens JSON parsing to unknown + Zod validation (including new googleErrorResponseSchema for OAuth error responses and reuse of parsedLineSchema when reading/writing embedded task metadata), updates Zod schema helpers in Google Tasks response validation, and adjusts UI text/scripts/tests with targeted eslint disables for product-name sentence case and allowed Node/builtin fetch usage.

Written by Cursor Bugbot for commit ab2206b. This will update automatically on new commits. Configure here.

Spread `obsidianmd.configs.recommended` at array level for its full
opinionated ruleset, replacing the standalone `eslint-plugin-import`
dependency. Add `no-else-return`, `no-sequences`, `prefer-template`,
`no-param-reassign`, `object-shorthand`, `no-shadow`,
`prefer-nullish-coalescing`, `prefer-optional-chain`, `prefer-readonly`,
`return-await`, and `switch-exhaustiveness-check`. Scope unicorn to
JS/TS files only.
- Replace as type assertions with Zod schema validation
- Mark class properties readonly; use ?. optional chaining; use template literals
- Fix UI text to sentence case
- Update deprecated Zod APIs (`z.url()`, `z.iso.datetime()`)
- Add `eslint-disable` for legitimate exceptions (`node:` imports, `fetch`, inline styles)
- Add test-specific ESLint overrides (`no-unsafe-*`, `no-shadow`, `unbound-method`, `no-tfile-tfolder-cast`)
- Replace `builtin-modules/dotenv` with Node.js built-ins; fix `node:`-prefixed externals
- Remove unused `eslint-import-resolver-typescript`
@desimpson desimpson self-assigned this Mar 1, 2026
@desimpson desimpson added the enhancement New feature or request label Mar 1, 2026
@desimpson desimpson merged commit 9a3da30 into main Mar 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant