I am using Airbnb's style guide and have a couple of functions that reference each other this error is triggered no matter which function is above the other. Is there a best practice on how to fix this error besides just disable it?
function foo() {
const ham = document.querySelector('#ham');
ham.onclick = () => {
bar();
};
}
function bar() {
const spam = document.querySelector('#spam');
spam.onclick = () => {
foo();
};
}