Later versions of ESLint have now been updated with a better way disable a single line:
// eslint-disable-next-line $rulename
See goofballLogic's excellent answer.
Note though, the above is not working for jsx eg React web applications.
For older versions of ESLint
You can use the following pair of disable/ enable comments. Please note only the /*eslint ... */ syntax is working; //eslint ... is not working.
/* eslint-disable */
alert('suppress all warnings between comments')
/* eslint-enable */
/* eslint-disable eqeqeq */
alert('suppress specific warning eg eqeqeq between comments')
/* eslint-enable eqeqeq */
To disable a specific warning, e.g., eqeqeq for an entire file, you can include a comment at the top of the file:
/* eslint eqeqeq:0 */
And when using multi-rule to ignore, list them on one line, separated with a space:
/* eslint jsx-a11y/alt-text:0 react/jsx-no-duplicate-props:0 */