@@ -44,15 +44,15 @@ export default {
4444 },
4545 language: {
4646 type: String ,
47- default: " json"
47+ default: " json" ,
4848 },
4949 fileName: {
5050 type: String ,
51- default: " a.json"
51+ default: " a.json" ,
5252 },
5353 parser: {
5454 type: String ,
55- default: " jsonc-eslint-parser"
55+ default: " jsonc-eslint-parser" ,
5656 },
5757 },
5858
@@ -105,7 +105,11 @@ export default {
105105 }
106106 },
107107 linter () {
108- if (! this .eslint4b || ! this .jsoncESLintParser || ! this .vueESLintParser ) {
108+ if (
109+ ! this .eslint4b ||
110+ ! this .jsoncESLintParser ||
111+ ! this .vueESLintParser
112+ ) {
109113 return null
110114 }
111115 const Linter = this .eslint4b
@@ -125,7 +129,11 @@ export default {
125129
126130 async mounted () {
127131 // Load linter asynchronously.
128- const [{ default: eslint4b }, jsoncESLintParser , vueESLintParser ] = await Promise .all ([
132+ const [
133+ { default: eslint4b },
134+ jsoncESLintParser,
135+ vueESLintParser,
136+ ] = await Promise .all ([
129137 import (" eslint4b" ),
130138 import (" espree" ).then (() => import (" jsonc-eslint-parser" )),
131139 import (" espree" ).then (() => import (" vue-eslint-parser" )),
@@ -142,25 +150,25 @@ export default {
142150 monaco .languages .typescript .typescriptDefaults .setDiagnosticsOptions (
143151 {
144152 validate: false ,
145- }
153+ },
146154 )
147155 monaco .languages .typescript .javascriptDefaults .setDiagnosticsOptions (
148156 {
149157 validate: false ,
150- }
158+ },
151159 )
152160 })
153161 editor .$watch (" codeEditor" , () => {
154162 if (editor .codeEditor ) {
155163 editor .codeEditor .onDidChangeModelDecorations (() =>
156- this .onDidChangeModelDecorations (editor .codeEditor )
164+ this .onDidChangeModelDecorations (editor .codeEditor ),
157165 )
158166 }
159167 })
160168 editor .$watch (" fixedCodeEditor" , () => {
161169 if (editor .fixedCodeEditor ) {
162170 editor .fixedCodeEditor .onDidChangeModelDecorations (() =>
163- this .onDidChangeModelDecorations (editor .fixedCodeEditor )
171+ this .onDidChangeModelDecorations (editor .fixedCodeEditor ),
164172 )
165173 }
166174 })
0 commit comments