const arrayUsedWithSideEffects = [ 1 ] ; arrayUsedWithSideEffects . pop ( ) ; const stringFunctionAssignedToVar = 'hello' ; let world ; world = stringFunctionAssignedToVar . replace ( 'hello' , 'world' ) ; const stringUsedInFunctionArguments = 'hello' ; console . debug ( stringUsedInFunctionArguments . replace ( 'hello' , 'world' ) ) ; export function foo ( ) { const stringUsedInFunctionReturn = 'hello' ; return stringUsedInFunctionReturn . replace ( 'hello' , 'world' ) ; } function aRandomFunctionShouldNotTriggerThisRule ( ) { } aRandomFunctionShouldNotTriggerThisRule ( ) ; const stringFunctionUsedInIf = 'hello' ; if ( stringFunctionUsedInIf . trim ( ) ) { } const matches = [ ] ; 'hello' . replace ( 'l' , ( s ) => { matches . push ( s ) ; return s ; } ) ;