refactor: Cleanup unnecssary checks (#2089)

Co-authored-by: Patryk Kuniczak <p.kuniczak@gmail.com>
This commit is contained in:
Aaron
2026-02-09 01:37:47 -06:00
committed by GitHub
parent ffdb22238c
commit 296997d10e
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -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(
+1 -3
View File
@@ -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);