Jshint: JSHint + `"use strict";` results in spurious "'exports' is not defined." warnings

Created on 9 May 2013  路  3Comments  路  Source: jshint/jshint

I'd like to apply both JSHint and "use strict"; to my Node.js code, but when I do, JSHint complains:

$ jshint .
binfix.js: line 14, col 1, 'exports' is not defined.
binfix.js: line 24, col 1, 'exports' is not defined.
binfix.js: line 48, col 1, 'exports' is not defined.

Most helpful comment

I added this:

{
"node" : true
}

in .jshintrc file and it worked well for me. Thank you @mcandre and @valueof !

All 3 comments

use /*jshint node:true */ option.

@antonkovalyov Thanks again! All the warnings went away when I added "node": true to my .jshintrc!

I added this:

{
"node" : true
}

in .jshintrc file and it worked well for me. Thank you @mcandre and @valueof !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

voronianski picture voronianski  路  8Comments

jugglinmike picture jugglinmike  路  6Comments

timdown picture timdown  路  7Comments

TheSavior picture TheSavior  路  3Comments

Daniel-Hug picture Daniel-Hug  路  3Comments