nzakas/eslint — pull request #164 by mamacdon (2013-07-28 17:55:46+00:00)
Title: Add no-undef (fixes #6)

Here's a patch that adds a no-undef rule.

Summary:
* Behavior is pretty much the same as JSLint/JSHint.
* We now pass ```comment:true``` to Esprima so it retains comments. (The parser puts all comments on the Program node, which is fine for this case.)
* The rule supports the ```node:true``` and ```browser:true``` options as a shortcut for pre-defining common environment globals. They go inside a ```/*jshint */``` or ```/*jslint */``` block.
* I didn't attempt to make the ```/*global */``` info reusable -- it's parsed internally by the rule. But it should be pretty easy to move into the rule context if it makes sense to share.

Let me know what you think.