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

Commit ede907a

Browse files
authored
chore: enable fp/no-loops ESLint rule (#253)
1 parent 7c47258 commit ede907a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module.exports = {
77
complexity: 0,
88
'max-statements': 0,
99
'fp/no-let': 0,
10-
'fp/no-loops': 0,
1110
'fp/no-mutation': 0,
1211
'promise/prefer-await-to-callbacks': 0,
1312
},

src/methods/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ const addAgent = function (agent, opts) {
6161
}
6262

6363
const makeRequestOrRetry = async function ({ url, method, defaultHeaders, agent, requestParams, opts }) {
64+
// Using a loop is simpler here
65+
// eslint-disable-next-line fp/no-loops
6466
for (let index = 0; index <= MAX_RETRY; index++) {
6567
const optsA = getOpts({ method, defaultHeaders, agent, requestParams, opts })
6668
// eslint-disable-next-line no-await-in-loop

0 commit comments

Comments
 (0)