style: 完成所有文件的lint

This commit is contained in:
claude-code-best
2026-05-01 21:39:30 +08:00
parent d136872cc9
commit 6182015005
1333 changed files with 68255 additions and 77882 deletions

View File

@@ -1,33 +1,29 @@
import sample from 'lodash-es/sample.js'
import React from 'react'
import { gracefulShutdown } from '../utils/gracefulShutdown.js'
import { WorktreeExitDialog } from './WorktreeExitDialog.js'
import sample from 'lodash-es/sample.js';
import React from 'react';
import { gracefulShutdown } from '../utils/gracefulShutdown.js';
import { WorktreeExitDialog } from './WorktreeExitDialog.js';
const GOODBYE_MESSAGES = ['Goodbye!', 'See ya!', 'Bye!', 'Catch you later!']
const GOODBYE_MESSAGES = ['Goodbye!', 'See ya!', 'Bye!', 'Catch you later!'];
function getRandomGoodbyeMessage(): string {
return sample(GOODBYE_MESSAGES) ?? 'Goodbye!'
return sample(GOODBYE_MESSAGES) ?? 'Goodbye!';
}
type Props = {
onDone: (message?: string) => void
onCancel?: () => void
showWorktree: boolean
}
onDone: (message?: string) => void;
onCancel?: () => void;
showWorktree: boolean;
};
export function ExitFlow({
showWorktree,
onDone,
onCancel,
}: Props): React.ReactNode {
export function ExitFlow({ showWorktree, onDone, onCancel }: Props): React.ReactNode {
async function onExit(resultMessage?: string) {
onDone(resultMessage ?? getRandomGoodbyeMessage())
await gracefulShutdown(0, 'prompt_input_exit')
onDone(resultMessage ?? getRandomGoodbyeMessage());
await gracefulShutdown(0, 'prompt_input_exit');
}
if (showWorktree) {
return <WorktreeExitDialog onDone={onExit} onCancel={onCancel} />
return <WorktreeExitDialog onDone={onExit} onCancel={onCancel} />;
}
return null
return null;
}