douglascrockford/JSLint — Issue #86: requiring querystring and util in nodejs throws unwarranted redefinition errors
Author: davidmarkclements
Created: 2011-11-18 03:38:30+00:00
State: open

contents of node js file:

var querystring = require('querystring');
var util = require('util');

jslint output:

1 1,5: Redefinition of 'querystring'.
var querystring = require('querystring');
2 1,17: Read only.
var querystring = require('querystring');
3 2,5: Redefinition of 'util'.
var util = require('util');
4 2,10: Read only.
var util = require('util');

renaming the variables (e.g. var a = require('util'); ) prevents the errors, wrapping in function prevents errors too.

p.s. Thanks for standardizing the madness