location.href = '' // error reported about `location`
What language are we talking about here?
I’m using TypeScript, the error is reported from SonarJS
Your report is a bit light in information. Can I suggest you look at the following post, and add more details?