@@ -133,8 +133,10 @@ const ScanResults: FC<Props> = ({ data }) => {
133
133
134
134
// Calculate if there are any previous run links across all sections
135
135
const hasPreviousRunLinks = useMemo (
136
- // eslint-disable-next-line max-len
137
- ( ) => allSectionsForPrevRun . some ( section => section . subsections . some ( subsection => subsection . units . some ( unit => unit . blocks . some ( block => block . previousRunLinks && block . previousRunLinks . length > 0 ) ) ) ) ,
136
+ ( ) => allSectionsForPrevRun . some ( section => (
137
+ section . subsections . some ( subsection => subsection . units . some ( unit => (
138
+ unit . blocks . some ( block => block . previousRunLinks && block . previousRunLinks . length > 0 )
139
+ ) ) ) ) ) ,
138
140
[ allSectionsForPrevRun ] ,
139
141
) ;
140
142
@@ -182,27 +184,28 @@ const ScanResults: FC<Props> = ({ data }) => {
182
184
// Only show sections that have at least one unit with a visible link (not just previousRunLinks)
183
185
const shouldSectionRender = ( sectionIndex : number ) : boolean => {
184
186
const section = allSectionsForBrokenLinks [ sectionIndex ] ;
185
- // eslint-disable-next-line max-len
186
- const hasVisibleUnit = section . subsections . some ( ( subsection ) => subsection . units . some ( ( unit ) => unit . blocks . some ( ( block ) => {
187
- const hasBroken = block . brokenLinks ?. length > 0 ;
188
- const hasLocked = block . lockedLinks ?. length > 0 ;
189
- const hasExternal = block . externalForbiddenLinks ?. length > 0 ;
187
+ const hasVisibleUnit = section . subsections . some (
188
+ ( subsection ) => subsection . units . some ( ( unit ) => unit . blocks . some ( ( block ) => {
189
+ const hasBroken = block . brokenLinks ?. length > 0 ;
190
+ const hasLocked = block . lockedLinks ?. length > 0 ;
191
+ const hasExternal = block . externalForbiddenLinks ?. length > 0 ;
190
192
191
- const noFilters = ! filters . brokenLinks
193
+ const noFilters = ! filters . brokenLinks
192
194
&& ! filters . lockedLinks
193
195
&& ! filters . externalForbiddenLinks ;
194
196
195
- const showBroken = filters . brokenLinks && hasBroken ;
196
- const showLocked = filters . lockedLinks && hasLocked ;
197
- const showExternal = filters . externalForbiddenLinks && hasExternal ;
197
+ const showBroken = filters . brokenLinks && hasBroken ;
198
+ const showLocked = filters . lockedLinks && hasLocked ;
199
+ const showExternal = filters . externalForbiddenLinks && hasExternal ;
198
200
199
- return (
200
- showBroken
201
- || showLocked
202
- || showExternal
203
- || ( noFilters && ( hasBroken || hasLocked || hasExternal ) )
204
- ) ;
205
- } ) ) ) ;
201
+ return (
202
+ showBroken
203
+ || showLocked
204
+ || showExternal
205
+ || ( noFilters && ( hasBroken || hasLocked || hasExternal ) )
206
+ ) ;
207
+ } ) ) ,
208
+ ) ;
206
209
return hasVisibleUnit ;
207
210
} ;
208
211
0 commit comments