Skip to content

Commit

Permalink
Fix not working in Node v4
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Aug 22, 2016
1 parent c2979bb commit 435e312
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/no-nodejs-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import importType from '../core/importType'
import isStaticRequire from '../core/staticRequire'

function reportIfMissing(context, node, allowed, name) {
if (!allowed.includes(name) && importType(name, context) === 'builtin') {
if (allowed.indexOf(name) === -1 && importType(name, context) === 'builtin') {
context.report(node, 'Do not import Node.js builtin module "' + name + '"')
}
}
Expand Down

0 comments on commit 435e312

Please sign in to comment.