I have eslintincluded in my vue webapp, I have the following code:
myApi.get('products/12').then((prodResponse) => {
state.commit('ADD_PRODUCT', {product: prodResponse.data})
},
error => {
console.log('Inside error, fetching product line items failed')
router.push({path: '/'})
})
This is the error handling that I want to do, but I get the following error from the liner:
✘ http://eslint.org/docs/rules/handle-callback-err Expected error to handle ~ / Vya / SRC / store / modules / myStore.js: 97: 9 error => {
I can add the following comment to convert this to a warning:
/* eslint handle-callback-err: "warn" */
But how can I suppress this completely or change the code so that this error does not occur.
source
share