| 240 | const lintTarget = path.join("node_modules", ".bin", "oxlint" + ext) |
| 241 | |
| 242 | const resolveBin = async (target: string) => { |
| 243 | const localBin = path.join(root, target) |
| 244 | if (await Filesystem.exists(localBin)) return localBin |
| 245 | |
| 246 | const candidates = Filesystem.up({ |
| 247 | targets: [target], |
| 248 | start: root, |
| 249 | stop: ctx.worktree, |
| 250 | }) |
| 251 | const first = await candidates.next() |
| 252 | await candidates.return() |
| 253 | if (first.value) return first.value |
| 254 | |
| 255 | return undefined |
| 256 | } |
| 257 | |
| 258 | let lintBin = await resolveBin(lintTarget) |
| 259 | if (!lintBin) { |