resources/assets/js/directives/tooltip.ts
Function init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const init = (el: ElementWithTooltip, binding: DirectiveBinding) => {
const $tooltip = getOrCreateTooltip(el)
// make sure the actual title is removed from the element, but keep a backup for the updated() hook calls
$tooltip.querySelector<HTMLDivElement>('.tooltip-content')!.textContent = binding.value