1
1
import Vue from 'vue'
2
2
3
3
< % if ( options . lazy . injectMock ) { % >
4
- /* eslint-enable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */
5
4
let delayedCalls = [ ]
6
5
let SentryMock = { }
7
6
< % } % >
@@ -42,7 +41,7 @@ Vue.config.errorHandler = (error, vm, info) => {
42
41
43
42
export default function SentryPlugin ( ctx , inject ) {
44
43
< % if ( options . lazy . injectMock ) { % >
45
- /* eslint-disable object-curly-spacing, quote-props, quotes, key-spacing , comma-spacing */
44
+ /* eslint-disable-next-line quotes, comma-spacing */
46
45
const apiMethods = < %= JSON . stringify ( options . lazy . mockApiMethods ) % >
47
46
apiMethods . forEach ( ( key ) => {
48
47
SentryMock [ key ] = ( ...args ) => delayedCalls . push ( [ key , args ] )
@@ -132,7 +131,7 @@ async function loadSentry (ctx, inject) {
132
131
} )
133
132
. join ( ',\n ' )
134
133
% >
135
- /* eslint-disable object-curly-spacing, quote-props, quotes, key-spacing, comma -spacing */
134
+ /* eslint-disable quotes, key-spacing */
136
135
const config = {
137
136
Vue,
138
137
< %= serializedConfig % > ,
@@ -156,10 +155,11 @@ async function loadSentry (ctx, inject) {
156
155
return `${ key } :${ value } `
157
156
} )
158
157
159
- return `new ${ name } (${ integrationOptions . length ? '{' + integrationOptions . join ( ',' ) + '}' : '' } )`
158
+ return `new ${ name } (${ integrationOptions . length ? '{ ' + integrationOptions . join ( ',' ) + ' }' : '' } )`
160
159
} ) . join ( ',\n ' )
161
160
% > ,
162
161
]
162
+ /* eslint-enable quotes, key-spacing */
163
163
164
164
< % if ( options . customClientIntegrations ) { % >
165
165
const customIntegrations = ( await import ( /* <%= magicComments.join(', ') %> */ '<%= options.customClientIntegrations %>' ) . then ( m => m . default || m ) ) ( ctx )
@@ -169,7 +169,6 @@ async function loadSentry (ctx, inject) {
169
169
console . error ( `[@nuxtjs/sentry] Invalid value returned from customClientIntegrations plugin. Expected an array, got "${ typeof customIntegrations } ".` )
170
170
}
171
171
< % } % >
172
- /* eslint-enable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */
173
172
Sentry . init ( config )
174
173
< % } % >
175
174
0 commit comments