I am trying to log to console something by disabling the no console rule in eslint like this:
// eslint-disable-next-line no-console
console.log(props.hasSubmittedForm);
But, I get an error:
Module build failed
unexpected token
For the dot the console.log. Why can't I log to the console like that?
Interestingly for me when I switch from eslint-disable-next-line
to eslint-disable
I have to also change the comment from //
to /* */
.
This didn't work:
// eslint-disable no-console
This worked:
/* eslint-disable no-console */
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With