lint: always warn on console/debugger

This commit is contained in:
Thomas Amland 2020-08-11 18:54:23 +02:00
parent 24ed0d9ea9
commit e12c1f8d33
5 changed files with 3 additions and 8 deletions

View File

@ -18,8 +18,8 @@ module.exports = {
'vue/no-unused-components': 'off', 'vue/no-unused-components': 'off',
'vue/max-attributes-per-line': 'off', 'vue/max-attributes-per-line': 'off',
'vue/html-closing-bracket-newline': 'off', 'vue/html-closing-bracket-newline': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-console': 'warn',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': 'warn',
'no-useless-constructor': 'off', // Crashes eslint 'no-useless-constructor': 'off', // Crashes eslint
'no-empty-pattern': 'off', 'no-empty-pattern': 'off',
'comma-dangle': 'off', 'comma-dangle': 'off',

View File

@ -118,7 +118,6 @@
}) })
}, },
dragstart(id: string, event: any) { dragstart(id: string, event: any) {
console.log('dragstart: ' + id)
event.dataTransfer.setData('id', id) event.dataTransfer.setData('id', id)
}, },
} }

View File

@ -34,6 +34,7 @@ Vue.prototype.$auth = authService
Vue.prototype.$api = api Vue.prototype.$api = api
Vue.config.errorHandler = (err) => { Vue.config.errorHandler = (err) => {
// eslint-disable-next-line
console.error(err) console.error(err)
store.commit('setError', err) store.commit('setError', err)
} }

View File

@ -167,9 +167,6 @@ export function setupAudio(store: Store<any>) {
store.commit('player/setPaused') store.commit('player/setPaused')
store.commit('setError', audio.error) store.commit('setError', audio.error)
} }
audio.onwaiting = () => {
console.log('audio is waiting for more data.')
}
if (mediaSession) { if (mediaSession) {
mediaSession.setActionHandler('play', () => { mediaSession.setActionHandler('play', () => {

View File

@ -60,13 +60,11 @@
return this.$store.dispatch('createPlaylist', name) return this.$store.dispatch('createPlaylist', name)
}, },
onDrop(playlistId: string, event: any) { onDrop(playlistId: string, event: any) {
console.log('onDrop')
event.preventDefault() event.preventDefault()
const trackId = event.dataTransfer.getData('id') const trackId = event.dataTransfer.getData('id')
return this.$store.dispatch('addTrackToPlaylist', { playlistId, trackId }) return this.$store.dispatch('addTrackToPlaylist', { playlistId, trackId })
}, },
onDragover(event: any) { onDragover(event: any) {
console.log('onDragover')
event.preventDefault() event.preventDefault()
}, },
} }