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 3232 "shelljs" : " ^0.7.8" ,
3333 "string-replace-loader" : " ^1.3.0" ,
3434 "vue" : " ^2.5.9" ,
35- "vue-eslint-parser" : " ^2.0.1 " ,
35+ "vue-eslint-parser" : " ^2.0.2 " ,
3636 "vue-loader" : " ^13.5.0" ,
3737 "vue-template-compiler" : " ^2.5.9" ,
3838 "webpack" : " ^3.8.1" ,
Original file line number Diff line number Diff line change @@ -155,16 +155,12 @@ export default class PlaygroundState {
155155 lint ( ) {
156156 const config = this . _configToLint
157157
158- // Fix
158+ // Lint
159159 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 )
164161 }
165162 catch ( err ) {
166- this . fixedCode = this . code
167- this . fixedMessages = [ {
163+ this . messages = [ {
168164 fatal : true ,
169165 severity : 2 ,
170166 message : err . message ,
@@ -173,17 +169,15 @@ export default class PlaygroundState {
173169 } ]
174170 }
175171
176- // Lint
172+ // Fix
177173 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
184177 }
185178 catch ( err ) {
186- this . messages = [ {
179+ this . fixedCode = this . code
180+ this . fixedMessages = [ {
187181 fatal : true ,
188182 severity : 2 ,
189183 message : err . message ,
You can’t perform that action at this time.
0 commit comments