forked from StarkMindsHQ/StrellerMinds-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-prettier.js
More file actions
34 lines (29 loc) · 990 Bytes
/
Copy pathfix-prettier.js
File metadata and controls
34 lines (29 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// fix-prettier.js
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');
// Files with Prettier issues
const filesToFix = [
'src/app/layout.tsx',
'src/app/page.tsx',
'src/components/Animated-graded-background.tsx',
'src/components/ui/avatar.tsx',
'src/components/ui/badge.tsx',
'src/components/ui/button.tsx',
'src/components/ui/card.tsx',
'src/components/ui/carousel.tsx',
'src/components/ui/dialog.tsx',
'src/lib/utils.ts',
];
console.log('🔍 Starting Prettier fixes...');
try {
// Run Prettier with --write flag to fix all files
const command = `npx prettier --write ${filesToFix.join(' ')}`;
console.log(`Running: ${command}`);
execSync(command, { stdio: 'inherit' });
console.log('✅ All files have been formatted successfully!');
console.log('You can now run "npm run build" again.');
} catch (error) {
console.error('❌ Error fixing formatting issues:', error.message);
process.exit(1);
}