@@ -125,9 +125,11 @@ export async function loadAndOmitTraceJson(
125125 traceEvents : normalizedEvents ,
126126 } ;
127127 if ( container . displayTimeUnit ) {
128+ // eslint-disable-next-line functional/immutable-data
128129 result . displayTimeUnit = container . displayTimeUnit ;
129130 }
130131 if ( container . metadata ) {
132+ // eslint-disable-next-line functional/immutable-data
131133 result . metadata = normalizeMetadata ( container . metadata ) ;
132134 }
133135 // Validate that the result can be serialized to valid JSON
@@ -251,9 +253,11 @@ function normalizeAndFormatEventsArray(
251253 const uniqueLocalIds = new Set < string > ( ) ;
252254 const timestamps : number [ ] = [ ] ;
253255
256+ // eslint-disable-next-line functional/no-loop-statements
254257 for ( const event of decodedEvents ) {
255258 if ( event . pid != null ) uniquePids . add ( event . pid ) ;
256259 if ( event . tid != null ) uniqueTids . add ( event . tid ) ;
260+ // eslint-disable-next-line functional/immutable-data
257261 timestamps . push ( event . ts ) ;
258262 if ( event . id2 ?. local && typeof event . id2 . local === 'string' ) {
259263 uniqueLocalIds . add ( event . id2 . local ) ;
@@ -294,6 +298,7 @@ function normalizeAndFormatEventsArray(
294298
295299 // Handle args normalization
296300 if ( event . args ?. data && typeof event . args . data === 'object' ) {
301+ // eslint-disable-next-line functional/immutable-data
297302 normalized . args = {
298303 ...event . args ,
299304 data : {
@@ -316,6 +321,7 @@ function normalizeAndFormatEventsArray(
316321 } ;
317322 } else if ( event . args ) {
318323 // Preserve args if it exists and has other properties
324+ // eslint-disable-next-line functional/immutable-data
319325 normalized . args = event . args ;
320326 }
321327 // If args is undefined or doesn't exist, don't include it
@@ -405,6 +411,7 @@ export async function loadNormalizedTraceJsonl(
405411 * @param container - Trace event container to validate
406412 */
407413export function expectTraceDecodable ( container : TraceEventContainer ) : void {
414+ // eslint-disable-next-line functional/no-loop-statements
408415 for ( const event of container . traceEvents ) {
409416 if ( event . cat === 'blink.user_timing' ) {
410417 expect ( ( ) => decodeEvent ( event ) ) . not . toThrow ( ) ;
0 commit comments