refactor: Cleanup unnecssary checks (#2089)
Co-authored-by: Patryk Kuniczak <p.kuniczak@gmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@ export default defineWxtModule({
|
||||
// Only create global types when user has enabled auto-imports
|
||||
entries.push(await getImportsDeclarationEntry(unimport));
|
||||
|
||||
if (wxt.config.imports.eslintrc.enabled === false) return;
|
||||
if (!wxt.config.imports.eslintrc.enabled) return;
|
||||
|
||||
// Only generate ESLint config if that feature is enabled
|
||||
entries.push(
|
||||
|
||||
@@ -40,9 +40,7 @@ export function wrapAction(
|
||||
consola.fail(
|
||||
`Command failed after ${formatDuration(Date.now() - startTime)}`,
|
||||
);
|
||||
if (err instanceof ValidationError) {
|
||||
// Don't log these errors, they've already been logged
|
||||
} else {
|
||||
if (!(err instanceof ValidationError)) {
|
||||
consola.error(err);
|
||||
}
|
||||
process.exit(1);
|
||||
|
||||
@@ -77,9 +77,8 @@ export async function findEntrypoints(): Promise<Entrypoint[]> {
|
||||
(entry) =>
|
||||
entry.name === name && entry.inputPath.endsWith('index.html'),
|
||||
);
|
||||
if (hasIndexHtml) return false;
|
||||
|
||||
return true;
|
||||
return !hasIndexHtml;
|
||||
});
|
||||
|
||||
await wxt.hooks.callHook('entrypoints:found', wxt, entrypointInfos);
|
||||
|
||||
Reference in New Issue
Block a user