es-lint warn console.log()

This commit is contained in:
axolotle 2021-05-01 13:04:06 +02:00
parent a1ff39c9cb
commit 1ab7a3ef93
4 changed files with 5 additions and 0 deletions

View file

@ -68,6 +68,7 @@
} }
} }
], ],
"no-console": "warn",
"template-curly-spacing": "off", "template-curly-spacing": "off",
"camelcase": "warn", "camelcase": "warn",
"indent": "off", "indent": "off",

View file

@ -19,6 +19,7 @@ class APIError extends Error {
} }
log () { log () {
/* eslint-disable-next-line */
console.error(`${this.name} (${this.code}): ${this.uri}\n${this.message}`) console.error(`${this.name} (${this.code}): ${this.uri}\n${this.message}`)
} }
} }

View file

@ -105,6 +105,8 @@ export default {
api.put( api.put(
`apps/${this.id}/config`, { args }, { key: 'apps.update_config', name: this.id } `apps/${this.id}/config`, { args }, { key: 'apps.update_config', name: this.id }
).then(response => { ).then(response => {
// FIXME what should be done ?
/* eslint-disable-next-line */
console.log('SUCCESS', response) console.log('SUCCESS', response)
}).catch(err => { }).catch(err => {
if (err.name !== 'APIBadRequestError') throw err if (err.name !== 'APIBadRequestError') throw err

View file

@ -138,6 +138,7 @@ export default {
}).then(response => { }).then(response => {
if (response.ok) return response.json() if (response.ok) return response.json()
// FIXME flash error // FIXME flash error
/* eslint-disable-next-line */
else console.log('error', response) else console.log('error', response)
}).then(({ key }) => { }).then(({ key }) => {
window.open('https://paste.yunohost.org/' + key, '_blank') window.open('https://paste.yunohost.org/' + key, '_blank')