Closed jondandois closed 7 years ago
Hi @jondandois
Any configuration option supported by the underlying JSHint library is supported by this gem. To validate your particular use case, I added the following test which failed correctly on account of c
being defined and not used.
It's obviously difficult for me to be prescriptive about your code, but have you tried being more granular with your jshint annotations, for example:
The above annotation to /* exported test */
indicates to jshint that the test function is declared, but not used yet, so it won't be flagged up as a potential error. Would that work for you?
Damian, thanks for your comments. The / export foo / flag was what I was thinking of and works for my situation. Appreciate the help and thanks for maintaining this gem.
On Mon, Dec 5, 2016 at 7:27 AM, Damian Nicholson notifications@github.com wrote:
Hi @jondandois https://github.com/jondandois
Any configuration option supported by the underlying JSHint library is supported by this gem. To validate your particular use case, I added the following test which failed correctly on account of c being defined and not used.
It's obviously difficult for me to be prescriptive about your code, but have you tried being more granular with your jshint annotations, for example:
[image: screen shot 2016-12-05 at 12 25 14] https://cloud.githubusercontent.com/assets/34645/20884917/eb1b4e22-bae5-11e6-8bde-24ec8b8044ae.png
The above annotation to / export test / indicates to jshint that the test function is declared, but not used yet, so it won't be flagged up as a potential error. Would that work for you?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/damian/jshint/issues/42#issuecomment-264841969, or mute the thread https://github.com/notifications/unsubscribe-auth/AUIcUjLMdyhUDj0LVoTLy5IIWTRh1ViZks5rFANMgaJpZM4LC-wl .
Maybe I am missing something, but it seems like unused: vars is not supported as per http://jshint.com/docs/options/#unused. is that right? I've got a few methods that are called by partials depending on certain actions so the js files where they are defined do not immediately call the methods.