2025-11-24 03:38:09 +00:00
|
|
|
import tsparser from "@typescript-eslint/parser";
|
|
|
|
|
import { defineConfig } from "eslint/config";
|
|
|
|
|
import obsidianmd from "eslint-plugin-obsidianmd";
|
|
|
|
|
import tseslint from "typescript-eslint";
|
|
|
|
|
|
|
|
|
|
export default defineConfig([
|
|
|
|
|
{
|
Add VitePress documentation site for Agent Client
Introduces a full documentation site under docs/ using VitePress, including configuration, custom theme, setup guides for supported agents (Claude Code, Codex, Gemini CLI, custom agents), usage instructions, FAQ, troubleshooting, and images. Updates .gitignore and .prettierignore to exclude VitePress build output and docs. Also updates package.json and eslint config for documentation support.
2025-12-13 16:53:46 +00:00
|
|
|
ignores: ["node_modules/", "main.js", "docs/"],
|
2025-11-24 03:38:09 +00:00
|
|
|
},
|
|
|
|
|
...obsidianmd.configs.recommended,
|
|
|
|
|
...tseslint.configs.recommended,
|
|
|
|
|
{
|
|
|
|
|
files: ["**/*.ts", "**/*.tsx"],
|
|
|
|
|
languageOptions: {
|
|
|
|
|
parser: tsparser,
|
fix(wsl): launch agents via --exec login-shell + argv, forward env via WSLENV
WSL agent launch previously wrapped the command in a nested
`sh -c "<baked string>"` construction. In some environments (e.g. RHEL8)
this fails before ACP connects (the process exits 1), and command
paths/args with spaces broke because the command was interpolated
unescaped.
Launch agents instead with:
wsl.exe [--exec] /bin/sh -c '<constant launcher>' sh <pathDir> <cwd> <command> <args...>
This skips wsl's default-shell layer (--exec), runs under the user's
login shell so ~/.profile is sourced (environment preserved, unlike a
bare --exec), and passes command/args as argv (no quoting of user data).
Also forward configured env vars (API keys, custom agent env, tool env)
into WSL via WSLENV (buildWslEnv), so the plugin's API key field works in
WSL mode without requiring keys in ~/.profile. Defensive: skips empty
values and invalid names, merges existing WSLENV, never throws.
Add a vitest unit-test suite for the platform WSL helpers (39 cases,
incl. exact argv-ordering checks), with an obsidian stub alias and a
dedicated tsconfig for typed linting of tests.
Builds on #304 (direct WSL exec for absolute-path commands); this retains
the environment that a bare --exec would drop and also fixes paths/args
with spaces.
Terminal launch keeps the existing wrapper for now (env forwarding is
applied); a terminal-specific hybrid follows separately.
2026-06-05 04:16:28 +00:00
|
|
|
parserOptions: { project: "./tsconfig.eslint.json" },
|
2025-11-24 03:38:09 +00:00
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
// Preserve existing rules
|
|
|
|
|
"@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
|
|
|
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
|
|
|
"@typescript-eslint/no-empty-function": "off",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]);
|