We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2979bb commit 435e312Copy full SHA for 435e312
src/rules/no-nodejs-modules.js
@@ -2,7 +2,7 @@ import importType from '../core/importType'
2
import isStaticRequire from '../core/staticRequire'
3
4
function reportIfMissing(context, node, allowed, name) {
5
- if (!allowed.includes(name) && importType(name, context) === 'builtin') {
+ if (allowed.indexOf(name) === -1 && importType(name, context) === 'builtin') {
6
context.report(node, 'Do not import Node.js builtin module "' + name + '"')
7
}
8
0 commit comments