File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change 32
32
"shelljs" : " ^0.7.8" ,
33
33
"string-replace-loader" : " ^1.3.0" ,
34
34
"vue" : " ^2.5.9" ,
35
- "vue-eslint-parser" : " ^2.0.1 " ,
35
+ "vue-eslint-parser" : " ^2.0.2 " ,
36
36
"vue-loader" : " ^13.5.0" ,
37
37
"vue-template-compiler" : " ^2.5.9" ,
38
38
"webpack" : " ^3.8.1" ,
Original file line number Diff line number Diff line change @@ -155,16 +155,12 @@ export default class PlaygroundState {
155
155
lint ( ) {
156
156
const config = this . _configToLint
157
157
158
- // Fix
158
+ // Lint
159
159
try {
160
- // At first, fix because `linter.verifyAndFix` does not accept SourceCode object.
161
- const ret = linter . verifyAndFix ( this . code , config )
162
- this . fixedCode = ret . output
163
- this . fixedMessages = ret . messages
160
+ this . messages = linter . verify ( this . code , config )
164
161
}
165
162
catch ( err ) {
166
- this . fixedCode = this . code
167
- this . fixedMessages = [ {
163
+ this . messages = [ {
168
164
fatal : true ,
169
165
severity : 2 ,
170
166
message : err . message ,
@@ -173,17 +169,15 @@ export default class PlaygroundState {
173
169
} ]
174
170
}
175
171
176
- // Lint
172
+ // Fix
177
173
try {
178
- this . messages = linter . verify (
179
- // Cannot reuse until https://github.com/eslint/eslint/pull/8755 is merged.
180
- // linter.getSourceCode(), // Reuse the AST of the previous `linter.verifyAndFix`.
181
- this . code ,
182
- config
183
- )
174
+ const ret = linter . verifyAndFix ( this . code , config )
175
+ this . fixedCode = ret . output
176
+ this . fixedMessages = ret . messages
184
177
}
185
178
catch ( err ) {
186
- this . messages = [ {
179
+ this . fixedCode = this . code
180
+ this . fixedMessages = [ {
187
181
fatal : true ,
188
182
severity : 2 ,
189
183
message : err . message ,
You can’t perform that action at this time.
0 commit comments