You can use this comment in the line that you put the console:
// eslint-disable-next-line no-console <-- esto desactiva el lint en la siguiente linea
console.error = function (message) {
throw new Error(message);
};
or you can put it like this:
console.error = function (message) { // eslint-disable-line no-console <-- desactiva el lint en esta linea
throw new Error(message);
};
Some of the options above is the best practice because it prevents you from having console.log or any other in an unwanted place, however, if you still prefer to disable the option in your rules you must add this:
rules: {
'no-console': 'off',
},