Grupo-AFAL/frontend-helpers

View on GitHub
javascript/src/utils/domHelpers.js

Summary

Maintainability
B
4 hrs
Test Coverage
F
47%

Showing 2 of 2 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const nextSibling = (element, selector) => {
let nextElement = element.nextElementSibling
if (!nextElement) return null
 
while (!nextElement.matches(selector)) {
Severity: Major
Found in javascript/src/utils/domHelpers.js and 1 other location - About 2 hrs to fix
javascript/src/utils/domHelpers.js on lines 36..46

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const previousSibling = (element, selector) => {
let previousElement = element.previousElementSibling
if (!previousElement) return null
 
while (!previousElement.matches(selector)) {
Severity: Major
Found in javascript/src/utils/domHelpers.js and 1 other location - About 2 hrs to fix
javascript/src/utils/domHelpers.js on lines 48..58

There are no issues that match your filters.

Category
Status