If I add any given ESLint rule, for example no-param-reassign
in an existing codebase I'm likely to get many violations.
Is there a good way to programmatically add, on line-by-line bases, suppressions for all existing violations?
In the example case:
// eslint-diable-next-line no-param-reassign
param = foo;
To clarify
I do want the rule in my project, guarding all new code we write. I don't want to fix all the old code that is emitting violations by hand (I want a script to do that for me or eslint itself if possible). This is why I would like to suppress all existing violations but respect all new violations. My main goal is to comply with the new rule as fast as possible to get the value from it on all new code. I don't mind old lingering suppressed violations.