chore: prettier everywhere
This commit is contained in:
@@ -11,19 +11,21 @@ async function seedTestData() {
|
||||
const testTasks = [
|
||||
{
|
||||
title: '🎨 Design System Implementation',
|
||||
description: 'Create and implement a comprehensive design system with reusable components',
|
||||
description:
|
||||
'Create and implement a comprehensive design system with reusable components',
|
||||
status: 'in_progress' as TaskStatus,
|
||||
priority: 'high' as TaskPriority,
|
||||
tags: ['design', 'ui', 'frontend'],
|
||||
dueDate: new Date('2025-12-31')
|
||||
dueDate: new Date('2025-12-31'),
|
||||
},
|
||||
{
|
||||
title: '🔧 API Performance Optimization',
|
||||
description: 'Optimize API endpoints response time and implement pagination',
|
||||
description:
|
||||
'Optimize API endpoints response time and implement pagination',
|
||||
status: 'todo' as TaskStatus,
|
||||
priority: 'medium' as TaskPriority,
|
||||
tags: ['backend', 'performance', 'api'],
|
||||
dueDate: new Date('2025-12-15')
|
||||
dueDate: new Date('2025-12-15'),
|
||||
},
|
||||
{
|
||||
title: '✅ Test Coverage Improvement',
|
||||
@@ -31,7 +33,7 @@ async function seedTestData() {
|
||||
status: 'todo' as TaskStatus,
|
||||
priority: 'medium' as TaskPriority,
|
||||
tags: ['testing', 'quality'],
|
||||
dueDate: new Date('2025-12-20')
|
||||
dueDate: new Date('2025-12-20'),
|
||||
},
|
||||
{
|
||||
title: '📱 Mobile Responsive Design',
|
||||
@@ -39,7 +41,7 @@ async function seedTestData() {
|
||||
status: 'todo' as TaskStatus,
|
||||
priority: 'high' as TaskPriority,
|
||||
tags: ['frontend', 'mobile', 'ui'],
|
||||
dueDate: new Date('2025-12-10')
|
||||
dueDate: new Date('2025-12-10'),
|
||||
},
|
||||
{
|
||||
title: '🔒 Security Audit',
|
||||
@@ -47,8 +49,8 @@ async function seedTestData() {
|
||||
status: 'backlog' as TaskStatus,
|
||||
priority: 'urgent' as TaskPriority,
|
||||
tags: ['security', 'audit'],
|
||||
dueDate: new Date('2026-01-15')
|
||||
}
|
||||
dueDate: new Date('2026-01-15'),
|
||||
},
|
||||
];
|
||||
|
||||
let createdCount = 0;
|
||||
@@ -57,34 +59,39 @@ async function seedTestData() {
|
||||
for (const taskData of testTasks) {
|
||||
try {
|
||||
const task = await tasksService.createTask(taskData);
|
||||
|
||||
|
||||
const statusEmoji = {
|
||||
'backlog': '📋',
|
||||
'todo': '⏳',
|
||||
'in_progress': '🔄',
|
||||
'freeze': '🧊',
|
||||
'done': '✅',
|
||||
'cancelled': '❌',
|
||||
'archived': '📦'
|
||||
backlog: '📋',
|
||||
todo: '⏳',
|
||||
in_progress: '🔄',
|
||||
freeze: '🧊',
|
||||
done: '✅',
|
||||
cancelled: '❌',
|
||||
archived: '📦',
|
||||
}[task.status];
|
||||
|
||||
|
||||
const priorityEmoji = {
|
||||
'low': '🔵',
|
||||
'medium': '🟡',
|
||||
'high': '🔴',
|
||||
'urgent': '🚨'
|
||||
low: '🔵',
|
||||
medium: '🟡',
|
||||
high: '🔴',
|
||||
urgent: '🚨',
|
||||
}[task.priority];
|
||||
|
||||
|
||||
console.log(` ${statusEmoji} ${priorityEmoji} ${task.title}`);
|
||||
console.log(` Tags: ${task.tags?.join(', ') || 'aucun'}`);
|
||||
if (task.dueDate) {
|
||||
console.log(` Échéance: ${task.dueDate.toLocaleDateString('fr-FR')}`);
|
||||
console.log(
|
||||
` Échéance: ${task.dueDate.toLocaleDateString('fr-FR')}`
|
||||
);
|
||||
}
|
||||
console.log('');
|
||||
|
||||
|
||||
createdCount++;
|
||||
} catch (error) {
|
||||
console.error(` ❌ Erreur pour "${taskData.title}":`, error instanceof Error ? error.message : error);
|
||||
console.error(
|
||||
` ❌ Erreur pour "${taskData.title}":`,
|
||||
error instanceof Error ? error.message : error
|
||||
);
|
||||
errorCount++;
|
||||
}
|
||||
}
|
||||
@@ -92,7 +99,7 @@ async function seedTestData() {
|
||||
console.log('📊 Résumé:');
|
||||
console.log(` ✅ Tâches créées: ${createdCount}`);
|
||||
console.log(` ❌ Erreurs: ${errorCount}`);
|
||||
|
||||
|
||||
// Afficher les stats finales
|
||||
const stats = await tasksService.getTaskStats();
|
||||
console.log('');
|
||||
@@ -107,14 +114,16 @@ async function seedTestData() {
|
||||
|
||||
// Exécuter le script
|
||||
if (require.main === module) {
|
||||
seedTestData().then(() => {
|
||||
console.log('');
|
||||
console.log('✨ Données de test ajoutées avec succès !');
|
||||
process.exit(0);
|
||||
}).catch((error) => {
|
||||
console.error('💥 Erreur fatale:', error);
|
||||
process.exit(1);
|
||||
});
|
||||
seedTestData()
|
||||
.then(() => {
|
||||
console.log('');
|
||||
console.log('✨ Données de test ajoutées avec succès !');
|
||||
process.exit(0);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('💥 Erreur fatale:', error);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
export { seedTestData };
|
||||
|
||||
Reference in New Issue
Block a user