Eslint: Fix Unexpected unnamed function func-names

This is the proper and correct new way of using anonymous functions.

Reference: https://stackoverflow.com/questions/52735032/warning-unexpected-unnamed-function-func-names-under-eslint-rule
This commit is contained in:
olokos
2022-08-17 21:12:01 +02:00
parent 23b357e669
commit 87f84e993a
2 changed files with 15 additions and 15 deletions
+10 -10
View File
@@ -9,10 +9,10 @@ export function doGetConfig(onSuccess, onError) {
}
return res.data;
})
.then(function (data) {
.then((data) => {
onSuccess(data);
})
.catch(function (error) {
.catch((error) => {
onError(error);
});
}
@@ -28,10 +28,10 @@ export function doSaveConfig(config, onSuccess, onError) {
}
return res.data;
})
.then(function (data) {
.then((data) => {
onSuccess(data);
})
.catch(function (error) {
.catch((error) => {
onError(error);
});
}
@@ -45,10 +45,10 @@ export function doGetKerberosAgentTags(onSuccess, onError) {
}
return res.data;
})
.then(function (data) {
.then((data) => {
onSuccess(data);
})
.catch(function (error) {
.catch((error) => {
onError(error);
});
}
@@ -64,10 +64,10 @@ export function doVerifyPersistence(config, onSuccess, onError) {
}
return res.data;
})
.then(function (data) {
.then((data) => {
onSuccess(data);
})
.catch(function (error) {
.catch((error) => {
onError(error);
});
}
@@ -83,10 +83,10 @@ export function doVerifyHub(config, onSuccess, onError) {
}
return res.data;
})
.then(function (data) {
.then((data) => {
onSuccess(data);
})
.catch(function (error) {
.catch((error) => {
onError(error);
});
}