Skip to content

Commit 97f0b9d

Browse files
committed
Re-enable eslint no-console rule for log & debug levels
1 parent b6c2d08 commit 97f0b9d

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

.eslintrc.cjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ module.exports = {
4040
functions: 'only-multiline',
4141
},
4242
],
43+
'no-console': [
44+
'error',
45+
{
46+
allow: ['warn', 'error']
47+
}
48+
],
4349
'template-curly-spacing': [
4450
'off'
4551
],
@@ -60,6 +66,6 @@ module.exports = {
6066
],
6167
'cypress/unsafe-to-chain-command': [
6268
'off'
63-
]
69+
],
6470
},
6571
}

src/components/graphqlFormGenerator/components/vuetify.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ export function getComponentProps (gqlType, namedTypes, kinds) {
206206
if (ret) {
207207
return ret
208208
}
209-
// eslint-disable-next-line no-console
210209
console.warn(`Falling back to string for type: ${name}, kind: ${kind}`)
211210
return namedTypes.String
212211
}

src/services/workflow.service.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class WorkflowService {
167167
})
168168
} catch (err) {
169169
console.error(err)
170+
// eslint-disable-next-line no-console
170171
console.log('retrying introspection query')
171172
await new Promise(resolve => setTimeout(resolve, 2000))
172173
return this.loadTypes()
@@ -242,7 +243,6 @@ class WorkflowService {
242243
callback.init(store, errors)
243244
for (const error of errors) {
244245
store.commit('SET_ALERT', new Alert(error[0], 'error'), { root: true })
245-
// eslint-disable-next-line no-console
246246
console.warn(...error)
247247
subscription.handleViewState(ViewState.ERROR, error('Error presetting view state'))
248248
}
@@ -358,7 +358,6 @@ class WorkflowService {
358358
new Alert(error[0], 'error'),
359359
{ root: true }
360360
)
361-
// eslint-disable-next-line no-console
362361
console.warn(...error)
363362
}
364363
},
@@ -423,7 +422,6 @@ class WorkflowService {
423422
unsubscribe (query, uid) {
424423
const subscription = this.subscriptions[query.name]
425424
if (!subscription) {
426-
// eslint-disable-next-line no-console
427425
console.warn(`Could not unsubscribe [${query.name}]: Not Found`)
428426
return
429427
}

src/store/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const actions = {
4949
if (alert?.color === 'error') {
5050
console.error(alert.err)
5151
} else if (alert) {
52+
// eslint-disable-next-line no-console
5253
console.log(alert.err)
5354
}
5455
commit('SET_ALERT', alert)

src/utils/aotf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,6 @@ function _mutateSuccess (message) {
908908
async function _mutateError (mutationName, err, response) {
909909
// log the response
910910
if (response) {
911-
// eslint-disable-next-line no-console
912911
console.error('mutation response', response)
913912
}
914913

src/views/Graph.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ export default {
705705
// something went wrong, allow the layout to retry later
706706
this.graphID = null
707707
this.updating = false
708-
// eslint-disable-next-line no-console
709708
console.error(e)
710709
return
711710
}

0 commit comments

Comments
 (0)