@@ -59,19 +59,21 @@ const options = await p.group(
59
59
} )
60
60
} ) ,
61
61
62
- types : ( ) =>
62
+ types : ( { results } ) =>
63
63
p . select ( {
64
64
message : 'Add type checking with TypeScript?' ,
65
- initialValue : /** @type {'checkjs' | 'typescript' | null } */ ( 'checkjs' ) ,
65
+ initialValue : /** @type {'checkjs' | 'typescript' | null } */ (
66
+ results . template === 'skeletonlib' ? 'checkjs' : 'typescript'
67
+ ) ,
66
68
options : [
67
- {
68
- label : 'Yes, using JavaScript with JSDoc comments' ,
69
- value : 'checkjs'
70
- } ,
71
69
{
72
70
label : 'Yes, using TypeScript syntax' ,
73
71
value : 'typescript'
74
72
} ,
73
+ {
74
+ label : 'Yes, using JavaScript with JSDoc comments' ,
75
+ value : 'checkjs'
76
+ } ,
75
77
{ label : 'No' , value : null }
76
78
]
77
79
} ) ,
@@ -110,7 +112,7 @@ const options = await p.group(
110
112
await create ( cwd , {
111
113
name : path . basename ( path . resolve ( cwd ) ) ,
112
114
template : /** @type {'default' | 'skeleton' | 'skeletonlib' } */ ( options . template ) ,
113
- types : options . types ,
115
+ types : /** @type { 'checkjs' | 'typescript' | null } */ ( options . types ) ,
114
116
prettier : options . features . includes ( 'prettier' ) ,
115
117
eslint : options . features . includes ( 'eslint' ) ,
116
118
playwright : options . features . includes ( 'playwright' ) ,
0 commit comments