chore(lint): drop unused imports flagged at HEAD
eslint was red at HEAD (5b715ac) in files untouched by this branch: unused statSync/dirname (check-plugin-api.mjs), unused PrefsSchema (src/index.ts, tests/smoke.spec.ts) and two Function types (tests/smoke.spec.ts). No behaviour change.
This commit is contained in:
@@ -16,8 +16,8 @@
|
|||||||
* node check-plugin-api.mjs [repoDir] [--app "/Applications/DSH Desktop.app"]
|
* node check-plugin-api.mjs [repoDir] [--app "/Applications/DSH Desktop.app"]
|
||||||
* 退出码:0 = 通过;1 = 发现问题(可接进 CI / build 前置)
|
* 退出码:0 = 通过;1 = 发现问题(可接进 CI / build 前置)
|
||||||
*/
|
*/
|
||||||
import { readFileSync, readdirSync, statSync, existsSync } from 'node:fs'
|
import { readFileSync, readdirSync, existsSync } from 'node:fs'
|
||||||
import { join, relative, dirname } from 'node:path'
|
import { join, relative } from 'node:path'
|
||||||
|
|
||||||
const args = process.argv.slice(2)
|
const args = process.argv.slice(2)
|
||||||
const repoArg = args.find(a => !a.startsWith('--'))
|
const repoArg = args.find(a => !a.startsWith('--'))
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import { WebSocket, WebSocketServer } from 'ws'
|
|||||||
import type { Context, SidebarHttpRequest, SidebarSessionEvent } from './context-types.ts'
|
import type { Context, SidebarHttpRequest, SidebarSessionEvent } from './context-types.ts'
|
||||||
import {
|
import {
|
||||||
Config,
|
Config,
|
||||||
PrefsSchema,
|
|
||||||
resolveSidebarConfig,
|
resolveSidebarConfig,
|
||||||
SIDEBAR_PREFS_DEFAULTS,
|
SIDEBAR_PREFS_DEFAULTS,
|
||||||
SIDEBAR_PREFS_NS,
|
SIDEBAR_PREFS_NS,
|
||||||
|
|||||||
+4
-2
@@ -11,7 +11,6 @@ import { join, resolve as resolvePath } from 'node:path'
|
|||||||
import { SettingsConflictError, type SettingsNamespace } from '@deepseek-ai/dsh-settings'
|
import { SettingsConflictError, type SettingsNamespace } from '@deepseek-ai/dsh-settings'
|
||||||
import { apply, mediaTypeForPath, wsCloseReasonOf } from '../src/index.ts'
|
import { apply, mediaTypeForPath, wsCloseReasonOf } from '../src/index.ts'
|
||||||
import { SidebarError } from '../src/wire.ts'
|
import { SidebarError } from '../src/wire.ts'
|
||||||
import { PrefsSchema } from '../src/config.ts'
|
|
||||||
import { SIDEBAR_PREFS_DEFAULTS } from '../src/prefs-shared.ts'
|
import { SIDEBAR_PREFS_DEFAULTS } from '../src/prefs-shared.ts'
|
||||||
import { encodeHtmlUrl } from '../src/html-route.ts'
|
import { encodeHtmlUrl } from '../src/html-route.ts'
|
||||||
import * as git from '../src/git.ts'
|
import * as git from '../src/git.ts'
|
||||||
@@ -892,7 +891,10 @@ describe('side card settings routes', () => {
|
|||||||
effect: (fn: () => void | (() => void)) => { fn() },
|
effect: (fn: () => void | (() => void)) => { fn() },
|
||||||
inject: (deps: string[], callback: (sctx: { settings: unknown }) => void) => {
|
inject: (deps: string[], callback: (sctx: { settings: unknown }) => void) => {
|
||||||
if (deps.includes('settings') && settings !== undefined) {
|
if (deps.includes('settings') && settings !== undefined) {
|
||||||
const s = settings as { update: Function; describe: Function }
|
const s = settings as {
|
||||||
|
update: (ns: string, ...rest: unknown[]) => unknown
|
||||||
|
describe: (ns: string, ...rest: unknown[]) => unknown
|
||||||
|
}
|
||||||
// Wrap update to emit `settings/document-updated` after each write,
|
// Wrap update to emit `settings/document-updated` after each write,
|
||||||
// mirroring the real SettingsForms service behavior.
|
// mirroring the real SettingsForms service behavior.
|
||||||
const origUpdate = s.update.bind(s)
|
const origUpdate = s.update.bind(s)
|
||||||
|
|||||||
Reference in New Issue
Block a user