Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 29, 2022
1 parent ab033ea commit 2215ef1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/config/normalize/lib/call.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const callFunc = async function ({ func, input, info, hasInput, test }) {
// Most rule methods follow the same patterns:
// - Called with `input` and `info`
// - Optionally async
export const callInputFunc = async function (userFunc, input, info) {
export const callInputFunc = async function (func, input, info) {
try {
return await callUserFunc(userFunc.bind(undefined, input), info)
return await callUserFunc(func.bind(undefined, input), info)
} catch (error) {
const errorA = handleError(error, info)
const errorB = addCurrentValue(errorA, input)
Expand All @@ -33,19 +33,19 @@ export const callInputFunc = async function (userFunc, input, info) {

// Some methods are not called with any `input` but their logic requires knowing
// whether it is undefined
const callConstraintFunc = async function (userFunc, info) {
const callConstraintFunc = async function (func, info) {
try {
return await callUserFunc(userFunc, info)
return await callUserFunc(func, info)
} catch (error) {
const errorA = handleError(error, info)
throw addExampleValue(errorA, info)
}
}

// Some methods are not called with any input
const callNoInputFunc = async function (userFunc, info) {
const callNoInputFunc = async function (func, info) {
try {
return await callUserFunc(userFunc, info)
return await callUserFunc(func, info)
} catch (error) {
throw handleError(error, info)
}
Expand Down Expand Up @@ -80,6 +80,6 @@ const serializeValue = function (value) {
}

// eslint-disable-next-line no-unused-vars
const callUserFunc = async function (userFunc, { example, prefix, ...info }) {
return await maybeFunction(userFunc, info)
const callUserFunc = async function (func, { example, prefix, ...info }) {
return await maybeFunction(func, info)
}

0 comments on commit 2215ef1

Please sign in to comment.