Lint fixes

pull/5896/head
tugcekucukoglu 2024-06-14 17:54:21 +03:00
parent 9e2ece71af
commit 4479b202f6
4 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,7 @@ const ALIAS_ENTRIES = [
const files = fs.readdirSync(folderPath); const files = fs.readdirSync(folderPath);
const targetFile = files.find((file) => { const targetFile = files.find((file) => {
const ext = path.extname(file); const ext = path.extname(file);
return ['.vue', '.js'].includes(ext) && path.basename(file, ext).toLowerCase() === fName.toLowerCase(); return ['.vue', '.js'].includes(ext) && path.basename(file, ext).toLowerCase() === fName.toLowerCase();
}); });

View File

@ -10,6 +10,7 @@ export interface MetaType {
export function toMeta(arr?: any[]): MetaType[] | undefined { export function toMeta(arr?: any[]): MetaType[] | undefined {
return arr?.map((item) => { return arr?.map((item) => {
const it = typeof item === 'string' ? { name: item } : item; const it = typeof item === 'string' ? { name: item } : item;
it.from ??= `primevue/${it?.name?.toLowerCase()}`; it.from ??= `primevue/${it?.name?.toLowerCase()}`;
return it; return it;

View File

@ -36,6 +36,7 @@ const ALIAS_ENTRIES = [
const files = fs.readdirSync(folderPath); const files = fs.readdirSync(folderPath);
const targetFile = files.find((file) => { const targetFile = files.find((file) => {
const ext = path.extname(file); const ext = path.extname(file);
return ['.vue', '.js'].includes(ext) && path.basename(file, ext).toLowerCase() === fName.toLowerCase(); return ['.vue', '.js'].includes(ext) && path.basename(file, ext).toLowerCase() === fName.toLowerCase();
}); });

View File

@ -86,6 +86,7 @@ export async function renameDTSFile(dir, newName) {
await renameDTSFile(fullPath, newName); await renameDTSFile(fullPath, newName);
} else if (entry.name.endsWith('.d.ts')) { } else if (entry.name.endsWith('.d.ts')) {
const newFullPath = path.join(dir, `${newName}.d.ts`); const newFullPath = path.join(dir, `${newName}.d.ts`);
await fs.rename(fullPath, newFullPath); await fs.rename(fullPath, newFullPath);
} }
} }