I have a function where it passes two params to other function (one of them is function name):
sendSomething(){
this.responseWithModal(this.responseType, this.openModal());
}
responseWithModal(response, successFunction){
this.store.dispatch(sendResponse(payload: {something}));
successFunction;
}
successFunction(){
window.open("www.somelink.com");
}
When I am running npm run lint
it can not pass linting and gets error:
unused expression, expected an assignment or function call
The thing is that everything works as expected, but I can not pass lint because of that fail for successFunction;
call in responseWithModal()
function. Maybe there is better solution how to solve function as parameter calling?