lossless-group_image-gin/versions.json
mpstaton cfbceba299 chore(marketplace): pass ObsidianReviewBot lint cleanly — v0.2.1
Applies all required fixes from the bot's review of PR #12524
(obsidianmd/obsidian-releases). ESLint now passes 0 errors with the
Obsidian community ruleset; tsc passes; production build is clean.
3 warnings remain (FileManager.trashFile preference — non-blocking).

Lint setup:
- Adopted eslint-plugin-obsidianmd@^0.2.9 in eslint.config.mjs
- Mirrored the bot's rule surface locally so violations surface in
  `pnpm lint` instead of the marketplace PR thread
- Configured the ui/sentence-case rule with a brand allowlist
  (Recraft, Magnific, Freepik, Ideogram, ImageKit, Imgur, Anthropic,
  Claude, OpenAI, Obsidian, WebP, JSON, YAML, URL, API, CDN)

Code fixes (263 → 0):
- console.log/info → console.debug across all sources
- UI strings normalized to sentence case (~150 sites)
- Command IDs / names: dropped "image-gin-" plugin-id prefix on the
  drop-gate reset command; renamed problematic settings heading
  ("Image cache settings" → "Image cache")
- Settings tab section headers via setHeading() instead of <h2>/<h3>
- Inline element.style.* migrated to a new CSS class set in
  src/styles/marketplace-compliance.css (~60 sites collapsed to
  ~10 reusable classes: image-gin-row, image-gin-row-tight,
  image-gin-text-area + variants, image-gin-cache-stats,
  image-gin-error-text, image-gin-error-banner, image-gin-preview,
  image-gin-thumb, image-gin-hidden)
- TFile cast → instanceof check (BatchDirectoryConvertLocalToRemote)
- require('fs')/require('path') → ES imports (allowed since
  isDesktopOnly: true)
- Hardcoded ".obsidian/plugins/image-gin/..." paths replaced with
  ${vault.configDir}/plugins/image-gin/... (logger, imageCacheService)
- Async input handlers wrapped: addEventListener('input', () => void
  (async () => { ... })()) so the listener type matches
- forEach((opt) => dd.addOption(...)) blocks made void-returning
- JSON.parse results typed as unknown then narrowed
- Logger console-method dispatch rewritten as a switch instead of
  dynamic console[level] indexing
- Replaced builtin-modules dev-dependency with node:module's
  builtinModules — same data, no extra package
- DragEventCopy/PasteEventCopy classes (which used 'instanceof' on
  user classes) replaced with sentinel-tagged factory functions
  (makeSyntheticDragEvent / isSyntheticDropEvent) so we don't trip
  the obsidianmd/prefer-instanceof rule for non-Obsidian classes

Bumps version to 0.2.1.

Plan + design rationale:
context-v/issues/Obsidian-Review-Bot-Feedback-on-Perplexed-Submission.md
context-v/reminders/Obsidian-Marketplace-Compliance.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 03:47:52 -05:00

7 lines
No EOL
102 B
JSON

{
"0.0.9": "1.8.10",
"0.1.0": "1.8.10",
"0.1.1": "1.8.10",
"0.2.0": "1.8.10",
"0.2.1": "1.8.10"
}