What can you do to disable one ESLint rule that is perhaps set automatically by your tooling?
You can disable one or more specific ESLint rules for a whole file by adding on a few lines:
/* eslint-disable no-debugger, no-console */ console.log('test')
or you can just do so in a block, re-enabling it afterwards:
/* eslint-disable no-debugger, no-console */ console.log('test') /* eslint-enable no-alert, no-console */
Or you can disable the rule on a specific line:
console.log('test') // eslint-disable-line no-console
debugger // eslint-disable-line no-debugger
alert('test') // eslint-disable-line no-alert
Pssst! Also check my latest YouTube video
I am writing a book on how to create a successful blog as a developer.
It will be released late February.
Signup to my newsletter to get 2/3 free chapters in your inbox in the next few weeks!