Skip to content

Declare marked and DOMPurify as ESLint globals - #46

Merged
djleamen merged 1 commit into
mainfrom
claude/loving-albattani-n6g18r
Jun 11, 2026
Merged

Declare marked and DOMPurify as ESLint globals#46
djleamen merged 1 commit into
mainfrom
claude/loving-albattani-n6g18r

Conversation

@djleamen

Copy link
Copy Markdown
Owner

Testing summary

  • Created python/.venv (matching the existing gitignore entry) with the light deps (anthropic, python-dotenv, requests); GUI deps (pywebview, pystray, pynput) skipped since the app window/tray cannot run headless.
  • py_compile passes for all Python sources.
  • Exercised the Api dispatcher and services directly (with XDG_CONFIG_HOME pointed at a scratch dir):
    • settings roundtrip with secret sanitisation — secrets never land in settings.json;
    • unknown IPC channel returns a structured error;
    • send-message without an API key returns the expected configuration error;
    • history store persists, filters malformed rows, and clears;
    • tool registry: 8 tools, type filtering, connection listing;
    • filesystem tool guards: writes outside $HOME and to protected paths (/etc/...) are refused; write/read roundtrip inside home works; missing-file read errors surface cleanly; ~ expansion works;
    • shell tool: non-zero exit codes captured, empty command rejected, timeout enforced (sleep 5 with 1s timeout fails gracefully);
    • unknown tool names and bad parameters return error payloads instead of raising;
    • connection schemas never echo secret values back; github tester correctly reports a missing token; saving an empty secret preserves the existing value.
  • node --check passes for all renderer JS.
  • Not testable here: live Anthropic API calls (no key) and the pywebview/tray/hotkey GUI layer.

Fixes

  • ESLint (eslint:recommended, as run by the repo's ESLint workflow) failed with two no-undef errors in renderer.js for marked and DOMPurify. Both are loaded from CDN script tags in index.html and already used behind typeof guards, so they are now declared as readonly globals in .eslintrc.js. ESLint exits clean afterwards.

https://claude.ai/code/session_01Pdr2u5eE9XswikXHCjZNs5


Generated by Claude Code

Both libraries are loaded from CDN script tags in index.html and used
behind typeof guards in renderer.js, but ESLint's no-undef flagged them
as undefined, failing lint runs.

https://claude.ai/code/session_01Pdr2u5eE9XswikXHCjZNs5
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@sonarqubecloud

Copy link
Copy Markdown

@djleamen
djleamen merged commit 850ffd2 into main Jun 11, 2026
11 checks passed
@djleamen
djleamen deleted the claude/loving-albattani-n6g18r branch June 11, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants