File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -132,15 +132,23 @@ export function loadTestCases(
132
132
}
133
133
const errors = fs . readFileSync ( errorFile , 'utf8' ) ;
134
134
config . errors = parseYaml ( errors ) ;
135
+ for ( const error of config . errors ) {
136
+ if ( error . suggestions ) {
137
+ error . suggestions = error . suggestions ?. map ( ( s : any ) => ( {
138
+ output : s . output ,
139
+ desc : s . desc
140
+ } ) ) ;
141
+ }
142
+ }
135
143
if ( fixable ) {
136
- let output = null ;
144
+ let output ;
137
145
try {
138
146
output = fs . readFileSync ( outputFile , 'utf8' ) ;
139
147
} catch ( _e ) {
140
148
writeFixtures ( ruleName , inputFile ) ;
141
149
output = fs . readFileSync ( outputFile , 'utf8' ) ;
142
150
}
143
- config . output = output ;
151
+ config . output = output === config . code ? null : output ;
144
152
}
145
153
146
154
return config ;
You can’t perform that action at this time.
0 commit comments