Skip to content

Instantly share code, notes, and snippets.

@twolfson
Created January 20, 2013 02:11
Show Gist options
  • Save twolfson/4576265 to your computer and use it in GitHub Desktop.
Save twolfson/4576265 to your computer and use it in GitHub Desktop.
List out every JSHint option on as JSON
// You must be on http://www.jshint.org/docs/
var nameElts = $$('.name'),
names = nameElts.map(function (elt) {
return elt.textContent || elt.innerText;
}),
nameProps = names.map(function (name) {
return ' ' + name + ': false';
}),
retStr = '{\n' + nameProps.join(',\n') + '\n}';
console.log(retStr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment