More RFC on linting - unused parameters

Colin Clark colinbdclark at gmail.com
Wed Apr 9 21:25:21 EDT 2014


I agree with Justin that this JSHint option is will typically help us guard against refactoring errors; turning it off will be a loss. It’s not the nicest of style, but could we comment out unused parameters or have a convention where we document arguments where it is helpful for readers of the source code to know that there are optional parameters available?

Colin

On Apr 9, 2014, at 8:35 AM, Justin Obara <obara.justin at gmail.com> wrote:

> However, I feel that the latter is much more likely to be the case of most of our current instances. I'd rather guard against having misleading arguments and require ourselves to have to think an explicitly mark off cases where we want to leave in unused arguments. Furthermore, turning off this setting will likely not alert any unused variables, which opens us up to a lot of potential refactoring crumbs.
> 
> I agree that we should avoid using the jshint ignore blocks, and opt for the single line wherever possible. Not only does the block style have the potential to ignore more errors, but in my experience it seems to also confuse jshint about variables and function declarations (may be fixed in newer versions of jshint).



More information about the fluid-work mailing list