radiodan / radiodan.js

Radiodan audio server
Other
5 stars 1 forks source link

Add jshint and 'use strict' #5

Closed chrisn closed 9 years ago

chrisn commented 9 years ago

Hi,

I'd like to add jshint code verification, and enable strict mode in the radiodan.js codebase. These are both useful for finding potential errors in the code. I've added this to the project's Gruntfile and made code changes to fix any warnings generated (these were mostly syntactic). The default grunt task now runs jshint before running the unit tests and grunt jshint will run just the jshint step.

I hope this is OK!

Chris

pixelblend commented 9 years ago

Thanks for this, it's long overdue.

What's the process for writing code to the jshint guidelines? Do you run it manually before you commit, or does it watch your files for you?

chrisn commented 9 years ago

Thanks Dan. I normally run it manually, but grunt watch will run jshint and the unit tests when files are changed.

pixelblend commented 9 years ago

Good to know. Thanks again.