File tree Expand file tree Collapse file tree
packages/create-statikapi/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,10 @@ async function main(argv) {
9696 initial : 0 ,
9797 } ,
9898 {
99- type : 'confirm' ,
99+ type : ( prev , values ) => {
100+ const tmpl = TEMPLATES . has ( template ) ? template : values . template ;
101+ return tmpl === 'cloudflare-adapter' ? null : 'confirm' ;
102+ } ,
100103 name : 'wantEslint' ,
101104 message : 'Add ESLint?' ,
102105 initial : true ,
@@ -237,7 +240,13 @@ async function main(argv) {
237240 appName = appName || answers . name ;
238241 template = TEMPLATES . has ( template ) ? template : answers . template || DEFAULT_TEMPLATE ;
239242 pkgMgr = pkgMgr || answers . pm || DEFAULT_PM ;
240- wantEslint = answers . wantEslint ?? true ;
243+
244+ // For cloudflare-adapter, always disable ESLint
245+ if ( template === 'cloudflare-adapter' ) {
246+ wantEslint = false ;
247+ } else {
248+ wantEslint = answers . wantEslint ?? true ;
249+ }
241250 // language: if cloudflare-adapter, force JS
242251 language = template === 'cloudflare-adapter' ? 'js' : answers . language || language || 'js' ;
243252
@@ -293,7 +302,7 @@ async function main(argv) {
293302
294303 await writeNodeVersions ( dest ) ;
295304
296- if ( wantEslint ) {
305+ if ( wantEslint && template !== 'cloudflare-adapter' ) {
297306 await writeEslint ( dest , { language } ) ;
298307 }
299308
You can’t perform that action at this time.
0 commit comments