@@ -74,6 +74,9 @@ export const setupSet: SetupSet = {
74
74
. option ( "--eslintrc <file>" , "eslintrc file" , {
75
75
default : esLintOptions . eslintrc ,
76
76
} )
77
+ . option ( "--ignore <file>" , ".eslintignore file" , {
78
+ default : esLintOptions . ignorePath ,
79
+ } )
77
80
. option ( "--path <path>" , "Inspecte path" , {
78
81
default : esLintOptions . paths ,
79
82
} )
@@ -84,9 +87,10 @@ export const setupSet: SetupSet = {
84
87
default : ".js,.jsx,.ts,.tsx" ,
85
88
} )
86
89
. action ( async ( options ) => {
87
- const { eslintrc, staged, path, suffix } = options ;
90
+ const { eslintrc, ignore , staged, path, suffix } = options ;
88
91
await eslintFix ( cwd , {
89
92
eslintrc,
93
+ ignorePath : ignore ,
90
94
staged,
91
95
paths : typeof path === "string" ? [ path ] : path ,
92
96
suffix : suffix . split ( "," ) ,
@@ -99,6 +103,9 @@ export const setupSet: SetupSet = {
99
103
. option ( "--prettierrc <file>" , "prettierrc file" , {
100
104
default : prettierFormatOptions . prettierrc ,
101
105
} )
106
+ . option ( "--ignore <file>" , ".prettierignore file" , {
107
+ default : prettierFormatOptions . ignorePath ,
108
+ } )
102
109
. option ( "--path <path>" , "Inspecte path" , {
103
110
default : prettierFormatOptions . paths ,
104
111
} )
@@ -109,9 +116,10 @@ export const setupSet: SetupSet = {
109
116
default : ".js,.jsx,.ts,.tsx" ,
110
117
} )
111
118
. action ( async ( options ) => {
112
- const { prettierrc, staged, path, suffix } = options ;
119
+ const { prettierrc, ignore , staged, path, suffix } = options ;
113
120
await prettierFormat ( cwd , {
114
121
prettierrc,
122
+ ignorePath : ignore ,
115
123
staged,
116
124
paths : typeof path === "string" ? [ path ] : path ,
117
125
suffix : suffix . split ( "," ) ,
0 commit comments