Skip to content

Commit 435e312

Browse files
committed
Fix not working in Node v4
1 parent c2979bb commit 435e312

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules/no-nodejs-modules.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import importType from '../core/importType'
22
import isStaticRequire from '../core/staticRequire'
33

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

0 commit comments

Comments
 (0)