1- import { Command } from "commander" ;
21import { access } from "node:fs/promises" ;
32import { resolve } from "node:path" ;
3+ import { Command } from "commander" ;
44
55import CONFIG from "@/config" ;
66import { buildTree } from "@/tree" ;
@@ -13,7 +13,7 @@ function parseDepth(value: string): number | "inf" {
1313 const num = parseInt ( value , 10 ) ;
1414 if ( Number . isNaN ( num ) || num < 0 ) {
1515 console . error (
16- `Error: Invalid depth value "${ value } ". Must be a positive number or "inf".`
16+ `Error: Invalid depth value "${ value } ". Must be a positive number or "inf".` ,
1717 ) ;
1818 process . exit ( 1 ) ;
1919 }
@@ -33,19 +33,19 @@ export async function main() {
3333 . version (
3434 `TreeEx v${ CONFIG . APP . VERSION } ` ,
3535 "-v, --version" ,
36- "Show version number"
36+ "Show version number" ,
3737 )
3838 . argument ( "[path]" , "Path to analyze" , "." )
3939 . option (
4040 "-d, --depth <level>" ,
4141 `Maximum depth level (use "inf" for unlimited)` ,
42- String ( CONFIG . DEFAULT_VALUES . MAX_DEPTH )
42+ String ( CONFIG . DEFAULT_VALUES . MAX_DEPTH ) ,
4343 )
4444 . option (
4545 "-i, --ignore <pattern>" ,
4646 "Additional glob pattern to ignore (can be used multiple times)" ,
4747 collectIgnorePatterns ,
48- [ ]
48+ [ ] ,
4949 )
5050 . option ( "--no-default-ignore" , "Disable default ignore patterns" )
5151 . addHelpText ( "after" , CONFIG . ARGS . HELP_TEXT ) ;
@@ -60,7 +60,7 @@ export async function main() {
6060 await access ( targetPath ) ;
6161 } catch {
6262 console . error (
63- `Error: Path "${ targetPath } " does not exist or is not accessible.`
63+ `Error: Path "${ targetPath } " does not exist or is not accessible.` ,
6464 ) ;
6565 process . exit ( 1 ) ;
6666 }
0 commit comments