Fix lint errors: add eslint-disable for __dirname, fix no-use-before-define

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-22 14:32:02 +01:00
parent 6fa63d411f
commit 553e727d5f
13 changed files with 26 additions and 16 deletions
+4 -2
View File
@@ -64,9 +64,11 @@ export default async (opts: OptionValues): Promise<void> => {
]);
// Pick the built-in template based on the --next flag
/* eslint-disable-next-line no-restricted-syntax */
const ownPaths = findOwnPaths(__dirname);
const builtInTemplate = opts.next
? findOwnPaths(__dirname).resolve('templates/next-app')
: findOwnPaths(__dirname).resolve('templates/default-app');
? ownPaths.resolve('templates/next-app')
: ownPaths.resolve('templates/default-app');
// Use `--template-path` argument as template when specified. Otherwise, use the default template.
const templateDir = opts.templatePath