From 4479b202f6fd7dc7e6234c15f72e90dba83fed1a Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Fri, 14 Jun 2024 17:54:21 +0300 Subject: [PATCH] Lint fixes --- packages/core/rollup.config.mjs | 1 + packages/metadata/src/index.ts | 1 + packages/primevue/rollup.config.mjs | 1 + scripts/build-helper.mjs | 1 + 4 files changed, 4 insertions(+) diff --git a/packages/core/rollup.config.mjs b/packages/core/rollup.config.mjs index 8ded828bf..14d3af25c 100644 --- a/packages/core/rollup.config.mjs +++ b/packages/core/rollup.config.mjs @@ -36,6 +36,7 @@ const ALIAS_ENTRIES = [ const files = fs.readdirSync(folderPath); const targetFile = files.find((file) => { const ext = path.extname(file); + return ['.vue', '.js'].includes(ext) && path.basename(file, ext).toLowerCase() === fName.toLowerCase(); }); diff --git a/packages/metadata/src/index.ts b/packages/metadata/src/index.ts index 191812514..a77e85b05 100644 --- a/packages/metadata/src/index.ts +++ b/packages/metadata/src/index.ts @@ -10,6 +10,7 @@ export interface MetaType { export function toMeta(arr?: any[]): MetaType[] | undefined { return arr?.map((item) => { const it = typeof item === 'string' ? { name: item } : item; + it.from ??= `primevue/${it?.name?.toLowerCase()}`; return it; diff --git a/packages/primevue/rollup.config.mjs b/packages/primevue/rollup.config.mjs index 5818886cc..550570ba6 100644 --- a/packages/primevue/rollup.config.mjs +++ b/packages/primevue/rollup.config.mjs @@ -36,6 +36,7 @@ const ALIAS_ENTRIES = [ const files = fs.readdirSync(folderPath); const targetFile = files.find((file) => { const ext = path.extname(file); + return ['.vue', '.js'].includes(ext) && path.basename(file, ext).toLowerCase() === fName.toLowerCase(); }); diff --git a/scripts/build-helper.mjs b/scripts/build-helper.mjs index 83ac1f8a8..41e3f29db 100644 --- a/scripts/build-helper.mjs +++ b/scripts/build-helper.mjs @@ -86,6 +86,7 @@ export async function renameDTSFile(dir, newName) { await renameDTSFile(fullPath, newName); } else if (entry.name.endsWith('.d.ts')) { const newFullPath = path.join(dir, `${newName}.d.ts`); + await fs.rename(fullPath, newFullPath); } }