@@ -16,7 +16,9 @@ function loadConfiguration(configFilePath) {
1616 const configContent = fs . readFileSync ( configPath , 'utf8' ) ;
1717 return yaml . load ( configContent ) ;
1818 } catch ( error ) {
19- console . error ( `❌ Error reading config file "${ configFilePath } ": ${ error . message } ` ) ;
19+ console . error (
20+ `❌ Error reading config file "${ configFilePath } ": ${ error . message } `
21+ ) ;
2022 process . exit ( 1 ) ;
2123 }
2224}
@@ -33,8 +35,14 @@ function validateConfiguration(config) {
3335 // Validate title mappings
3436 if ( config . titleMappings ) {
3537 for ( const mapping of config . titleMappings ) {
36- if ( ! mapping . label || ! mapping . prefixes || ! Array . isArray ( mapping . prefixes ) ) {
37- console . error ( '❌ Invalid title mapping structure. Expected: { label: string, prefixes: string[] }' ) ;
38+ if (
39+ ! mapping . label ||
40+ ! mapping . prefixes ||
41+ ! Array . isArray ( mapping . prefixes )
42+ ) {
43+ console . error (
44+ '❌ Invalid title mapping structure. Expected: { label: string, prefixes: string[] }'
45+ ) ;
3846 process . exit ( 1 ) ;
3947 }
4048 }
@@ -43,8 +51,14 @@ function validateConfiguration(config) {
4351 // Validate file mappings
4452 if ( config . fileMappings ) {
4553 for ( const mapping of config . fileMappings ) {
46- if ( ! mapping . label || ! mapping . patterns || ! Array . isArray ( mapping . patterns ) ) {
47- console . error ( '❌ Invalid file mapping structure. Expected: { label: string, patterns: string[] }' ) ;
54+ if (
55+ ! mapping . label ||
56+ ! mapping . patterns ||
57+ ! Array . isArray ( mapping . patterns )
58+ ) {
59+ console . error (
60+ '❌ Invalid file mapping structure. Expected: { label: string, patterns: string[] }'
61+ ) ;
4862 process . exit ( 1 ) ;
4963 }
5064 }
0 commit comments