felixge/node-ar-drone — pull request #82 by janpieper (2013-10-23 09:52:46+00:00)
Title: Use jshint to check code for problems and errors

## Problems

[#80 Drop unused variables](https://github.com/felixge/node-ar-drone/pull/80)
[#81 Drop duplicate test](https://github.com/felixge/node-ar-drone/pull/81)
[lib/Client.js#L22](https://github.com/janpieper/node-ar-drone/blob/master/lib/Client.js#L22) vs. [lib/Client.js#L59-L62](https://github.com/janpieper/node-ar-drone/blob/master/) (found while making the code jshint compliant)

## JSHint Configuration

### node
> This option defines globals available when your code is running inside of the Node runtime environment. Node.js is a server-side JavaScript environment that uses an asynchronous event-driven model.

Configured value: __true__

### laxbreak
> This option suppresses most of the warnings about possibly unsafe line breakings in your code. It doesn't suppress warnings about comma-first coding style. [...]

Configured value: __true__

This allows us to use the ternary operator with multiple lines:

````javascript
navdata[optionName] = (exports.OPTION_PARSERS[optionName])
? exports.OPTION_PARSERS[optionName](optionReader)
: new Error('Option not implemented yet: ' + optionName + ' (0x' + optionId.toString(16) + ')');
````

See [lib/navdata/parseNavdata.js#L60-L62](https://github.com/felixge/node-ar-drone/blob/master/lib/navdata/parseNavdata.js#L60-L62).

### indent
> This option enforces specific tab width for your code. [...]

Configured value: __2__

### curly
> This option requires you to always put curly braces around blocks in loops and conditionals. JavaScript allows you to omit curly braces when the block consists of only one statement, [...]

Configured value: __true__

### trailing
> This option makes it an error to leave a trailing whitespace in your code. Trailing whitespaces can be source of nasty bugs with multi-line strings in JavaScript [...]

Configured value: __true__