Skip to content

Commit 82ea91b

Browse files
committed
npm run check:lint -- --fix
1 parent 59f5e43 commit 82ea91b

File tree

2 files changed

+27
-24
lines changed

2 files changed

+27
-24
lines changed

src/commands/manifest/auto.ts

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import fs from 'node:fs'
22

33
import meow from 'meow'
44

5-
import type { CliSubcommand } from '../../utils/meow-with-subcommands'
65
import { scala } from './scala.ts'
76

8-
const description =
9-
'Auto-detect build and attempt to generate manifest file'
7+
import type { CliSubcommand } from '../../utils/meow-with-subcommands'
8+
9+
const description = 'Auto-detect build and attempt to generate manifest file'
1010

1111
const help = (name: string) => `
1212
Usage
@@ -23,14 +23,14 @@ export const auto: CliSubcommand = {
2323
description,
2424
async run(argv, importMeta, { parentName }) {
2525
// Allow `--verbose` to pass through
26-
let verbose = false;
26+
let verbose = false
2727
const args = argv.filter(arg => {
2828
if (arg === '--verbose') {
29-
verbose = true;
30-
return false;
29+
verbose = true
30+
return false
3131
}
32-
return true;
33-
});
32+
return true
33+
})
3434

3535
const name = `${parentName} auto`
3636
if (args.length) {
@@ -42,18 +42,21 @@ export const auto: CliSubcommand = {
4242
})
4343
}
4444

45-
const subArgs = [];
46-
if (verbose) subArgs.push('--verbose', '1');
47-
const scalaDir = '.';
45+
const subArgs = []
46+
if (verbose) subArgs.push('--verbose', '1')
47+
const scalaDir = '.'
4848
if (fs.existsSync(scalaDir)) {
49-
console.log('Detected a Scala sbt build, running default Scala generator...')
49+
console.log(
50+
'Detected a Scala sbt build, running default Scala generator...'
51+
)
5052
subArgs.push(scalaDir)
51-
await scala.run(subArgs, importMeta, {parentName})
52-
return;
53+
await scala.run(subArgs, importMeta, { parentName })
54+
return
5355
}
5456

5557
// Show new help screen and exit
56-
meow(`
58+
meow(
59+
`
5760
$ ${name}
5861
5962
Unfortunately this script did not discover a supported language in the
@@ -64,11 +67,12 @@ export const auto: CliSubcommand = {
6467
- Make sure the necessary build tools are available (\`PATH\`)
6568
6669
If that doesn't work, see \`${name} <lang> --help\` for config details
67-
`, {
68-
argv: ['--help'],
69-
description,
70-
importMeta
71-
})
70+
`,
71+
{
72+
argv: ['--help'],
73+
description,
74+
importMeta
75+
}
76+
)
7277
}
7378
}
74-

src/commands/manifest/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import meow from 'meow'
22

3+
import { auto } from './auto.ts'
34
import { scala } from './scala'
45
import { meowWithSubcommands } from '../../utils/meow-with-subcommands'
56

67
import type { CliSubcommand } from '../../utils/meow-with-subcommands'
7-
import { auto } from './auto.ts'
88

9-
const description =
10-
'Generate a dependency manifest for given file or dir'
9+
const description = 'Generate a dependency manifest for given file or dir'
1110
const help = (name: string) => `
1211
Usage
1312

0 commit comments

Comments
 (0)