Skip to content

Commit 068a879

Browse files
committed
chore(lint): tweak eslint ignore directives for generated plugin files
1 parent 0d721ad commit 068a879

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
!.eslintrc.js
22
!.release-it.js
3+
34
# un-ignore @nuxtjs/eslint-config
45
!*.d.ts
6+
!.nuxt/sentry.*.js
7+
58
dist/
69
lib/plugin.*
710
lib/templates/*.*

lib/plugin.client.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const { <%= integrations.join(', ') %> } = Sentry.Integrations
1616
}
1717
%>
1818

19-
// eslint-disable-next-line require-await
2019
export default async function (ctx, inject) {
2120
<% if (options.initialize) { %>
2221
/* eslint-disable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */
@@ -48,7 +47,7 @@ export default async function (ctx, inject) {
4847
return `${key}:${value}`
4948
})
5049

51-
return `new ${name}(${integrationOptions.length ? '{' + integrationOptions.join(',') + '}' : ''})`
50+
return `new ${name}(${integrationOptions.length ? '{ ' + integrationOptions.join(',') + ' }' : ''})`
5251
})
5352
.join(',\n ') %>,
5453
]

lib/plugin.lazy.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Vue from 'vue'
22

33
<% if (options.lazy.injectMock) { %>
4-
/* eslint-enable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */
54
let delayedCalls = []
65
let SentryMock = {}
76
<% } %>
@@ -42,7 +41,7 @@ Vue.config.errorHandler = (error, vm, info) => {
4241

4342
export default function SentryPlugin (ctx, inject) {
4443
<% 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 */
4645
const apiMethods = <%= JSON.stringify(options.lazy.mockApiMethods)%>
4746
apiMethods.forEach((key) => {
4847
SentryMock[key] = (...args) => delayedCalls.push([key, args])
@@ -132,7 +131,7 @@ async function loadSentry (ctx, inject) {
132131
})
133132
.join(',\n ')
134133
%>
135-
/* eslint-disable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */
134+
/* eslint-disable quotes, key-spacing */
136135
const config = {
137136
Vue,
138137
<%= serializedConfig %>,
@@ -156,10 +155,11 @@ async function loadSentry (ctx, inject) {
156155
return `${key}:${value}`
157156
})
158157

159-
return `new ${name}(${integrationOptions.length ? '{' + integrationOptions.join(',') + '}' : ''})`
158+
return `new ${name}(${integrationOptions.length ? '{ ' + integrationOptions.join(',') + ' }' : ''})`
160159
}).join(',\n ')
161160
%>,
162161
]
162+
/* eslint-enable quotes, key-spacing */
163163

164164
<%if (options.customClientIntegrations) {%>
165165
const customIntegrations = (await import(/* <%= magicComments.join(', ') %> */ '<%= options.customClientIntegrations %>').then(m => m.default || m))(ctx)
@@ -169,7 +169,6 @@ async function loadSentry (ctx, inject) {
169169
console.error(`[@nuxtjs/sentry] Invalid value returned from customClientIntegrations plugin. Expected an array, got "${typeof customIntegrations}".`)
170170
}
171171
<% } %>
172-
/* eslint-enable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */
173172
Sentry.init(config)
174173
<% } %>
175174

0 commit comments

Comments
 (0)