fancive_obsidian-parallel-r.../package.json
wujunchen 33371cadd6 chore: integrate obsidianmd eslint plugin and fix recommended rules
Add eslint v9 + @typescript-eslint/parser + eslint-plugin-obsidianmd as
a dedicated `npm run lint:obsidian` track, separate from the existing
biome lint. Apply autofixes from the recommended config and resolve the
follow-on type/test issues.

- prefer-create-el: createEl('div'/'span') -> createDiv/createSpan
- prefer-active-window-timers: setTimeout/clearTimeout -> activeWindow.*
  + retype timer holders from ReturnType<typeof setTimeout> to number
- prefer-active-doc: drop globalThis.fetch in streaming
- no-useless-catch: drop no-op rethrow wrapper
- no-restricted-globals: streaming.ts is exempted because requestUrl
  does not support streaming responses
- @typescript-eslint/no-unsafe-*: disabled (out of scope for an Obsidian
  plugin lint pass; tsc + biome already cover type safety)
- tests: polyfill globalThis.activeWindow so unit tests still run in Node

Change-Id: I43cc652e29a66d490e2834e940843c39b211b80b
2026-05-03 10:45:10 +08:00

33 lines
1.3 KiB
JSON

{
"name": "obsidian-parallel-reader",
"version": "0.0.0",
"private": true,
"main": "main.js",
"scripts": {
"build": "node esbuild.config.mjs production",
"dev": "node esbuild.config.mjs watch",
"typecheck": "tsc --noEmit",
"lint": "biome check main.ts src/ tests/ scripts/ .e2e/scripts/",
"lint:fix": "biome check --write main.ts src/ tests/ scripts/ .e2e/scripts/",
"lint:obsidian": "eslint main.ts src/",
"version": "node scripts/bump-version.mjs",
"test": "npm run build && npm run typecheck && node scripts/run-tests.mjs",
"test:only": "node scripts/run-tests.mjs",
"test:unit": "node scripts/run-tests.mjs --category unit",
"test:component": "node scripts/run-tests.mjs --category component",
"test:contract": "node scripts/run-tests.mjs --category contract",
"e2e": "bash .e2e/gate.sh --json",
"test:e2e": "npm run build && node .e2e/cases/product-shell/run.mjs",
"test:live": "npm run build && node .e2e/cases/live/run.mjs"
},
"devDependencies": {
"@biomejs/biome": "^2.4.13",
"@types/node": "^22.10.2",
"@typescript-eslint/parser": "^8.59.1",
"esbuild": "^0.24.2",
"eslint": "^9.39.4",
"eslint-plugin-obsidianmd": "^0.2.9",
"obsidian": "^1.7.2",
"typescript": "^5.7.2"
}
}