diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 82cb009..770cfe1 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -7,6 +7,9 @@ on: permissions: {} +env: + MISE_IDIOMATIC_VERSION_FILE_ENABLE_TOOLS: node,pnpm + jobs: lint: runs-on: ubuntu-latest @@ -15,10 +18,6 @@ jobs: with: persist-credentials: false - uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 - with: - mise_toml: | - [settings] - idiomatic_version_file_enable_tools = ["node", "pnpm"] - run: pnpm install --frozen-lockfile - run: pnpm lint @@ -29,10 +28,6 @@ jobs: with: persist-credentials: false - uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 - with: - mise_toml: | - [settings] - idiomatic_version_file_enable_tools = ["node", "pnpm"] - run: pnpm install --frozen-lockfile - run: pnpm format:check @@ -43,9 +38,5 @@ jobs: with: persist-credentials: false - uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 - with: - mise_toml: | - [settings] - idiomatic_version_file_enable_tools = ["node", "pnpm"] - run: pnpm install --frozen-lockfile - run: pnpm test diff --git a/experiments/ghostwright/src/assertions/index.ts b/experiments/ghostwright/src/assertions/index.ts index e980461..db79eee 100644 --- a/experiments/ghostwright/src/assertions/index.ts +++ b/experiments/ghostwright/src/assertions/index.ts @@ -9,7 +9,7 @@ import type { } from '../types.ts'; import { Locator } from '../terminal/session.ts'; import type { TerminalSession } from '../terminal/session.ts'; -// oxlint-disable-next-line max-params -- diagnostic needs all four params for failure reporting +// oxlint-disable-next-line bombshell-dev/max-params -- diagnostic needs all four params for failure reporting function diagnostic( session: TerminalSession, expected: string, @@ -37,7 +37,7 @@ function diagnostic( .join(', ') || 'none' }\n\n ${tens}\n ${ones}\n${rows}`; } -// oxlint-disable-next-line max-params -- wait needs all four params for polling logic +// oxlint-disable-next-line bombshell-dev/max-params -- wait needs all four params for polling logic async function wait( session: TerminalSession, test: () => boolean, diff --git a/experiments/ghostwright/src/effection/index.ts b/experiments/ghostwright/src/effection/index.ts index 74c3e99..504ed6f 100644 --- a/experiments/ghostwright/src/effection/index.ts +++ b/experiments/ghostwright/src/effection/index.ts @@ -59,7 +59,7 @@ export class EffectionTerminal implements OperationTerminal { up: (p: Point, o?: MouseOptions) => op(() => this.inner.mouse.up(p, o)), click: (p: Point, o?: MouseOptions) => op(() => this.inner.mouse.click(p, o)), doubleClick: (p: Point, o?: MouseOptions) => op(() => this.inner.mouse.doubleClick(p, o)), - // oxlint-disable-next-line max-params -- wraps mouse.drag(start, end, options) API + // oxlint-disable-next-line bombshell-dev/max-params -- wraps mouse.drag(start, end, options) API drag: (a: Point, b: Point, o?: MouseOptions) => op(() => this.inner.mouse.drag(a, b, o)), wheel: (o: WheelOptions) => op(() => this.inner.mouse.wheel(o)), }; diff --git a/experiments/ghostwright/src/pty/client.ts b/experiments/ghostwright/src/pty/client.ts index bd17ce0..13c0e61 100644 --- a/experiments/ghostwright/src/pty/client.ts +++ b/experiments/ghostwright/src/pty/client.ts @@ -151,7 +151,7 @@ export class SidecarClient { this.#emit('fatal', error); this.#child.kill('SIGKILL'); } - // oxlint-disable-next-line max-params -- request needs kind, value, raw flag, and timeout + // oxlint-disable-next-line bombshell-dev/max-params -- request needs kind, value, raw flag, and timeout request( kind: FrameKind, value?: unknown, diff --git a/experiments/ghostwright/src/terminal/session.ts b/experiments/ghostwright/src/terminal/session.ts index 1b28ac2..b5f416f 100644 --- a/experiments/ghostwright/src/terminal/session.ts +++ b/experiments/ghostwright/src/terminal/session.ts @@ -354,7 +354,7 @@ export class TerminalSession implements AsyncTerminal { #ensure(op: string): void { if (this.#closed) throw new SessionClosedError(`Cannot ${op}: terminal session is closed`); } - // oxlint-disable-next-line max-params -- internal method + // oxlint-disable-next-line bombshell-dev/max-params -- internal method async #send( kind: FrameKind, value: unknown, @@ -387,7 +387,7 @@ export class TerminalSession implements AsyncTerminal { }); return receipt as ActionReceipt; } - // oxlint-disable-next-line max-params -- internal method + // oxlint-disable-next-line bombshell-dev/max-params -- internal method async #write( data: Uint8Array, delivered = data.length > 0, @@ -447,7 +447,7 @@ export class TerminalSession implements AsyncTerminal { `Coordinate (${p.column},${p.row}) is outside ${this.#viewport.columns}x${this.#viewport.rows}`, ); } - // oxlint-disable-next-line max-params -- internal method + // oxlint-disable-next-line bombshell-dev/max-params -- internal method #mouse(action: 'move' | 'down' | 'up', p: Point, o: MouseOptions = {}): Promise { this.#point(p); const wasDown = this.#mouseDown; @@ -473,7 +473,7 @@ export class TerminalSession implements AsyncTerminal { await this.mouse.click(p, o); return this.mouse.click(p, o); }, - // oxlint-disable-next-line max-params -- wraps mouse API + // oxlint-disable-next-line bombshell-dev/max-params -- wraps mouse API drag: async (a: Point, b: Point, o?: MouseOptions) => { await this.#mouse('down', a, o); await this.#mouse('move', b, o); @@ -615,7 +615,7 @@ export class TerminalSession implements AsyncTerminal { }, timeout); }); } - // oxlint-disable-next-line max-params -- internal method + // oxlint-disable-next-line bombshell-dev/max-params -- internal method async #timeout(p: Promise, ms: number, error: () => Error): Promise { return new Promise((r, j) => { const t = setTimeout(() => j(error()), ms); @@ -904,7 +904,7 @@ export class TerminalSession implements AsyncTerminal { } /** Text locator that finds matching strings in the terminal viewport. */ export class Locator implements AsyncLocator { - // oxlint-disable-next-line max-params -- public API + // oxlint-disable-next-line bombshell-dev/max-params -- public API constructor( readonly session: TerminalSession, readonly query: string, diff --git a/experiments/ghostwright/src/terminal/wasm.ts b/experiments/ghostwright/src/terminal/wasm.ts index 1a0760d..4e77ccd 100644 --- a/experiments/ghostwright/src/terminal/wasm.ts +++ b/experiments/ghostwright/src/terminal/wasm.ts @@ -318,7 +318,7 @@ export class GhosttyWasmTerminal { }); this.#configureMouseSize(); } - // oxlint-disable-next-line max-params -- installCallback wraps ghostty_terminal_set callback API + // oxlint-disable-next-line bombshell-dev/max-params -- installCallback wraps ghostty_terminal_set callback API #installCallback( option: number, parameterCount: number, @@ -338,7 +338,7 @@ export class GhosttyWasmTerminal { throw new AssetIntegrityError(`Unable to configure Ghostty terminal effect ${option}`); } #configureEffects() { - // oxlint-disable-next-line max-params -- ghostty write-pty callback API + // oxlint-disable-next-line bombshell-dev/max-params -- ghostty write-pty callback API this.#installCallback(1, 4, (_terminal, _userdata, data, length) => { this.#effects.push({ type: 'write-pty', data: this.#bytes().slice(data, data + length) }); }); @@ -362,7 +362,7 @@ export class GhosttyWasmTerminal { this.#installCallback( 6, 3, - // oxlint-disable-next-line max-params -- ghostty size report callback API + // oxlint-disable-next-line bombshell-dev/max-params -- ghostty size report callback API (_terminal, _userdata, output) => { const layout = this.#layouts.GhosttySizeReportSize, field = (name: string) => layout.fields[name].offset, @@ -378,7 +378,7 @@ export class GhosttyWasmTerminal { this.#installCallback( 7, 3, - // oxlint-disable-next-line max-params -- ghostty terminal mode query callback API + // oxlint-disable-next-line bombshell-dev/max-params -- ghostty terminal mode query callback API (_terminal, _userdata, _output) => { return 1; }, @@ -387,7 +387,7 @@ export class GhosttyWasmTerminal { this.#installCallback( 8, 3, - // oxlint-disable-next-line max-params -- ghostty device attributes callback API + // oxlint-disable-next-line bombshell-dev/max-params -- ghostty device attributes callback API (_terminal, _userdata, output) => { const all = this.#layouts.GhosttyDeviceAttributes, primary = this.#layouts.GhosttyDeviceAttributesPrimary, @@ -411,7 +411,7 @@ export class GhosttyWasmTerminal { this.#installCallback( 26, 3, - // oxlint-disable-next-line max-params -- ghostty clipboard write callback API + // oxlint-disable-next-line bombshell-dev/max-params -- ghostty clipboard write callback API (_terminal, _userdata, write) => { const writeLayout = this.#layouts.GhosttyClipboardWrite, contentLayout = this.#layouts.GhosttyClipboardContent, @@ -1284,7 +1284,7 @@ export class GhosttyWasmTerminal { this.#release(length, 4); } } - // oxlint-disable-next-line max-params -- encodeMouse wraps ghostty mouse encoder API + // oxlint-disable-next-line bombshell-dev/max-params -- encodeMouse wraps ghostty mouse encoder API encodeMouse( action: 'move' | 'down' | 'up', point: Point, diff --git a/experiments/ghostwright/src/tracing/trace.ts b/experiments/ghostwright/src/tracing/trace.ts index cd04314..610513a 100644 --- a/experiments/ghostwright/src/tracing/trace.ts +++ b/experiments/ghostwright/src/tracing/trace.ts @@ -57,7 +57,7 @@ export class SessionTrace { raw: { offset, length: bytes.length, direction: 'from-pty' }, }); } - // oxlint-disable-next-line max-params -- input needs bytes, action sequence, and redaction flag + // oxlint-disable-next-line bombshell-dev/max-params -- input needs bytes, action sequence, and redaction flag input(bytes: Uint8Array, actionSequence: number, redacted = false): void { if (this.policy === 'off') return; if (redacted) { @@ -71,7 +71,7 @@ export class SessionTrace { raw: { offset, length: bytes.length, direction: 'to-pty' }, }); } - // oxlint-disable-next-line max-params -- persist needs error, snapshot, and status for artifact writing + // oxlint-disable-next-line bombshell-dev/max-params -- persist needs error, snapshot, and status for artifact writing async persist( error: unknown, snapshot: ScreenSnapshot, diff --git a/oxfmt.config.ts b/oxfmt.config.ts new file mode 100644 index 0000000..bf9dedf --- /dev/null +++ b/oxfmt.config.ts @@ -0,0 +1 @@ +export { default } from './node_modules/@bomb.sh/tools/oxfmtrc.json' with { type: 'json' }; diff --git a/oxlint.config.ts b/oxlint.config.ts new file mode 100644 index 0000000..07d583e --- /dev/null +++ b/oxlint.config.ts @@ -0,0 +1,6 @@ +import config from './node_modules/@bomb.sh/tools/oxlintrc.json' with { type: 'json' }; + +export default { + ...config, + jsPlugins: ['./node_modules/@bomb.sh/tools/rules/plugin.js'], +}; diff --git a/package.json b/package.json index b7ba1a7..ddb03e6 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@bomb.sh/args": "catalog:", - "@bomb.sh/tools": "^0.5.5", + "@bomb.sh/tools": "^0.6.1", "@clack/prompts": "catalog:", "@types/node": "^22" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f01fc55..768c6c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: 'catalog:' version: 0.3.1 '@bomb.sh/tools': - specifier: ^0.5.5 - version: 0.5.5(@types/node@22.20.1)(oxc-resolver@11.21.3)(unrun@0.2.39)(vite@8.1.0(@types/node@22.20.1)(jiti@2.7.0)(yaml@2.9.0)) + specifier: ^0.6.1 + version: 0.6.1(@types/node@22.20.1)(oxc-resolver@11.21.3)(unrun@0.2.39)(vite@8.1.0(@types/node@22.20.1)(jiti@2.7.0)(yaml@2.9.0)) '@clack/prompts': specifier: 'catalog:' version: 1.7.0 @@ -59,8 +59,8 @@ packages: '@bomb.sh/args@0.3.1': resolution: {integrity: sha512-CwxKrfgcorUPP6KfYD59aRdBYWBTsfsxT+GmoLVnKo5Tmyoqbpo0UNcjngRMyU+6tiPbd18RuIYxhgAn44wU/Q==} - '@bomb.sh/tools@0.5.5': - resolution: {integrity: sha512-cqOjfN+A6OtO265glgjwQ2qbYPsRKUgoq3Ff76iSq3hYfZqwC90Pe2lfq/AA3p62PhsLy/gxJ2+FzxkCWFgYjg==} + '@bomb.sh/tools@0.6.1': + resolution: {integrity: sha512-p3dLXau2JygQ9DTErUvHSn7GwqpRraIjiXdj/xeAU0+7opUZrtiHe18FLrU5opCSr16WZep0p0/OBX1HgMjgJQ==} hasBin: true '@bomb.sh/tty@0.7.0': @@ -1491,7 +1491,7 @@ snapshots: '@bomb.sh/args@0.3.1': {} - '@bomb.sh/tools@0.5.5(@types/node@22.20.1)(oxc-resolver@11.21.3)(unrun@0.2.39)(vite@8.1.0(@types/node@22.20.1)(jiti@2.7.0)(yaml@2.9.0))': + '@bomb.sh/tools@0.6.1(@types/node@22.20.1)(oxc-resolver@11.21.3)(unrun@0.2.39)(vite@8.1.0(@types/node@22.20.1)(jiti@2.7.0)(yaml@2.9.0))': dependencies: '@bomb.sh/args': 0.3.1 '@humanfs/node': 0.16.8 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index b36892f..d4fa569 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -10,3 +10,7 @@ catalog: '@bomb.sh/args': '^0.3.1' '@clack/ui': 'https://pkg.pr.new/bombshell-dev/ui/@clack/ui@a60ac12' '@clack/prompts': '^1.7.0' + +publicHoistPattern: + - oxlint + - oxfmt