Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eslint disable no console not working

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?

like image 471
Leff Avatar asked Mar 01 '18 14:03

Leff


1 Answers

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 */
like image 128
Nelu Avatar answered Oct 11 '22 22:10

Nelu