/* eslint-disable */
is the inline comment that disables/ignores all the eslint rules in a js file. Similarly is there any way to disable all jslint rules with inline comment within a js file?

- 3,340
- 1
- 16
- 37
1 Answers
TL;DR -- No.
You used to be able to have JSLint ignore sections of code, but that was removed no later than April of 2013.
Here are some options:
Roll your own ignore
In another answer, I've shown how to hack JSLint yourself if you really really to recreate this functionality. You'd probably have to change some line numbers, but you get the idea.
Id any code smell
The real question, however, is what specifically is it that you want JSLint to ignore? Often there's a code smell associated with wanting to skip something that you might, on further consideration, prefer to fix another way. Or if there's a specific JSLint option that matches what you want to skip, you could turn that option on.
"Quarantine" your code
As an alternative to turning JSLint off for a few lines if you know you want to keep the code, I often put utility functions that, for whatever reason, aren't JSLint happy, in a separate file so that I can have clean files elsewhere in my codebase.

- 16,507
- 9
- 88
- 138