mirror of
https://github.com/kerberos-io/agent.git
synced 2026-11-21 22:50:39 +00:00
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:
+10
-10
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user