mirror of
https://github.com/lossless-group/perplexed-plugin.git
synced 2026-07-22 06:49:50 +00:00
Applies all required fixes from the bot's review of PR #12513 (obsidianmd/obsidian-releases). ESLint now passes 0 errors with the Obsidian community ruleset; tsc passes; production build is clean. 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 (Perplexity, Perplexica, Vane, Claude, Anthropic, LM Studio, Imgur, ImageKit, OpenAI, Ollama, Sonar, Llama, GPT, YAML, JSON, URL, API) so legitimate proper nouns aren't lowercased Code fixes (487 → 0): - console.log/info → console.debug across all sources (~130 sites) - UI strings normalized to sentence case (~150 sites) - Command IDs and names cleaned up: dropped "command" suffix, dropped "perplexed" plugin-name prefix - Settings tab section headers switched from createEl('h2') to new Setting().setHeading() (5 sites) - Inline element.style.color/width/minHeight/fontFamily migrated to a new CSS class (.perplexed-json-textarea + .is-tall / .is-extra-tall) in src/styles/settings-tab.css (8 textarea sites, 32 style assignments) - Async input handlers wrapped: addEventListener('input', () => void (async () => { ... })()) so the listener type matches (8 sites) - forEach((opt) => dd.addOption(...)) blocks made void-returning to satisfy no-misused-promises (9 modal sites) - JSON.parse results typed as unknown then narrowed - throw <string> → throw new Error(<string>) - ${unknown} interpolations narrowed via instanceof Error - Removed dotenv runtime dependency: published plugins shouldn't read .env at runtime; user enters API keys via the settings tab - Replaced builtin-modules dev-dependency with node:module's builtinModules — same data, no extra package - Logger console-method dispatch rewritten as a switch instead of dynamic console[level] indexing (which the bot rejects) Streaming exceptions: - src/services/{perplexityService,lmStudioService,perplexicaService}.ts retain `fetch()` for SSE / chunked streaming because Obsidian's `requestUrl` buffers the whole body. Each site has an `eslint-disable-next-line no-restricted-globals` with the marketplace `/skip` justification inline. Plan to surface these on the PR with a `/skip` reply. Reference docs: - context-v/issues/Obsidian-Review-Bot-Feedback-on-Perplexed-Submission.md (issue log distilled into…) - context-v/reminders/Obsidian-Marketplace-Compliance.md (the rules themselves, reusable for image-gin and cite-wide submissions) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 lines
1.2 KiB
JSON
42 lines
1.2 KiB
JSON
{
|
|
"name": "perplexed",
|
|
"version": "0.1.0",
|
|
"description": "A plugin for Obsidian that allows you to generate source-cited content using AI using Perplexity and Perplexica.",
|
|
"main": "main.js",
|
|
"scripts": {
|
|
"dev": "node esbuild.config.mjs",
|
|
"build": "eslint . --report-unused-disable-directives && tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
|
"lint": "eslint . --report-unused-disable-directives",
|
|
"version": "node version-bump.mjs && git add manifest.json versions.json"
|
|
},
|
|
"keywords": [
|
|
"Obsidian",
|
|
"Plugin",
|
|
"LLM Research",
|
|
"AI-Powered Content Generation",
|
|
"Content Generation",
|
|
"Perplexity",
|
|
"Perplexica",
|
|
"Footnotes",
|
|
"Citations"
|
|
],
|
|
"author": "The Lossless Group",
|
|
"license": "MIT",
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/node": "^25.6.0",
|
|
"@typescript-eslint/eslint-plugin": "8.59.1",
|
|
"@typescript-eslint/parser": "8.59.1",
|
|
"esbuild": "0.28.0",
|
|
"eslint": "^10.3.0",
|
|
"eslint-plugin-obsidianmd": "^0.2.9",
|
|
"globals": "^17.6.0",
|
|
"obsidian": "latest",
|
|
"tslib": "2.8.1",
|
|
"typescript": "6.0.3",
|
|
"typescript-eslint": "^8.59.1"
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/sdk": "^0.92.0"
|
|
}
|
|
}
|