style: auto-fix ESLint issues (curly braces and formatting)
- Add curly braces to all if/else/for/while statements - Fix indentation and trailing spaces - Auto-fixed 372 linting errors using eslint --fix - Remaining issues are warnings only (non-null assertions, explicit any types)
This commit is contained in:
@@ -74,18 +74,18 @@ compdef _flynn flynn
|
||||
|
||||
export function generateFishCompletion(): string {
|
||||
const lines = [
|
||||
`# Flynn fish completion — generated by 'flynn completion fish'`,
|
||||
`# Disable file completions by default`,
|
||||
`complete -c flynn -f`,
|
||||
``,
|
||||
`# Subcommands`,
|
||||
'# Flynn fish completion — generated by \'flynn completion fish\'',
|
||||
'# Disable file completions by default',
|
||||
'complete -c flynn -f',
|
||||
'',
|
||||
'# Subcommands',
|
||||
];
|
||||
|
||||
for (const cmd of SUBCOMMANDS) {
|
||||
lines.push(`complete -c flynn -n '__fish_use_subcommand' -a '${cmd}' -d '${cmd} subcommand'`);
|
||||
}
|
||||
lines.push(`complete -c flynn -n '__fish_use_subcommand' -l help -d 'Show help'`);
|
||||
lines.push(`complete -c flynn -n '__fish_use_subcommand' -l version -d 'Show version'`);
|
||||
lines.push('complete -c flynn -n \'__fish_use_subcommand\' -l help -d \'Show help\'');
|
||||
lines.push('complete -c flynn -n \'__fish_use_subcommand\' -l version -d \'Show version\'');
|
||||
lines.push('');
|
||||
lines.push('# Subcommand options');
|
||||
|
||||
@@ -98,7 +98,7 @@ export function generateFishCompletion(): string {
|
||||
}
|
||||
}
|
||||
|
||||
lines.push(`complete -c flynn -n '__fish_seen_subcommand_from completion' -a 'bash zsh fish' -d 'Shell type'`);
|
||||
lines.push('complete -c flynn -n \'__fish_seen_subcommand_from completion\' -a \'bash zsh fish\' -d \'Shell type\'');
|
||||
lines.push('');
|
||||
|
||||
return lines.join('\n');
|
||||
@@ -141,7 +141,7 @@ export function registerCompletionCommand(program: Command): void {
|
||||
writeFileSync(installPath, script, 'utf-8');
|
||||
console.log(`Completion script installed to: ${installPath}`);
|
||||
if (shell === 'zsh') {
|
||||
console.log(`Ensure ~/.zfunc is in your fpath: fpath=(~/.zfunc $fpath)`);
|
||||
console.log('Ensure ~/.zfunc is in your fpath: fpath=(~/.zfunc $fpath)');
|
||||
}
|
||||
} else {
|
||||
process.stdout.write(script);
|
||||
|
||||
Reference in New Issue
Block a user