Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 32a0115

Browse files
authored
Add node/global-require ESLint rule (#224)
1 parent a5d685b commit 32a0115

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ module.exports = {
1919
'fp/no-mutating-methods': 0,
2020
'fp/no-mutation': 0,
2121
'fp/no-this': 0,
22-
'node/global-require': 0,
2322
'promise/no-callback-in-promise': 0,
2423
'promise/prefer-await-to-callbacks': 0,
2524
},

src/methods/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
const nodeFetch = require('node-fetch')
12
// Webpack will sometimes export default exports in different places
2-
const fetch = require('node-fetch').default || require('node-fetch')
3+
const fetch = nodeFetch.default || nodeFetch
34

45
const { getOperations } = require('../operations')
56

0 commit comments

Comments
 (0)