@@ -23,34 +23,34 @@ const {
23
23
_ : files ,
24
24
transformation : transformationName ,
25
25
runAllTransformation : runAllTransformation ,
26
- params,
26
+ params
27
27
} = yargs
28
28
. usage ( 'Usage: $0 [file pattern]' )
29
29
. option ( 'transformation' , {
30
30
alias : 't' ,
31
31
type : 'string' ,
32
32
conflicts : 'runAllTransformation' ,
33
- describe : 'Name or path of the transformation module' ,
33
+ describe : 'Name or path of the transformation module'
34
34
} )
35
35
. option ( 'params' , {
36
36
alias : 'p' ,
37
- describe : 'Custom params to the transformation' ,
37
+ describe : 'Custom params to the transformation'
38
38
} )
39
39
. option ( 'runAllTransformation' , {
40
40
alias : 'a' ,
41
41
type : 'boolean' ,
42
42
conflicts : 'transformation' ,
43
- describe : 'run all transformation module' ,
43
+ describe : 'run all transformation module'
44
44
} )
45
45
. example ( [
46
46
[
47
47
'npx vue-codemod ./src -a' ,
48
- 'Run all rules to convert all relevant files in the ./src folder' ,
48
+ 'Run all rules to convert all relevant files in the ./src folder'
49
49
] ,
50
50
[
51
51
'npx vue-codemod ./src/components/HelloWorld.vue -t slot-attribute' ,
52
- 'Run slot-attribute rule to convert HelloWorld.vue' ,
53
- ] ,
52
+ 'Run slot-attribute rule to convert HelloWorld.vue'
53
+ ]
54
54
] )
55
55
. help ( )
56
56
. alias ( 'h' , 'help' ) . argv
@@ -99,7 +99,7 @@ function processTransformation(
99
99
debug ( `Processing ${ p } …` )
100
100
const fileInfo = {
101
101
path : p ,
102
- source : fs . readFileSync ( p ) . toString ( ) ,
102
+ source : fs . readFileSync ( p ) . toString ( )
103
103
}
104
104
const extension = ( / \. ( [ ^ . ] * ) $ / . exec ( fileInfo . path ) || [ ] ) [ 0 ]
105
105
if ( ! extensions . includes ( extension ) ) {
@@ -119,7 +119,7 @@ function processTransformation(
119
119
}
120
120
}
121
121
122
- main ( ) . catch ( ( err ) => {
122
+ main ( ) . catch ( err => {
123
123
console . error ( err )
124
124
process . exit ( 1 )
125
125
} )
0 commit comments